Examples of DirectionalLight


Examples of javax.media.j3d.DirectionalLight

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);

    //Directional light.
    Color3f lightColour1 = new Color3f(1.0f,1.0f,1.0f);
    Vector3f lightDir1  = new Vector3f(0.0f,0.0f,-0.1f);
    DirectionalLight light1 = new DirectionalLight(lightColour1, lightDir1);
    light1.setInfluencingBounds(bounds);

    bgLight.addChild(light1);


    //Ambient light.
View Full Code Here

Examples of javax.media.j3d.DirectionalLight

    BranchGroup bgLight = new BranchGroup();

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    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

Examples of javax.media.j3d.DirectionalLight

    BranchGroup bgLight = new BranchGroup();

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    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

Examples of javax.media.j3d.DirectionalLight

    BranchGroup bgLight = new BranchGroup();

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    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

Examples of javax.media.j3d.DirectionalLight

    BranchGroup bgLight = new BranchGroup();

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    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

Examples of javax.media.j3d.DirectionalLight

    BranchGroup bgLight = new BranchGroup();

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), Double.MAX_VALUE);
    Color3f lightColour1 = new Color3f(1.0f,1.0f,1.0f);
    Vector3f lightDir1  = new Vector3f(0.2f,-0.1f,-1.0f);
    DirectionalLight light1 = new DirectionalLight(lightColour1, lightDir1);
    light1.setInfluencingBounds(bounds);

    bgLight.addChild(light1);


    su.addBranchGraph(bgLight);
View Full Code Here

Examples of javax.media.j3d.DirectionalLight

      AmbientLight light = new AmbientLight(new Color3f(0.5f, 0.5f, 0.5f));
      //light.setColor(new Color3f(0.5f, 0.5f, 0.5f));
      light.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      parent.addChild(light);
     
      soleil = new DirectionalLight();
      soleil.setDirection(new Vector3f(0.1f, 0.1f, -0.5f));
      //light.setColor(new Color3f(0.5f, 0.5f, 0.5f));
      soleil.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      parent.addChild(soleil);
    }
View Full Code Here

Examples of javax.media.j3d.DirectionalLight

      voiture1tg.addChild(box);
      voiture1.addChild(voiture1tg);
      voiture1.compile();
      simpleU.addBranchGraph(voiture1);*/
     
      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();
View Full Code Here

Examples of javax.media.j3d.DirectionalLight

      Appearance boxAppear = new Appearance();
      boxAppear.setColoringAttributes(ca);*/
      //Box box = new Box(x, y, z, boxAppear);
      //Box box = new Box();
     
      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();
View Full Code Here

Examples of javax.media.j3d.DirectionalLight

    BranchGroup bgLight = new BranchGroup();

    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), Double.MAX_VALUE);
    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);


    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);
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.