Package javax.media.j3d

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


    //Generate exponential fog.
    ExponentialFog fog = new ExponentialFog(fogColour,6.0f);
    fog.setInfluencingBounds(bounds);

    theScene.addChild(fog);

    theScene.compile();

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


    Color3f lightColour1 = new Color3f(1.0f,1.0f,1.0f);
    Vector3f lightDir1  = new Vector3f(-1.0f,0.0f,-0.5f);
    DirectionalLight light1 = new DirectionalLight(lightColour1, lightDir1);
    light1.setInfluencingBounds(bounds);

    bgLight.addChild(light1);


    su.addBranchGraph(bgLight);

  }
View Full Code Here

    TransformGroup tgBSphere = new TransformGroup(tfBSphere);
    tgBSphere.addChild(tgmBSphere);

    //Create the root of the scene graph and add the box and the sphere group.
    BranchGroup theScene = new BranchGroup();;
    theScene.addChild(tgFBox);
    theScene.addChild(tgBSphere);


    //Define the data for the picking interaction and add the picking to the
    //scene graph.
View Full Code Here

    tgBSphere.addChild(tgmBSphere);

    //Create the root of the scene graph and add the box and the sphere group.
    BranchGroup theScene = new BranchGroup();;
    theScene.addChild(tgFBox);
    theScene.addChild(tgBSphere);


    //Define the data for the picking interaction and add the picking to the
    //scene graph.
    Alpha[] alphas = new Alpha[3];
View Full Code Here

    Color3f lightColour1 = new Color3f(1.0f,1.0f,1.0f);
    Vector3f lightDir1  = new Vector3f(-1.0f,0.0f,-0.5f);
    DirectionalLight light1 = new DirectionalLight(lightColour1, lightDir1);
    light1.setInfluencingBounds(bounds);

    bgLight.addChild(light1);


    Vector3f lightDir2  = new Vector3f(0.0f,0.0f,-1.0f);
    DirectionalLight light2 = new DirectionalLight(lightColour1, lightDir2);
    light2.setInfluencingBounds(bounds);
View Full Code Here

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

    bgLight.addChild(light2);



    su.addBranchGraph(bgLight);
View Full Code Here

//*** The root of the graph containing the scene. ***
    BranchGroup theScene = new BranchGroup();


    //Add the helicopter and the tree to the scene.
    theScene.addChild(tgHeliPlat);
    theScene.addChild(tgTree);


    //The following four lines generate a white background.
    Background bg = new Background(new Color3f(1.0f,1.0f,1.0f));
View Full Code Here

    BranchGroup theScene = new BranchGroup();


    //Add the helicopter and the tree to the scene.
    theScene.addChild(tgHeliPlat);
    theScene.addChild(tgTree);


    //The following four lines generate a white background.
    Background bg = new Background(new Color3f(1.0f,1.0f,1.0f));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
View Full Code Here

    //The following four lines generate a white background.
    Background bg = new Background(new Color3f(1.0f,1.0f,1.0f));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);


    theScene.compile();

    //Add the scene to the universe.
View Full Code Here

    Color3f lightColour1 = new Color3f(1.0f,1.0f,1.0f);
    Vector3f lightDir1  = new Vector3f(-1.0f,0.0f,-0.5f);
    DirectionalLight light1 = new DirectionalLight(lightColour1, lightDir1);
    light1.setInfluencingBounds(bounds);

    bgLight.addChild(light1);
    su.addBranchGraph(bgLight);
  }


}
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.