public void addAllChildren(Graphics3DNode... children) { for (Graphics3DNode child : children) { addChild(child); } }
@Override public JMEGraphics3DAdapter getGraphics3DAdapter() { return (JMEGraphics3DAdapter) super.getGraphics3DAdapter(); }
public Graphics3DWorld(String worldName, Graphics3DAdapter graphics3dAdapter) { this.graphics3dAdapter = graphics3dAdapter; this.worldName = worldName; init(); }
public void startWithGui(double camX, double camY, double camZ, int windowWidth, int windowHeight) { start(); cameraController = Graphics3DAdapterTools.createCameraController(graphics3dAdapter, viewportAdapter, new Vector3D(camX, camY, camZ)); addChild(cameraController.getFixPointNode()); jFrame = Graphics3DAdapterTools.createNewWindow(viewportAdapter, worldName, windowWidth, windowHeight, cameraController); }
public void startWithGui(int windowWidth, int windowHeight) { startWithGui(ClassicCameraController.CAMERA_START_X, ClassicCameraController.CAMERA_START_Y, ClassicCameraController.CAMERA_START_Z, windowWidth, windowHeight); }
public void setCameraPosition(double x, double y, double z) { checkCameraIsNotNull(); cameraController.setCameraPosition(x, y, z); }
public void startWithoutGui() { start(); }
@Override public void postFrame(double timePerFrame) { super.postFrame(timePerFrame); while (!nodesToAddPostFrame.isEmpty()) { getGraphics3DAdapter().getRenderer().getZUpNode().attachChild(nodesToAddPostFrame.poll()); } } }
public void addFrameListener(Graphics3DFrameListener frameListener) { checkViewportIsNotNull(); viewportAdapter.addFrameListener(frameListener); }
protected void start() { graphics3dAdapter.addRootNode(rootNode); viewportAdapter = Graphics3DAdapterTools.createViewport(graphics3dAdapter); addFrameListener(this); }
private void init() { if (showScanPoints) { createPoints(); world.addAllChildren(points); } if (showScanRays) { createRays(); world.addAllChildren(rays); } }
public void startWithGui(double camX, double camY, double camZ, int windowWidth, int windowHeight) { start(); cameraController = Graphics3DAdapterTools.createCameraController(graphics3dAdapter, viewportAdapter, new Vector3d(camX, camY, camZ)); addChild(cameraController.getFixPointNode()); jFrame = Graphics3DAdapterTools.createNewWindow(viewportAdapter, worldName, windowWidth, windowHeight, cameraController); }
public void startWithGui(int windowWidth, int windowHeight) { startWithGui(ClassicCameraController.CAMERA_START_X, ClassicCameraController.CAMERA_START_Y, ClassicCameraController.CAMERA_START_Z, windowWidth, windowHeight); }
public void setCameraPosition(double x, double y, double z) { checkCameraIsNotNull(); cameraController.setCameraPosition(x, y, z); }
public void startWithoutGui() { start(); }
@Override public void postFrame(double timePerFrame) { super.postFrame(timePerFrame); while (!nodesToAddPostFrame.isEmpty()) { getGraphics3DAdapter().getRenderer().getZUpNode().attachChild(nodesToAddPostFrame.poll()); } } }
public void addFrameListener(Graphics3DFrameListener frameListener) { checkViewportIsNotNull(); viewportAdapter.addFrameListener(frameListener); }
protected void start() { graphics3dAdapter.addRootNode(rootNode); viewportAdapter = Graphics3DAdapterTools.createViewport(graphics3dAdapter); addFrameListener(this); }
public void startWithGui(double camX, double camY, double camZ) { startWithGui(camX, camY, camZ, 800, 600); }
public void fixCameraOnNode(Graphics3DNode node) { checkCameraIsNotNull(); cameraController.setFixPosition(node.getTranslation().getX(), node.getTranslation().getY(), node.getTranslation().getZ()); }