[vtkusers] Can I apply vector function to mapper like actor?

MK.LEE lmklgm at naver.com
Tue Nov 15 02:08:05 EST 2016


Hi :)

I want to draw multi triangle each triangle by multi actor.

like this example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/VectorOfActors

In this example, I can apply multi actor using vector function.
Then, Can I apply vector function to polydata, mapper like 'VectorOfAcotrs
example'?

I wrote my code:

--------------------------------------------------

*//'CoordV_Shell[ManyShell].NodeID_1,2,3,4' is point number*

for (unsigned int ManyShell = 0; ManyShell < CoordV_Shell.size();
ManyShell++)
	{
		quad->GetPointIds()->SetId(0, CoordV_Shell[ManyShell].NodeID_1);
		quad->GetPointIds()->SetId(1, CoordV_Shell[ManyShell].NodeID_2);
		quad->GetPointIds()->SetId(2, CoordV_Shell[ManyShell].NodeID_3);
		quad->GetPointIds()->SetId(3, CoordV_Shell[ManyShell].NodeID_4);
		quads->InsertNextCell(quad);
		vectorArray.push_back(quads);
		
		polydata->Allocate();
		polydata->SetPoints(points);
		polydata->SetPolys(vectorArray[ManyShell]);
		vectorPoly.push_back(polydata);

		mapper->SetInputData(vectorPoly[ManyShell]);
		vectorMapper.push_back(mapper);

		actor->SetMapper(vectorMapper[ManyShell]);
		vectorActor.push_back(actor);

		renderer->AddActor(vectorActor[ManyShell]);   //It is wrote in example.
It's possible
	}
-----------------------------
Can I apply vector function to polydata and mapper?



--
View this message in context: http://vtk.1045678.n5.nabble.com/Can-I-apply-vector-function-to-mapper-like-actor-tp5741165.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list