public Graphics3DNode(String name, Graphics3DNodeType nodeType, Graphics3DObject graphicsObject) { this.name = name; this.nodeType = nodeType; if (graphicsObject != null) { setGraphicsObject(graphicsObject); } }
public Graphics3DNode(String name, Graphics3DNodeType nodeType, Graphics3DObject graphicsObject) { this.name = name; this.nodeType = nodeType; if (graphicsObject != null) { setGraphicsObject(graphicsObject); } }
public static Graphics3DNode addRotatingScalingNode(ArrayList<Runnable> runnables, Graphics3DObject teapotObject) { Graphics3DNode teapotAndSphereNode = new Graphics3DNode("teaPot", Graphics3DNodeType.JOINT); teapotAndSphereNode.setGraphicsObject(teapotObject); RotateAndScaleNodeRunnable rotator = new RotateAndScaleNodeRunnable(teapotAndSphereNode); runnables.add(rotator); return teapotAndSphereNode; }
public HeightMap getGroundProfile(GroundProfileObjectFilter groundProfileObjectFilter, int resolution) { ArrayList<Graphics3DNode> nodes = new ArrayList<Graphics3DNode>(); for (Entry<String, Graphics3DObject> visual : visuals.entrySet()) { if (groundProfileObjectFilter.isTerrainObject(visual.getKey())) { Graphics3DNode node = new Graphics3DNode(visual.getKey(), Graphics3DNodeType.GROUND); node.setGraphicsObject(visual.getValue()); nodes.add(node); } } HeightMap groundProfile = new JMEGeneratedHeightMap(nodes, resolution); return groundProfile; }
public static Graphics3DNode addRotatingScalingNode(ArrayList<Runnable> runnables, Graphics3DObject teapotObject) { Graphics3DNode teapotAndSphereNode = new Graphics3DNode("teaPot", Graphics3DNodeType.JOINT); teapotAndSphereNode.setGraphicsObject(teapotObject); RotateAndScaleNodeRunnable rotator = new RotateAndScaleNodeRunnable(teapotAndSphereNode); runnables.add(rotator); return teapotAndSphereNode; }
public HeightMap getGroundProfile(GroundProfileObjectFilter groundProfileObjectFilter, int resolution) { ArrayList<Graphics3DNode> nodes = new ArrayList<Graphics3DNode>(); for (Entry<String, Graphics3DObject> visual : visuals.entrySet()) { if (groundProfileObjectFilter.isTerrainObject(visual.getKey())) { Graphics3DNode node = new Graphics3DNode(visual.getKey(), Graphics3DNodeType.GROUND); node.setGraphicsObject(visual.getValue()); nodes.add(node); } } HeightMap groundProfile = new JMEGeneratedHeightMap(nodes, resolution); return groundProfile; }
public static Graphics3DNode setupStaticBox(Graphics3DAdapter graphics3DAdapter) { Graphics3DNode box = new Graphics3DNode("box", Graphics3DNodeType.JOINT); Graphics3DObject boxGraphics = new Graphics3DObject(); boxGraphics.addCube(1.0, 1.0, 1.0, YoAppearance.Green()); box.setGraphicsObject(boxGraphics); graphics3DAdapter.addRootNode(box); return box; }
public static Graphics3DNode setupStaticBox(Graphics3DAdapter graphics3DAdapter) { Graphics3DNode box = new Graphics3DNode("box", Graphics3DNodeType.JOINT); Graphics3DObject boxGraphics = new Graphics3DObject(); boxGraphics.addCube(1.0, 1.0, 1.0, YoAppearance.Green()); box.setGraphicsObject(boxGraphics); graphics3DAdapter.addRootNode(box); return box; }
rayNode.setGraphicsObject(graphic);
rayNode.setGraphicsObject(graphic);
Graphics3DObject object1 = GraphicsDemoTools.createRandomObject(random); node1.setGraphicsObject(object1); node2.setGraphicsObject(object2); node1.setGraphicsObject(randomObject); count = 0;
Graphics3DObject object1 = GraphicsDemoTools.createRandomObject(random); node1.setGraphicsObject(object1); node2.setGraphicsObject(object2); node1.setGraphicsObject(randomObject); count = 0;
sphereNode.setGraphicsObject(sphereObject); graphicsAdapter.addRootNode(sphereNode); Graphics3DNode groundNode = new Graphics3DNode("ground", Graphics3DNodeType.JOINT); groundNode.setGraphicsObject(groundObject); graphicsAdapter.addRootNode(groundNode);
sphereNode.setGraphicsObject(sphereObject); graphicsAdapter.addRootNode(sphereNode); Graphics3DNode groundNode = new Graphics3DNode("ground", Graphics3DNodeType.JOINT); groundNode.setGraphicsObject(groundObject); graphicsAdapter.addRootNode(groundNode);
teapotObject.setChangeable(true); Graphics3DInstruction teapotAppearanceHolder = teapotObject.addTeaPot(YoAppearance.Red()); teapotAndSphereNode.setGraphicsObject(teapotObject); graphics3DAdapter.addRootNode(teapotAndSphereNode); BlinkRunnable blinker = new BlinkRunnable(teapotAppearanceHolder); Graphics3DObject boxGraphics = new Graphics3DObject(); boxGraphics.addCube(1.0, 1.0, 1.0, YoAppearance.Green()); box.setGraphicsObject(boxGraphics); graphics3DAdapter.addRootNode(box);
teapotObject.setChangeable(true); Graphics3DInstruction teapotAppearanceHolder = teapotObject.addTeaPot(YoAppearance.Red()); teapotAndSphereNode.setGraphicsObject(teapotObject); graphics3DAdapter.addRootNode(teapotAndSphereNode); BlinkRunnable blinker = new BlinkRunnable(teapotAppearanceHolder); Graphics3DObject boxGraphics = new Graphics3DObject(); boxGraphics.addCube(1.0, 1.0, 1.0, YoAppearance.Green()); box.setGraphicsObject(boxGraphics); graphics3DAdapter.addRootNode(box);
teapotObject.addTeaPot(YoAppearance.Red()); teapotAndSphereNode.setGraphicsObject(teapotObject); graphics3DAdapter.addRootNode(teapotAndSphereNode);
teapotObject.addTeaPot(YoAppearance.Red()); teapotAndSphereNode.setGraphicsObject(teapotObject); graphics3DAdapter.addRootNode(teapotAndSphereNode);
ellipsoidObject.translate(center); ellipsoidObject.addEllipsoid(xRadius, yRadius, zRadius, YoAppearance.Red()); node.setGraphicsObject(ellipsoidObject);
ellipsoidObject.translate(center); ellipsoidObject.addEllipsoid(xRadius, yRadius, zRadius, YoAppearance.Red()); node.setGraphicsObject(ellipsoidObject);