Package javax.media.j3d

Examples of javax.media.j3d.Switch.addChild()


        lod.addSwitch(sw);
        lod.setSchedulingBounds(BoardModel.bounds);

        Appearance app = new Appearance();
        app.setColoringAttributes(new ColoringAttributes(fg, ColoringAttributes.SHADE_FLAT));
        sw.addChild(new Shape3D(geom, app));

        app = new Appearance();
        Color3f lodfg = new Color3f(fg);
        lodfg.scale(2/3f);
        lodfg.add(C.grey10);
View Full Code Here


        app = new Appearance();
        Color3f lodfg = new Color3f(fg);
        lodfg.scale(2/3f);
        lodfg.add(C.grey10);
        app.setColoringAttributes(new ColoringAttributes(lodfg, ColoringAttributes.SHADE_FLAT));
        sw.addChild(makeQuad(lower.x, lower.y+(upper.y-lower.y)/4, upper.x-lower.x, (upper.y-lower.y)/2, 0, app));

        addChild(sw);
        addChild(lod);

        setTransform(new Transform3D(C.nullRot, new Vector3d(0,0,0.1), 1.0));
View Full Code Here

    Sphere redSphere = new Sphere(radius,redSphereApp);



    //Add the two spheres to the Switch.
    colourSwitch.addChild(greenSphere);
    colourSwitch.addChild(redSphere);

    //The CollisionBounds for the two spheres.
    colourSwitch.setCollisionBounds(new BoundingSphere(new Point3d(0.0,0.0,0.0),radius));
View Full Code Here



    //Add the two spheres to the Switch.
    colourSwitch.addChild(greenSphere);
    colourSwitch.addChild(redSphere);

    //The CollisionBounds for the two spheres.
    colourSwitch.setCollisionBounds(new BoundingSphere(new Point3d(0.0,0.0,0.0),radius));

    //Enable the test for collision.
View Full Code Here

/* 189 */         if (storedRefList.get(tempFileName) != null)
/*     */         {
/* 192 */           SharedGroup storedGroup = (SharedGroup)storedRefList.get(tempFileName);
/*     */
/* 194 */           Link newLink = new Link(storedGroup);
/* 195 */           s.addChild(newLink);
/*     */         }
/*     */         else
/*     */         {
/* 199 */           J3dLwoParser objParser = new J3dLwoParser(tempFileName, debugVals);
/*     */
View Full Code Here

/* 202 */           TransformGroup t = new TransformGroup();
/* 203 */           SharedGroup newSharedGroup = new SharedGroup();
/* 204 */           storedRefList.put(tempFileName, newSharedGroup);
/* 205 */           newSharedGroup.addChild(t);
/* 206 */           Link newLink = new Link(newSharedGroup);
/* 207 */           s.addChild(newLink);
/* 208 */           if (objParser.getJava3dShapeList() != null) {
/* 209 */             Enumeration e = objParser.getJava3dShapeList().elements();
/*     */
/* 211 */             while (e.hasMoreElements()) {
/* 212 */               t.addChild((Shape3D)e.nextElement());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.