Package javax.media.j3d

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


        interpolator2.setSchedulingBounds(BoardModel.bounds);
        interpolator3.setSchedulingBounds(BoardModel.bounds);

        BranchGroup bg = new BranchGroup();
        bg.addChild(interpolator1);
        bg.addChild(interpolator2);
        bg.addChild(interpolator3);
        addChild(bg);

        alpha.setStartTime(System.currentTimeMillis()+1000);
    }
View Full Code Here


        interpolator3.setSchedulingBounds(BoardModel.bounds);

        BranchGroup bg = new BranchGroup();
        bg.addChild(interpolator1);
        bg.addChild(interpolator2);
        bg.addChild(interpolator3);
        addChild(bg);

        alpha.setStartTime(System.currentTimeMillis()+1000);
    }
   
View Full Code Here

        t.addChild(obj);

        BranchGroup bg = new BranchGroup();
        MouseRotate behavior1 = new MouseRotate(t);
        behavior1.setFactor(0.0, -0.002);
        bg.addChild(behavior1);
        behavior1.setSchedulingBounds(BoardModel.bounds);

        MouseRotate behavior2 = new MouseRotate(r);
        behavior2.setFactor(-0.002, 0.0);
        bg.addChild(behavior2);
View Full Code Here

        bg.addChild(behavior1);
        behavior1.setSchedulingBounds(BoardModel.bounds);

        MouseRotate behavior2 = new MouseRotate(r);
        behavior2.setFactor(-0.002, 0.0);
        bg.addChild(behavior2);
        behavior2.setSchedulingBounds(BoardModel.bounds);

        bg.addChild(f);

        return bg;
View Full Code Here

        MouseRotate behavior2 = new MouseRotate(r);
        behavior2.setFactor(-0.002, 0.0);
        bg.addChild(behavior2);
        behavior2.setSchedulingBounds(BoardModel.bounds);

        bg.addChild(f);

        return bg;
    }

    public void transformChanged(int type, Transform3D trans) {
View Full Code Here

//*** The root of the scenegraph. ***
    BranchGroup theScene = new BranchGroup();

    //Add the tetrahedron to the scene.
    theScene.addChild(tgTetrahedron);

    theScene.compile();

    //Add everything to the universe.
    su.addBranchGraph(theScene);
View Full Code Here

    Vector3f lightDir2  = new Vector3f(1.0f,0.0f,0.5f);
    DirectionalLight light2 = new DirectionalLight(lightColour1, lightDir2);
    light2.setInfluencingBounds(bounds);


    bgLight.addChild(light1);
    bgLight.addChild(light2);

    su.addBranchGraph(bgLight);
  }
View Full Code Here

    DirectionalLight light2 = new DirectionalLight(lightColour1, lightDir2);
    light2.setInfluencingBounds(bounds);


    bgLight.addChild(light1);
    bgLight.addChild(light2);

    su.addBranchGraph(bgLight);
  }

View Full Code Here

    tgAll.addChild(tgSphere);
    tgAll.addChild(tgmCyl);
    KeyNavigatorBehavior knb = new KeyNavigatorBehavior(tgAll);
    knb.setSchedulingBounds(bounds);
    tgAll.addChild(knb);
    theScene.addChild(tgAll);

    //The PickTranslateBehavior for moving the blue cube.
    PickTranslateBehavior pickTrans = new PickTranslateBehavior(theScene,myCanvas3D,bounds);
    theScene.addChild(pickTrans);
View Full Code Here

    tgAll.addChild(knb);
    theScene.addChild(tgAll);

    //The PickTranslateBehavior for moving the blue cube.
    PickTranslateBehavior pickTrans = new PickTranslateBehavior(theScene,myCanvas3D,bounds);
    theScene.addChild(pickTrans);



    //This class takes care of changing the colour of the sphere when the cube touches it.
    CollisionBehaviour1 scb1 = new CollisionBehaviour1(colourSwitch,bounds);
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.