shamantou blog site

shamantou@gmail.com

导航

关于vtk渲染管线的一点说明

 line->SetPoint1(0,0,0);
 line->SetPoint2(100,0,0);

 cone->SetHeight(i);
 cone->SetRadius(100);

// vtkVideoSource *v=vtkVideoSource::New();
// v->Play();


// vtkDataSetMapper *dmapper=vtkDataSetMapper::New();
// dmapper->SetInput(v->GetOutput());

 map->SetInput(line->GetOutput());
 
 map1->SetInput(cone->GetOutput());


 actor->SetMapper(map);

 actor1->SetMapper(map1);

 render->AddActor(actor);
 render->AddActor(actor1);
 render->AddActor(actor);
 render->AddActor(actor1);

 renwin->AddRenderer(render);
 renwin->SetSize(800,600);

 iren->SetRenderWindow(renwin);
 
 renwin->Render();

 iren->Start();

 

做了下实验,以确定vtk渲染线的使用方式,

the pipe line should be a serial operation, any of extra modified to some part , we take the last modified.

for example,

map->Setinput(aa->GetOutput());   (1)

map->SetInput(bb->GetOutput());  (2)

then in piple line  (1) is invalid in fact.

and any property changes to the rendering 3d object should changed from the source or the first in the pipeline.

!!

 

<< 自己用DC制作的一段视频前些天黄山行系列之一(翡翠谷) >>

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最近发表

Powered By Z-Blog 1.8 Arwen Build 81206 Copyright 2006-2009 | ooplab.org | shamantou@gmail.com | 沪ICP备08011244号 | Some Rights Reserved.