@Override protected org.scijava.java3d.SceneGraphObject createNode() { return new PlatformGeometry(); }
/** * Constructs an instance of the PlatformGeometry node. */ public PlatformGeometry() { setCapability(ALLOW_DETACH); } }
defaultBounds = new BoundingSphere(new Point3d(radiusGameMap, 0.0, radiusGameMap), radiusGameMap * 6.0d); BoundingLeaf boundingLeaf = new BoundingLeaf(defaultBounds); PlatformGeometry platformGeom = new PlatformGeometry(); platformGeom.addChild(boundingLeaf);
PlatformGeometry pg = new PlatformGeometry(); TransformGroup objScale = new TransformGroup(); Transform3D t3d = new Transform3D(); t3d.setTranslation(new Vector3f(0f, 0f, -1f)); objScale.setTransform(t3d); Text2D text = new Text2D("Text to display", Cell.BLACK, "Verdana", 18, 1); objScale.addChild(text); pg.addChild(objScale); simpleUniverse.getViewingPlatform().setPlatformGeometry(pg);