[vtkusers] what's the difference between actor 's position and sphere 's center ?

fearhope fearhope at gmail.com
Sun Jun 3 12:42:18 EDT 2012


Hi, 

I would like to move(update) spheres a little bit continuously. 
so, I need to update the spheres' location over time. 

however, the results between in case of using actors->SetPosition() and in
case of using sphere->SetCenter() are different. it seems
actors->setPosition() is more bigger and further than SetCenter()'s. 
why these are so different ? does anybody know the reason ?

// case 1 
actor->SetPosition((double)center.x, (double)center.y, (double)center.z);

// case 2
vtkSmartPointer<vtkSphereSource> sphere_src =
vtkSmartPointer<vtkSphereSource>::New ();
...
vtkSmartPointer < vtkPolyDataMapper > mapper =
vtkSmartPointer<vtkPolyDataMapper>::New (); 
...
actor[i]->SetMapper (mapper);
actor[i]->Modified();


And, are there any other methods to change sphere's center location directly
?
for example, like as follows..  

    actor->GetMapper()->GetInput()-> "GetSphere()-> SetCenter(x,y,z)".

if so, it would be more faster. i.e., similarly, case 1 must be faster than
case 2. 

please let me know..
thanks in advance.
-yeonchool.

--
View this message in context: http://vtk.1045678.n5.nabble.com/what-s-the-difference-between-actor-s-position-and-sphere-s-center-tp5713553.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list