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.
!!