List of usage examples for javax.media.j3d Transform3D Transform3D
public Transform3D(Matrix3f m1, Vector3f t1, float s)
From source file:pl.edu.icm.visnow.geometries.viewer3d.Display3DPanel.java
private void rescaleFromMouseWheel(java.awt.event.MouseWheelEvent evt) { if (lockView) { return;/*from w ww . ja va 2s . c o m*/ } int notches = evt.getWheelRotation(); if (notches < 0) { mouseScale /= mouseWheelSensitivity; } else { mouseScale *= mouseWheelSensitivity; } tempTransform = new Transform3D(new Matrix3d(1., 0., 0., 0., 1., 0., 0., 0., 1.), //sceneCenter, new Vector3d(0.0, 0.0, 0.0), externScale * mouseScale); objScale.setTransform(tempTransform); }
From source file:pl.edu.icm.visnow.geometries.viewer3d.Display3DPanel.java
@Override public void setScale(double scale) { if (lockView) return;/* ww w . j a v a 2s . c o m*/ externScale = scale; tempTransform = new Transform3D(new Matrix3d(1., 0., 0., 0., 1., 0., 0., 0., 1.), // sceneCenter, new Vector3d(0.0, 0.0, 0.0), externScale * mouseScale); objScale.setTransform(tempTransform); }