List of usage examples for javax.media.j3d AmbientLight AmbientLight
public AmbientLight()
From source file:Licht.java
/** * Erstellt den Szenegraphen/*from w w w .j a v a 2s.c o m*/ * * @return BranchGroup */ public BranchGroup macheSzene() { BranchGroup objWurzel = new BranchGroup(); // Transformation, 2 Rotationen: Transform3D drehung = new Transform3D(); Transform3D drehung2 = new Transform3D(); drehung.rotX(Math.PI / 4.0d); drehung2.rotY(Math.PI / 5.0d); drehung.mul(drehung2); TransformGroup objDreh = new TransformGroup(drehung); Sphere kugel = new Sphere(0.5f, Sphere.GENERATE_NORMALS, 50, makeAppearance()); objWurzel.addChild(kugel); objWurzel.addChild(objDreh); //directes Licht DirectionalLight d_Licht = new DirectionalLight(); d_Licht.setInfluencingBounds(new BoundingSphere(new Point3d(0.0d, 0.0d, 0.0d), Double.MAX_VALUE)); d_Licht.setColor(new Color3f(1.0f, 0.0f, 0.0f)); Vector3f dir = new Vector3f(1.0f, 2.0f, -1.0f); dir.normalize(); d_Licht.setDirection(dir); objWurzel.addChild(d_Licht); // ambient Licht AmbientLight a_licht = new AmbientLight(); a_licht.setInfluencingBounds(new BoundingSphere(new Point3d(0.0f, 0.0f, 0.0f), Double.MAX_VALUE)); a_licht.setColor(new Color3f(1.0f, 0.0f, 0.0f)); objWurzel.addChild(a_licht); return objWurzel; }
From source file:LitSphereApp.java
BranchGroup createScene() { BranchGroup scene = new BranchGroup(); scene.addChild(new Sphere(0.9f, Sphere.GENERATE_NORMALS, createAppearance())); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(new BoundingSphere()); scene.addChild(lightA);/*from w w w . j ava 2 s .com*/ DirectionalLight lightD1 = new DirectionalLight(); lightD1.setInfluencingBounds(new BoundingSphere()); Vector3f direction1 = new Vector3f(-1.0f, -1.0f, -0.5f); direction1.normalize(); lightD1.setDirection(direction1); lightD1.setColor(new Color3f(0.0f, 0.0f, 1.0f)); scene.addChild(lightD1); DirectionalLight lightD2 = new DirectionalLight(); lightD2.setInfluencingBounds(new BoundingSphere()); Vector3f direction2 = new Vector3f(1.0f, -1.0f, -0.5f); direction2.normalize(); lightD2.setDirection(direction2); lightD2.setColor(new Color3f(1.0f, 0.0f, 0.0f)); scene.addChild(lightD2); Background bg = new Background(); bg.setColor(1.0f, 1.0f, 1.0f); bg.setApplicationBounds(new BoundingSphere()); scene.addChild(bg); return scene; }
From source file:LitPlaneApp.java
public LitPlaneApp() { setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(null); add("Center", c); BranchGroup scene = new BranchGroup(); Shape3D plane = new LitPlane(); scene.addChild(new LitPlane()); scene.addChild(new Sphere(0.5f, Sphere.GENERATE_NORMALS, plane.getAppearance())); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(new BoundingSphere()); scene.addChild(lightA);//www.j av a2 s.c om DirectionalLight lightD1 = new DirectionalLight(); lightD1.setInfluencingBounds(new BoundingSphere(new Point3d(0.0, 0.5, 0.0), 0.1)); Vector3f direction = new Vector3f(-1.0f, -1.0f, -1.0f); direction.normalize(); lightD1.setDirection(direction); lightD1.setColor(new Color3f(1.0f, 1.0f, 1.0f)); scene.addChild(lightD1); SimpleUniverse u = new SimpleUniverse(c); // This will move the ViewPlatform back a bit so the // objects in the scene can be viewed. u.getViewingPlatform().setNominalViewingTransform(); u.addBranchGraph(scene); }
From source file:Text3DApp.java
public BranchGroup createSceneGraph() { // Create the root of the branch graph BranchGroup objRoot = new BranchGroup(); Transform3D t3D = new Transform3D(); t3D.setTranslation(new Vector3f(0.0f, 0.0f, -3.0f)); TransformGroup objMove = new TransformGroup(t3D); objRoot.addChild(objMove);//w ww.ja v a 2s. c o m // Create the transform group node and initialize it to the // identity. Add it to the root of the subgraph. TransformGroup objSpin = new TransformGroup(); objSpin.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); objMove.addChild(objSpin); Appearance textAppear = new Appearance(); ColoringAttributes textColor = new ColoringAttributes(); textColor.setColor(1.0f, 0.0f, 0.0f); textAppear.setColoringAttributes(textColor); textAppear.setMaterial(new Material()); // Create a simple shape leaf node, add it to the scene graph. Font3D font3D = new Font3D(new Font("Helvetica", Font.PLAIN, 1), new FontExtrusion()); Text3D textGeom = new Text3D(font3D, new String("3DText")); textGeom.setAlignment(Text3D.ALIGN_CENTER); Shape3D textShape = new Shape3D(); textShape.setGeometry(textGeom); textShape.setAppearance(textAppear); objSpin.addChild(textShape); // Create a new Behavior object that will perform the desired // operation on the specified transform object and add it into // the scene graph. Alpha rotationAlpha = new Alpha(-1, 10000); RotationInterpolator rotator = new RotationInterpolator(rotationAlpha, objSpin); // a bounding sphere specifies a region a behavior is active // create a sphere centered at the origin with radius of 100 BoundingSphere bounds = new BoundingSphere(); rotator.setSchedulingBounds(bounds); objSpin.addChild(rotator); DirectionalLight lightD = new DirectionalLight(); lightD.setInfluencingBounds(bounds); lightD.setDirection(new Vector3f(0.0f, 0.0f, -1.0f)); lightD.setColor(new Color3f(1.0f, 0.0f, 1.0f)); objMove.addChild(lightD); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(bounds); objMove.addChild(lightA); return objRoot; }
From source file:ExAmbientLight.java
public Group buildScene() { // Get the current color Color3f color = (Color3f) colors[currentColor].value; // Turn off the example headlight setHeadlightEnable(false);//from w ww .j av a2s . c o m // Build the scene group Group scene = new Group(); // BEGIN EXAMPLE TOPIC // Create influencing bounds BoundingSphere worldBounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), // Center 1000.0); // Extent // Set the light color and its influencing bounds light = new AmbientLight(); light.setEnable(lightOnOff); light.setColor(color); light.setCapability(AmbientLight.ALLOW_STATE_WRITE); light.setCapability(AmbientLight.ALLOW_COLOR_WRITE); light.setInfluencingBounds(worldBounds); scene.addChild(light); // END EXAMPLE TOPIC // Build foreground geometry scene.addChild(new SphereGroup()); return scene; }
From source file:BackgroundApp.java
public BranchGroup createSceneGraph(SimpleUniverse su) { // Create the root of the branch graph BranchGroup objRootBG = new BranchGroup(); Vector3f translate = new Vector3f(); Transform3D T3D = new Transform3D(); translate.set(0.0f, -0.3f, 0.0f);/*w w w . jav a 2s . c o m*/ T3D.setTranslation(translate); TransformGroup objRoot = new TransformGroup(T3D); objRootBG.addChild(objRoot); objRoot.addChild(createLand()); BoundingLeaf boundingLeaf = new BoundingLeaf(new BoundingSphere()); PlatformGeometry platformGeom = new PlatformGeometry(); platformGeom.addChild(boundingLeaf); platformGeom.compile(); su.getViewingPlatform().setPlatformGeometry(platformGeom); KeyNavigatorBehavior keyNavBeh = new KeyNavigatorBehavior( su.getViewingPlatform().getViewPlatformTransform()); keyNavBeh.setSchedulingBoundingLeaf(boundingLeaf); objRootBG.addChild(keyNavBeh); Background background = new Background(); background.setApplicationBounds(new BoundingSphere(new Point3d(), 1000.0)); background.setGeometry(createBackGraph()); objRoot.addChild(background); AmbientLight ambientLight = new AmbientLight(); ambientLight.setInfluencingBounds(new BoundingSphere()); objRootBG.addChild(ambientLight); return objRootBG; }
From source file:ShadowApp.java
public ShadowApp() { setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(null); add("Center", c); BranchGroup scene = new BranchGroup(); Shape3D plane = new LitQuad(new Point3f(-0.3f, 0.6f, 0.2f), new Point3f(-0.3f, -0.3f, 0.2f), new Point3f(0.6f, -0.3f, -0.3f), new Point3f(0.6f, 0.6f, -0.3f)); scene.addChild(plane);/*w w w. ja v a 2s . c om*/ Shape3D floor = new LitQuad(new Point3f(-1.0f, -0.5f, -1.0f), new Point3f(-1.0f, -0.5f, 1.0f), new Point3f(1.0f, -0.5f, 1.0f), new Point3f(1.0f, -0.5f, -1.0f)); scene.addChild(floor); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(new BoundingSphere()); scene.addChild(lightA); DirectionalLight lightD1 = new DirectionalLight(); lightD1.setInfluencingBounds(new BoundingSphere()); Vector3f direction = new Vector3f(-1.0f, -1.0f, -1.0f); direction.normalize(); lightD1.setDirection(direction); scene.addChild(lightD1); Shape3D shadow = new SimpleShadow((GeometryArray) plane.getGeometry(), direction, new Color3f(0.2f, 0.2f, 0.2f), -0.5f); scene.addChild(shadow); SimpleUniverse u = new SimpleUniverse(c); // This will move the ViewPlatform back a bit so the // objects in the scene can be viewed. u.getViewingPlatform().setNominalViewingTransform(); u.addBranchGraph(scene); }
From source file:MaterialApp.java
public MaterialApp() { setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(null); add("Center", c); Color3f white = new Color3f(1.0f, 1.0f, 1.0f); Color3f blue = new Color3f(0.0f, 0.0f, 1.0f); BranchGroup scene = new BranchGroup(); TransformGroup trans11 = createTG(-0.7f, 0.7f, -0.5f); scene.addChild(trans11);/*from w ww . jav a2 s . c o m*/ trans11.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 0.0f))); TransformGroup trans12 = createTG(0.0f, 0.7f, -0.5f); scene.addChild(trans12); trans12.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1.0f))); TransformGroup trans13 = createTG(0.7f, 0.7f, -0.5f); scene.addChild(trans13); trans13.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 2.0f))); TransformGroup trans21 = createTG(-0.7f, 0.0f, -0.5f); scene.addChild(trans21); trans21.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 5.0f))); TransformGroup trans22 = createTG(0.0f, 0.0f, -0.5f); scene.addChild(trans22); trans22.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 10.0f))); TransformGroup trans23 = createTG(0.7f, 0.0f, -0.5f); scene.addChild(trans23); trans23.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 20.0f))); TransformGroup trans31 = createTG(-0.7f, -0.7f, -0.5f); scene.addChild(trans31); trans31.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 50.0f))); TransformGroup trans32 = createTG(0.0f, -0.7f, -0.5f); scene.addChild(trans32); trans32.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 100.0f))); TransformGroup trans33 = createTG(0.7f, -0.7f, -0.5f); scene.addChild(trans33); trans33.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(new BoundingSphere()); scene.addChild(lightA); DirectionalLight lightD1 = new DirectionalLight(); lightD1.setInfluencingBounds(new BoundingSphere()); Vector3f direction = new Vector3f(-1.0f, -1.0f, -1.0f); direction.normalize(); lightD1.setDirection(direction); lightD1.setColor(new Color3f(1.0f, 1.0f, 1.0f)); scene.addChild(lightD1); Background background = new Background(); background.setApplicationBounds(new BoundingSphere()); background.setColor(1.0f, 1.0f, 1.0f); scene.addChild(background); SimpleUniverse u = new SimpleUniverse(c); // This will move the ViewPlatform back a bit so the // objects in the scene can be viewed. u.getViewingPlatform().setNominalViewingTransform(); // setLocalEyeViewing u.getViewer().getView().setLocalEyeLightingEnable(true); u.addBranchGraph(scene); }
From source file:LocalEyeApp.java
public LocalEyeApp() { setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(null); add("Center", c); Color3f white = new Color3f(1.0f, 1.0f, 1.0f); Color3f red = new Color3f(1.0f, 0.0f, 0.0f); Color3f blue = new Color3f(0.0f, 0.0f, 1.0f); BranchGroup scene = new BranchGroup(); TransformGroup trans11 = createTG(-0.7f, 0.7f, -0.5f); scene.addChild(trans11);/*from ww w . j ava 2 s. c o m*/ trans11.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans12 = createTG(0.0f, 0.7f, -0.5f); scene.addChild(trans12); trans12.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans13 = createTG(0.7f, 0.7f, -0.5f); scene.addChild(trans13); trans13.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans21 = createTG(-0.7f, 0.0f, -0.5f); scene.addChild(trans21); trans21.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans22 = createTG(0.0f, 0.0f, -0.5f); scene.addChild(trans22); trans22.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans23 = createTG(0.7f, 0.0f, -0.5f); scene.addChild(trans23); trans23.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans31 = createTG(-0.7f, -0.7f, -0.5f); scene.addChild(trans31); trans31.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans32 = createTG(0.0f, -0.7f, -0.5f); scene.addChild(trans32); trans32.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); TransformGroup trans33 = createTG(0.7f, -0.7f, -0.5f); scene.addChild(trans33); trans33.addChild(new Sphere(0.3f, Sphere.GENERATE_NORMALS, 60, createMatAppear(blue, white, 1000.0f))); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(new BoundingSphere()); scene.addChild(lightA); DirectionalLight lightD1 = new DirectionalLight(); lightD1.setInfluencingBounds(new BoundingSphere()); Vector3f direction = new Vector3f(0.0f, 0.0f, -1.0f); direction.normalize(); lightD1.setDirection(direction); lightD1.setColor(red); scene.addChild(lightD1); PointLight lightP1 = new PointLight(); lightP1.setInfluencingBounds(new BoundingSphere()); Point3f position = new Point3f(0.0f, 0.0f, 1.0f); lightP1.setPosition(position); scene.addChild(lightP1); Background background = new Background(); background.setApplicationBounds(new BoundingSphere()); background.setColor(white); scene.addChild(background); SimpleUniverse u = new SimpleUniverse(c); // This will move the ViewPlatform back a bit so the // objects in the scene can be viewed. u.getViewingPlatform().setNominalViewingTransform(); //Enable Local Eye Lighting u.getViewer().getView().setLocalEyeLightingEnable(true); u.addBranchGraph(scene); }
From source file:LightsNPlanesApp.java
public LightsNPlanesApp() { setLayout(new BorderLayout()); Canvas3D c = new Canvas3D(null); add("Center", c); BoundingSphere bounds = new BoundingSphere(new Point3d(), 0.1); Vector3f direction = new Vector3f(0.0f, -1.0f, 0.0f); Point3f position = new Point3f(0.0f, 0.5f, -0.3f); Color3f white = new Color3f(1.0f, 1.0f, 1.0f); Color3f red = new Color3f(1.0f, 0.0f, 0.0f); Color3f green = new Color3f(0.0f, 1.0f, 0.0f); Color3f blue = new Color3f(0.0f, 0.0f, 1.0f); BranchGroup scene = new BranchGroup(); IndexedQuadArray qa = new IndexedQuadArray(9, QuadArray.COORDINATES | QuadArray.NORMALS, 16); qa.setCoordinate(0, new Point3f(-0.3f, 0.3f, -0.3f)); qa.setCoordinate(1, new Point3f(0.0f, 0.3f, -0.3f)); qa.setCoordinate(2, new Point3f(0.3f, 0.3f, -0.3f)); qa.setCoordinate(3, new Point3f(-0.3f, 0.0f, 0.0f)); qa.setCoordinate(4, new Point3f(0.0f, 0.0f, 0.0f)); qa.setCoordinate(5, new Point3f(0.3f, 0.0f, 0.0f)); qa.setCoordinate(6, new Point3f(-0.3f, -0.3f, 0.3f)); qa.setCoordinate(7, new Point3f(0.0f, -0.3f, 0.3f)); qa.setCoordinate(8, new Point3f(0.3f, -0.3f, 0.3f)); Vector3f n = new Vector3f(0.0f, 0.6f, 0.8f); n.normalize();//from w w w . j a v a 2 s . c o m qa.setNormal(0, n); qa.setNormal(1, n); qa.setNormal(2, n); qa.setNormal(3, n); qa.setNormal(4, n); qa.setNormal(5, n); qa.setNormal(6, n); qa.setNormal(7, n); qa.setNormal(8, n); qa.setCoordinateIndex(0, 0); qa.setCoordinateIndex(1, 3); qa.setCoordinateIndex(2, 4); qa.setCoordinateIndex(3, 1); qa.setCoordinateIndex(4, 1); qa.setCoordinateIndex(5, 4); qa.setCoordinateIndex(6, 5); qa.setCoordinateIndex(7, 2); qa.setCoordinateIndex(8, 3); qa.setCoordinateIndex(9, 6); qa.setCoordinateIndex(10, 7); qa.setCoordinateIndex(11, 4); qa.setCoordinateIndex(12, 4); qa.setCoordinateIndex(13, 7); qa.setCoordinateIndex(14, 8); qa.setCoordinateIndex(15, 5); TransformGroup trans1 = createTG(-0.7f, 0.0f, -0.5f); scene.addChild(trans1); TransformGroup trans2 = createTG(0.0f, 0.0f, -0.5f); scene.addChild(trans2); TransformGroup trans3 = createTG(0.7f, 0.0f, -0.5f); scene.addChild(trans3); Appearance qAppear = createMatAppear(white, white, 5.0f); Shape3D p1 = new Shape3D(qa, qAppear); // p1.setBoundsAutoCompute(false); p1.setBounds(bounds); p1.setCapability(Node.ALLOW_BOUNDS_READ); trans1.addChild(p1); Shape3D p2 = new Shape3D(qa, qAppear); p2.setBounds(bounds); p2.setCapability(Node.ALLOW_BOUNDS_READ); trans2.addChild(p2); Shape3D p3 = new Shape3D(qa, qAppear); p3.setBounds(bounds); p3.setCapability(Node.ALLOW_BOUNDS_READ); trans3.addChild(p3); AmbientLight lightA = new AmbientLight(); lightA.setInfluencingBounds(new BoundingSphere()); lightA.setCapability(Light.ALLOW_INFLUENCING_BOUNDS_READ); scene.addChild(lightA); DirectionalLight lightD = new DirectionalLight(); lightD.setInfluencingBounds(bounds); lightD.setBoundsAutoCompute(false); lightD.setCapability(Light.ALLOW_INFLUENCING_BOUNDS_READ); lightD.setDirection(direction); lightD.setColor(red); trans1.addChild(lightD); PointLight lightP = new PointLight(); lightP.setInfluencingBounds(bounds); lightP.setCapability(Light.ALLOW_INFLUENCING_BOUNDS_READ); lightP.setPosition(position); lightP.setColor(green); trans2.addChild(lightP); SpotLight lightS = new SpotLight(); lightS.setInfluencingBounds(bounds); lightS.setCapability(Light.ALLOW_INFLUENCING_BOUNDS_READ); lightS.setPosition(position); lightS.setDirection(direction); lightS.setSpreadAngle(0.3f); lightS.setConcentration(1.0f); lightS.setColor(blue); trans3.addChild(lightS); Background background = new Background(); background.setApplicationBounds(new BoundingSphere()); background.setColor(1.0f, 1.0f, 1.0f); scene.addChild(background); scene.compile(); System.out.print("bounds object: "); System.out.println(bounds); System.out.print("influencing bounds for lightA: "); System.out.println(lightA.getInfluencingBounds()); System.out.print("influencing bounds for lightD: "); System.out.println(lightD.getInfluencingBounds()); System.out.print("influencing bounds for lightP: "); System.out.println(lightP.getInfluencingBounds()); System.out.print("influencing bounds for lightS: "); System.out.println(lightS.getInfluencingBounds()); System.out.print("bounds for plane1: "); System.out.println(p1.getBounds()); System.out.print("bounds for plane2: "); System.out.println(p2.getBounds()); System.out.print("bounds for plane3: "); System.out.println(p3.getBounds()); BoundingSphere bs0 = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 0.2); BoundingSphere bs1 = new BoundingSphere(new Point3d(-0.1, 0.0, 0.0), 0.2); BoundingSphere bs2 = new BoundingSphere(new Point3d(-0.2, 0.0, 0.0), 0.2); BoundingSphere bs3 = new BoundingSphere(new Point3d(-0.3, 0.0, 0.0), 0.2); BoundingSphere bs4 = new BoundingSphere(new Point3d(-0.4, 0.0, 0.0), 0.2); BoundingSphere bs5 = new BoundingSphere(new Point3d(-0.5, 0.0, 0.0), 0.2); BoundingSphere bs6 = new BoundingSphere(new Point3d(-0.6, 0.0, 0.0), 0.2); BoundingSphere bs7 = new BoundingSphere(new Point3d(-0.7, 0.0, 0.0), 0.2); BoundingSphere bs8 = new BoundingSphere(new Point3d(-0.8, 0.0, 0.0), 0.2); BoundingBox bb1 = new BoundingBox(bs1); BoundingBox bb2 = new BoundingBox(bs2); BoundingBox bb3 = new BoundingBox(bs3); BoundingBox bb4 = new BoundingBox(bs4); BoundingBox bb5 = new BoundingBox(bs5); BoundingBox bb6 = new BoundingBox(bs6); BoundingBox bb7 = new BoundingBox(bs7); BoundingBox bb8 = new BoundingBox(bs8); if (bs0.intersect(bs1)) System.out.println("bs0 intersects bs1"); if (bs0.intersect(bs2)) System.out.println("bs0 intersects bs2"); if (bs0.intersect(bs3)) System.out.println("bs0 intersects bs3"); if (bs0.intersect(bs4)) System.out.println("bs0 intersects bs4"); if (bs0.intersect(bs5)) System.out.println("bs0 intersects bs5"); if (bs0.intersect(bs6)) System.out.println("bs0 intersects bs6"); if (bs0.intersect(bs7)) System.out.println("bs0 intersects bs7"); if (bs0.intersect(bs8)) System.out.println("bs0 intersects bs8"); if (bs0.intersect(bb1)) System.out.println("bs0 intersects bb1"); if (bs0.intersect(bb2)) System.out.println("bs0 intersects bb2"); if (bs0.intersect(bb3)) System.out.println("bs0 intersects bb3"); if (bs0.intersect(bb4)) System.out.println("bs0 intersects bb4"); if (bs0.intersect(bb5)) System.out.println("bs0 intersects bb5"); if (bs0.intersect(bb6)) System.out.println("bs0 intersects bb6"); if (bs0.intersect(bb7)) System.out.println("bs0 intersects bb7"); if (bs0.intersect(bb8)) System.out.println("bs0 intersects bb8"); SimpleUniverse u = new SimpleUniverse(c); // This will move the ViewPlatform back a bit so the // objects in the scene can be viewed. u.getViewingPlatform().setNominalViewingTransform(); u.addBranchGraph(scene); }