List of usage examples for javax.media.j3d Transform3D Transform3D
public Transform3D()
From source file:pl.edu.icm.visnow.geometries.viewer3d.Display3DPanel.java
public void reset() { if (lockView) { return;//ww w . j av a2 s .c o m } mouseScale = 1.; objRotate.setTransform(new Transform3D()); Transform3D tr = new Transform3D(); tr.setTranslation(sceneCenter); objTranslate.setTransform(tr); 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); universe.getViewingPlatform().getViewPlatformTransform().setTransform(initialCameraTransform); }
From source file:pl.edu.icm.visnow.geometries.viewer3d.Display3DPanel.java
public void animate(double[] params) { if (lockView) { return;/*w w w .ja v a2s . c o m*/ } objRotate.getTransform(tempTransform); Transform3D rot = new Transform3D(); Transform3D tmp = new Transform3D(); tmp.rotX(params[0]); rot.mul(tmp); tmp.rotY(params[1]); rot.mul(tmp); tmp.rotZ(params[2]); rot.mul(tmp); rot.mul(tempTransform); objRotate.setTransform(rot); objTranslate.getTransform(rot); Vector3d trans = new Vector3d(params[3], params[4], params[5]); tmp = new Transform3D(); tmp.setTranslation(trans); rot.mul(tmp); objTranslate.setTransform(rot); mouseScale *= params[6]; 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
public void resetPointLightPosition(int l) { if (l < 0 || l >= pointLightTransforms.size()) { return;/* ww w . j av a 2 s .c o m*/ } pointLightTransforms.get(l).setTransform(new Transform3D()); }