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

Bill Lorensen bill.lorensen at gmail.com
Sun Jun 3 12:56:08 EDT 2012


The two methods should have the same result. Setting the actor
position is more efficient.

On Sun, Jun 3, 2012 at 12:42 PM, fearhope <fearhope at gmail.com> wrote:
> 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.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtkusers mailing list