[vtkusers] SetCenter for loaded obj models

David E DeMarle dave.demarle at kitware.com
Tue Aug 7 12:57:47 EDT 2018

Hi Shayan.

There is a distinction between where an object is located and where
the object is displayed.

vtkSphereSource's SetCenter  generates an all of the coordinates,
taking into account the desired Center when it makes the triangles.
vtkProp3D's SetPosition is a component of the transformation matrix
and thus affects where the object is displayed. By default it is 0,0,0
meaning that the object is displayed exactly where it is located.

Instead of altering the code  recommend that you either:
* apply the vtkTransformFilter to alter the location of your obj model
(making a copy of it with different coordiantes)
* use SetPosition on the vtkActor (a Prop3D subclass) to alter the
displayed location of your obj model.

David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Thu, Aug 2, 2018 at 5:01 AM shayan moradkhani
<shayan.moradkhani at gmail.com> wrote:
> is there anyone who has used setCenter method for loaded obj models?
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> 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
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers

More information about the vtkusers mailing list