import java.util.Collection;
import java.util.List;
+import javax.vecmath.Point3d;
+
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
});
}
- public void focus(double x, double y, double z) {
+ public vtkCamera getCamera() {
+ return cam;
+ }
+
+ public Point3d getPosition() {
+ double pos[] = cam.GetPosition();
+ return new Point3d(pos);
+ }
+
+ public Point3d getFocus() {
+ double pos[] = cam.GetFocalPoint();
+ return new Point3d(pos);
+ }
+
+ public void setFocus(Point3d focus) {
+ setFocus(focus.x,focus.y,focus.z);
+ }
+
+ public void setFocus(double x, double y, double z) {
Lock();
cam.SetFocalPoint(x, y, z);
if (doNotRotate)
cam.SetRoll(0);
cam.OrthogonalizeViewUp();
- resetCameraClippingRange();
+ ren.ResetCameraClippingRange();
+ panel.UpdateLight();
+ UnLock();
+ }
+
+ public void setPosition(Point3d position) {
+ setPosition(position.x,position.y,position.z);
+ }
+
+ public void setPosition(double x, double y, double z) {
+ Lock();
+ cam.SetPosition(x, y, z);
+ if (doNotRotate)
+ cam.SetRoll(0);
+ cam.OrthogonalizeViewUp();
+ ren.ResetCameraClippingRange();
panel.UpdateLight();
UnLock();
}
+
+
}