[vtkusers] Fwd: Rotation around the axes origin
Laura Balbastre
laura.balbastre.soler at gmail.com
Wed Jun 12 07:27:45 EDT 2013
Hi,
I'm working in 3D grpahs with VTK. Now I have the possibility to rotate
them, but around the center of the image. Like in rotation.bmp.
What I want to achieve is rotating them around the axes's origin and
consequently, maintain always the origin always fixed.
I define the following interactor in the constructor.
public Chart3dCanvas(ChartComposite composite3) {
super();
this.chartComposite = composite3;
vtkFileOutputWindow output = new vtkFileOutputWindow();
output.SetFileName("vtkerror.txt");
output.SetInstance(output);
iren.SetInteractorStyle(new vtkInteractorStyleTrackballCamera());
iren.GetInteractorStyle().AddObserver("MiddleButtonPressEvent", this,
"middleButtonPressed");
iren.GetInteractorStyle().AddObserver("MiddleButtonPressEvent", this,
"middleButtonReleased");
iren.GetInteractorStyle().AddObserver("MouseWheelForwardEvent", this,
"mouseWheelForward");
iren.GetInteractorStyle().AddObserver("MouseWheelBackwardEvent", this,
"mouseWheelBackward");
this.addMouseWheelListener(this);
}
Any help, please?
Thank you in advance!
--
Laura Balbastre
--
Laura Balbastre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130612/b5c13e03/attachment.htm>
More information about the vtkusers
mailing list