[vtkusers] Help Using vtkPolygonalHandleRepresentation3D for Transform application
Anant Vemuri
ajar108 at gmail.com
Thu Mar 11 23:17:52 EST 2010
Hi,
I am using vtkPolygonalHandleRepresentation3D to control position of a model
I created. I am trying to apply a transformation matrix to it to make it
move in a predefined way. For doing this I have a bunch of vtkTransforms.
At first, (before using vtkPolygonalHandleRepresentation3D) I applied the
transform through the Actor using myActor->SetUserTransform( myvtkTransform
)
But since I also wanted to create an interaction with the object, I put it
inside a vtkPolygonalHandleRepresentation3D by deriving a class called
myObjectRepresentation from vtkPolygonalHandleRepresentation3D. But now I am
no longer able to apply the transform to the object properly.
Since vtkPolygonalHandleRepresentation3D has a member variable called Actor,
I created a function
void myObjectRepresentation::SetTransform( vtkTransform *_trf )
{
this->Actor->SetUserTransform( _trf );
}
This does the trick, but after I apply the trasnform I am not able to
interact with the object properly. It moves in some random direction when I
try to move it.
Can someone help me out. I can provide more details on request.
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100312/ef360d26/attachment.htm>
More information about the vtkusers
mailing list