private static Point3d getViewPosInLocal(final View view, final Node node) { if (node == null) return null; if (!node.isLive()) return null; // get viewplatforms's location in virutal world final Canvas3D canvas = view.getCanvas3D(0); canvas.getCenterEyeInImagePlate(viewPosition); canvas.getImagePlateToVworld(t); t.transform(viewPosition); // get parent transform node.getLocalToVworld(parentInv); parentInv.invert(); // transform the eye position into the parent's coordinate system parentInv.transform(viewPosition); return viewPosition; }
canvases[0].getCenterEyeInImagePlate(eyeInVworld);
/** * return the eye's position in <node>'s coordinate space */ private static Point3d getViewPosInLocal(final View view, final Node node) { if (node == null) return null; if (!node.isLive()) return null; // get viewplatforms's location in virutal world final Canvas3D canvas = view.getCanvas3D(0); canvas.getCenterEyeInImagePlate(viewPosition); canvas.getImagePlateToVworld(t); t.transform(viewPosition); // get parent transform node.getLocalToVworld(parentInv); parentInv.invert(); // transform the eye position into the parent's coordinate system parentInv.transform(viewPosition); return viewPosition; }
Vector3d mouseVec=new Vector3d(); canvas.getCenterEyeInImagePlate(eyePosn); canvas.getPixelLocationInImagePlate(xpos,ypos,mousePosn); if (canvas.getView().getProjectionPolicy() ==
canvas.getCenterEyeInImagePlate(eye);
canvas.getCenterEyeInImagePlate(eyePosn); canvas.getPixelLocationInImagePlate(xpos,ypos,mousePosn);
canvas.getCenterEyeInImagePlate(eyePosn); canvas.getPixelLocationInImagePlate(xpos,ypos,mousePosn);
canvas.getCenterEyeInImagePlate(viewPosition); canvas.getCenterEyeInImagePlate(viewPosition);
canvas.getCenterEyeInImagePlate(viewPosition); canvas.getCenterEyeInImagePlate(viewPosition);