[vtkusers] Where is the actors matrix being saved?

Sebastien Jourdain sebastien.jourdain at kitware.com
Sun Sep 5 14:05:06 EDT 2010


Did you look into the UserTransform ? As I remember, I was using that instead...

Just in case...

Seb

On Sun, Sep 5, 2010 at 11:33 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
> Hi all,
>
> I am trying to demonstrate how to control a "piece" in a "game" (if
> one were to want to make a checkers game using VTK, for example).
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Interaction/Game
>
> The idea is as follows:
>
> Using the middle mouse button, move the cube so that a corner of the
> cube is inside of the sphere. When you release the middle button in
> this position, the program outputs "the cube is inside of the sphere"
> and resets the cube to its original position (by setting the actor's
> matrix to identity). This part works properly.
>
> The problem is, when I try to do this a second time, as soon as I
> start to move the cube, it jumps back to its ending position from the
> last iteration! I can't figure out where this old transformation is
> being stored - I thought calling:
>
> CubeActor->GetMatrix()->Identity();
>
> would reset the actors position (and it does), but it seems like it is
> saved somewhere else as well and re-applied the next time the cube is
> selected.
>
> Anyone have any ideas?
>
> Thanks!
>
> David
> _______________________________________________
> 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
>



More information about the vtkusers mailing list