[vtkusers] Concatenating sources

Tim Soper tim_d_soper at yahoo.com
Thu Jun 28 13:00:52 EDT 2007


For my application, I am using a tracking system with several position sensors for which each is represented by a vtkConeSource to express position and orientation. If I want to put them altogether under one vtkTrackingSystemSource which outputs all PolyData primitives in one output, how would I concatenate them. I assume there is someway to write a RequestData( ) method that does this? The most brute force method I can think of is to create a vtkCellArray that is the size of all the cones put together, and then copy them over.

Also, I am curious if the performance would be much improved by displaying the position/orienation of the cone graphic by manipulating the vtkActor instead of the vtkConeSource. Under this scenario, I would instead make a vtkTrackingSystemActor. For example, if the sensor is at position x,y,z and orientaion a,e,r (for azimuth, elevation, and roll ), I can display the cone that represents that sensor in one of two ways:

METHOD 1: CHANGE THE SOURCE

vtkConeSource* cone;
cones[istream]->SetCenter(x,y,z);
cones[istream]->SetDirection( cos(e)*cos(a), cos(e)*sin(a), -sin(e) );

or

METHOD 2: CHANGE THE ACTOR
vtkActor* coneActor
coneActor->SetPosition(x,y,z);
coneActor->SetOrientation(a,e,r)
 
Tim Soper 
Research Assistant
University of Washington
Department of Bioengineering 
Box 352142





 
____________________________________________________________________________________
Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367



More information about the vtkusers mailing list