Package javax.media.j3d

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


        gi.recomputeIndices();

        surface.setAppearance(CreateurVoiture.createMaterialAppearance());
        surface.setGeometry(gi.getGeometryArray());
   
    bg.addChild(surface);
    simpleU.addBranchGraph(bg);
    //System.out.println(frontiere.size() +" pts traces");
  }
 
  public void creerVoiture1(float x, float y, float z){
View Full Code Here


     
      DirectionalLight light2 = new DirectionalLight();
      light2.setDirection(new Vector3f(0.1f, -0.5f, 0.1f));
      //light.setColor(new Color3f(0.5f, 0.5f, 0.5f));
      light2.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      voiture1.addChild(light2);
     
      voiture1tg.addChild(CreateurVoiturePeugeot.creerForme(true));
      voiture1.addChild(voiture1tg);
      voiture1.compile();
      simpleU.addBranchGraph(voiture1);
View Full Code Here

      //light.setColor(new Color3f(0.5f, 0.5f, 0.5f));
      light2.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      voiture1.addChild(light2);
     
      voiture1tg.addChild(CreateurVoiturePeugeot.creerForme(true));
      voiture1.addChild(voiture1tg);
      voiture1.compile();
      simpleU.addBranchGraph(voiture1);
  }
 
  public void creerVoiture2(float x, float y, float z){
View Full Code Here

     
      DirectionalLight light2 = new DirectionalLight();
      light2.setDirection(new Vector3f(0.1f, -0.5f, 0.1f));
      //light.setColor(new Color3f(0.5f, 0.5f, 0.5f));
      light2.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      voiture2.addChild(light2);
     
      voiture2tg.addChild(CreateurVoiturePeugeot.creerForme(false));
      voiture2.addChild(voiture2tg);
      voiture2.compile();
      simpleU.addBranchGraph(voiture2);
View Full Code Here

      //light.setColor(new Color3f(0.5f, 0.5f, 0.5f));
      light2.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      voiture2.addChild(light2);
     
      voiture2tg.addChild(CreateurVoiturePeugeot.creerForme(false));
      voiture2.addChild(voiture2tg);
      voiture2.compile();
      simpleU.addBranchGraph(voiture2);
  }
 
  public void deplacerVoiture1(float x, float y, float z, float theta, float phi) {
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

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

    //Generate the scenegraph.
    BranchGroup theScene = new BranchGroup();
    theScene.addChild(tgFBox);
    theScene.addChild(tgBSphere);


    //Definition of the parameters for picking. Generate the PickingBehaviour
    //and add it to the scene.
View Full Code Here

    tgBSphere.addChild(tgmBSphere);

    //Generate the scenegraph.
    BranchGroup theScene = new BranchGroup();
    theScene.addChild(tgFBox);
    theScene.addChild(tgBSphere);


    //Definition of the parameters for picking. Generate the PickingBehaviour
    //and add it to the scene.
    Alpha[] alphas = new Alpha[3];
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.