Package javax.vecmath

Examples of javax.vecmath.Color3f


//*** The platform on which the helicopter stands ***
//*** and its transformation group.               ***

    //An Appearance to make the platform red.
    Appearance redApp = new Appearance();
    setToMyDefaultAppearance(redApp,new Color3f(0.8f,0.0f,0.0f));


    //Half edge length of the cube that represents the platform.
    float platformSize = 0.1f;

    //Generate the platform in the form of a cube.
    Box platform = new Box(platformSize,platformSize,platformSize,redApp);

    //A transformation rotating the platform a little bit.
    Transform3D tfPlatform = new Transform3D();
    tfPlatform.rotY(Math.PI/6);

    //The transformation group of the platform.
    TransformGroup tgPlatform = new TransformGroup(tfPlatform);
    tgPlatform.addChild(platform);





//*** The cockpit of the helicopter. ****

    //An Appearance to make the cockpit green.
    Appearance greenApp = new Appearance();
    setToMyDefaultAppearance(greenApp,new Color3f(0.0f,0.7f,0.0f));

    //The following lines enforce that objects with the
    //Appearance greenApp wil be displayed as wire frame models.
    PolygonAttributes polygAttr = new PolygonAttributes();
    polygAttr.setPolygonMode(PolygonAttributes.POLYGON_LINE);
    greenApp.setPolygonAttributes(polygAttr);



    //Radius of the cockpit.
    float cabinRadius = 0.1f;

    //Generate the cockpit in the form of a sphere.
    Sphere cabin = new Sphere(cabinRadius,greenApp);

    //The transformation group for the cockpit.
    //The cockpit first remains in the origin. Later on, the whole
    //helicopter is shifted onto the platform.
    TransformGroup tgCabin = new TransformGroup();
    tgCabin.addChild(cabin);


//*** The rotor blade of the helicopter. ***

    //An Appearance to make the rotor blade blue.
    Appearance blueApp = new Appearance();
    setToMyDefaultAppearance(blueApp,new Color3f(0.0f,0.0f,1.0f));

    //Generate the rotor blade in the form of a (very thin and long) box.
    Box rotor = new Box(0.4f,0.0001f,0.01f,blueApp);

    //A transformation placing the rotor blade on top of the cockpit.
    Transform3D tfRotor = new Transform3D();
    tfRotor.setTranslation(new Vector3f(0.0f,cabinRadius,0.0f));

    //The transformation group for the rotor blade.
    TransformGroup tgRotor = new TransformGroup(tfRotor);
    tgRotor.addChild(rotor);


//*** The tail of the helicopter. ***

    //Length of the tail.
    float halfTailLength = 0.2f;

    //Generate the tail in form of a green box.
    Box tail = new Box(halfTailLength,0.02f,0.02f,greenApp);

    //A transformation placing the tail at the end of the cockpit.
    Transform3D tfTail = new Transform3D();
    tfTail.setTranslation(new Vector3f(cabinRadius+halfTailLength,0.0f,0.0f));

    //The transformation group for the tail.
    TransformGroup tgTail = new TransformGroup(tfTail);
    tgTail.addChild(tail);



//*** The helicopter, assembled by the transformation groups  ***
//*** for the cockpit, the rotor blade and the tail.          ***
//*** Afterwards, the helicopter must be lifted onto the      ***
//*** platform.                                               ***

    //The transformation placing the helicopter on top of the platform.
    Transform3D tfHelicopter = new Transform3D();
    tfHelicopter.setTranslation(new Vector3f(0.0f,platformSize+cabinRadius,0.0f));

    //The transformation group for the helicopter.
    TransformGroup tgHelicopter = new TransformGroup(tfHelicopter);
    tgHelicopter.addChild(tgCabin);
    tgHelicopter.addChild(tgRotor);
    tgHelicopter.addChild(tgTail);


//*** The helicopter and the platform are joint together in one    ***
//*** transformation group in order to place them together         ***
//*** in the scene.                                                ***

    //The transformation for positioning the helicopter
    //together with the platform.
    Transform3D tfHeliPlat = new Transform3D();
    tfHeliPlat.setTranslation(new Vector3f(0.0f,0.1f,0.0f));

    //The transformation group for the helicopter together with the platform.
    TransformGroup tgHeliPlat = new TransformGroup(tfHeliPlat);
    tgHeliPlat.addChild(tgHelicopter);
    tgHeliPlat.addChild(tgPlatform);



//*** The tree trunk. ***

    //An Appearance to make the tree trunk brown.
    Appearance brownApp = new Appearance();
    setToMyDefaultAppearance(brownApp,new Color3f(0.5f,0.2f,0.2f));

    //Height of the tree trunk.
    float trunkHeight = 0.4f;

    //Generate the tree trunk as a cylinder.
    Cylinder trunk = new Cylinder(0.05f,trunkHeight,brownApp);

    //The transformation group of the tree trunk. The tree trunk first
    //remains in the origin and is placed in the scene together with the
    //leaves.
    TransformGroup tgTrunk = new TransformGroup();
    tgTrunk.addChild(trunk);


//*** The treetop. ***

    //Height of the treetop.
    float leavesHeight = 0.4f;

    //Generate the treetop in the form of a green cone.
    Cone leaves = new Cone(0.3f,leavesHeight,greenApp);

    //A transformation to place the treetop on top of the tree trunk.
    Transform3D tfLeaves = new Transform3D();
    tfLeaves.setTranslation(new Vector3f(0.0f,(trunkHeight+leavesHeight)/2,0.0f));

    //The transformation group of the treetop.
    TransformGroup tgLeaves = new TransformGroup(tfLeaves);
    tgLeaves.addChild(leaves);


//*** The tree assembled from the transformation groups for     ***
//*** the tree trunk and the treetop.                           ***

    //A transformation for positioning the tree in the scene.
    Transform3D tfTree = new Transform3D();
    tfTree.setTranslation(new Vector3f(-0.6f,0.0f,0.0f));

    //The transformation group of the tree.
    TransformGroup tgTree = new TransformGroup(tfTree);
    tgTree.addChild(tgTrunk);
    tgTree.addChild(tgLeaves);


//*** 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));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);


View Full Code Here


  {

    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);
View Full Code Here

//*** The platform on which the helicopter stands ***
//*** and its transformation group.               ***

    //An Appearance to make the platform red.
    Appearance redApp = new Appearance();
    setToMyDefaultAppearance(redApp,new Color3f(0.8f,0.0f,0.0f));


    //Half edge length of the cube that represents the platform.
    float platformSize = 0.1f;

    //Generate the platform in the form of a cube.
    Box platform = new Box(platformSize,platformSize,platformSize,redApp);

    //A transformation rotating the platform a little bit.
    Transform3D tfPlatform = new Transform3D();
    tfPlatform.rotY(Math.PI/6);

    //The transformation group of the platform.
    TransformGroup tgPlatform = new TransformGroup(tfPlatform);
    tgPlatform.addChild(platform);





//***  The cockpit of the helicopter. ****

    //An Appearance to make the cockpit green.
    Appearance greenApp = new Appearance();
    setToMyDefaultAppearance(greenApp,new Color3f(0.0f,0.7f,0.0f));

    //Radius of the cockpit.
    float cabinRadius = 0.1f;

    //Generate the cockpit in the form of a sphere.
    Sphere cabin = new Sphere(cabinRadius,greenApp);

    //The transformation group for the cockpit.
    //The cockpit first remains in the origin. Later on, the whole
    //helicopter is shifted onto the platform.
    TransformGroup tgCabin = new TransformGroup();
    tgCabin.addChild(cabin);


//*** The rotor blade of the helicopter. ***

    //An Appearance to make the rotor blade blue.
    Appearance blueApp = new Appearance();
    setToMyDefaultAppearance(blueApp,new Color3f(0.0f,0.0f,1.0f));

    //Generate the rotor blade in the form of a (very thin and long) box.
    Box rotor = new Box(0.4f,0.0001f,0.01f,blueApp);

    //A transformation placing the rotor blade on top of the cockpit.
    Transform3D tfRotor = new Transform3D();
    tfRotor.setTranslation(new Vector3f(0.0f,cabinRadius,0.0f));

    //The transformation group for the rotor blade.
    TransformGroup tgRotor = new TransformGroup(tfRotor);
    tgRotor.addChild(rotor);


//*** The tail of the helicopter. ***

    //Length of the tail.
    float halfTailLength = 0.2f;

    //Generate the tail in form of a green box.
    Box tail = new Box(halfTailLength,0.02f,0.02f,greenApp);

    //A transformation placing the tail at the end of the cockpit.
    Transform3D tfTail = new Transform3D();
    tfTail.setTranslation(new Vector3f(cabinRadius+halfTailLength,0.0f,0.0f));

    //The transformation group for the tail.
    TransformGroup tgTail = new TransformGroup(tfTail);
    tgTail.addChild(tail);



//*** The helicopter, assembled by the transformation groups  ***
//*** for the cockpit, the rotor blade and the tail.          ***
//*** Afterwards, the helicopter must be lifted onto the      ***
//*** platform.                                               ***

    //The transformation placing the helicopter on top of the platform.
    Transform3D tfHelicopter = new Transform3D();
    tfHelicopter.setTranslation(new Vector3f(0.0f,platformSize+cabinRadius,0.0f));

    //The transformation group for the helicopter.
    TransformGroup tgHelicopter = new TransformGroup(tfHelicopter);
    tgHelicopter.addChild(tgCabin);
    tgHelicopter.addChild(tgRotor);
    tgHelicopter.addChild(tgTail);


//*** The helicopter and the platform are joint together in one    ***
//*** transformation group in order to place them together         ***
//*** in the scene.                                                ***

    //The transformation for positioning the helicopter
    //together with the platform.
    Transform3D tfHeliPlat = new Transform3D();
    tfHeliPlat.setTranslation(new Vector3f(0.0f,0.1f,0.0f));

    //The transformation group for the helicopter together with the platform.
    TransformGroup tgHeliPlat = new TransformGroup(tfHeliPlat);
    tgHeliPlat.addChild(tgHelicopter);
    tgHeliPlat.addChild(tgPlatform);



//*** The tree trunk. ***

    //An Appearance to make the tree trunk brown.
    Appearance brownApp = new Appearance();
    setToMyDefaultAppearance(brownApp,new Color3f(0.5f,0.2f,0.2f));

    //Height of the tree trunk.
    float trunkHeight = 0.4f;

    //Generate the tree trunk as a cylinder.
    Cylinder trunk = new Cylinder(0.05f,trunkHeight,brownApp);

    //The transformation group of the tree trunk. The tree trunk first
    //remains in the origin and is placed in the scene together with the
    //leaves.
    TransformGroup tgTrunk = new TransformGroup();
    tgTrunk.addChild(trunk);


//*** The treetop. ***

    //Height of the treetop.
    float leavesHeight = 0.4f;

    //Generate the treetop in the form of a green cone.
    Cone leaves = new Cone(0.3f,leavesHeight,greenApp);

    //A transformation to place the treetop on top of the tree trunk.
    Transform3D tfLeaves = new Transform3D();
    tfLeaves.setTranslation(new Vector3f(0.0f,(trunkHeight+leavesHeight)/2,0.0f));

    //The transformation group of the treetop.
    TransformGroup tgLeaves = new TransformGroup(tfLeaves);
    tgLeaves.addChild(leaves);


//*** The tree assembled from the transformation groups for     ***
//*** the tree trunk and the treetop.                           ***

    //A transformation for positioning the tree in the scene.
    Transform3D tfTree = new Transform3D();
    tfTree.setTranslation(new Vector3f(-0.6f,0.0f,0.0f));

    //The transformation group of the tree.
    TransformGroup tgTree = new TransformGroup(tfTree);
    tgTree.addChild(tgTrunk);
    tgTree.addChild(tgLeaves);


//*** 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));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);


View Full Code Here

  {

    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);
View Full Code Here

  {

    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);
View Full Code Here

  {

    BranchGroup theScene = new BranchGroup();

    //Generate a sphere.
    Color3f ambientColourBSphere = new Color3f(0.0f,0.0f,0.0f);
    Color3f emissiveColourBSphere = new Color3f(0.0f,0.0f,0.0f);
    Color3f diffuseColourBSphere = new Color3f(0.9f,0.9f,0.9f);
    Color3f specularColourBSphere = new Color3f(0.9f,0.9f,0.9f);
    float shininessBSphere = 128.0f;

    Appearance bSphereApp = new Appearance();

    bSphereApp.setMaterial(new Material(ambientColourBSphere,
                                        emissiveColourBSphere,
                                        diffuseColourBSphere,
                                        specularColourBSphere,
                                        shininessBSphere));

    Sphere bSphere = new Sphere(0.1f,bSphereApp);


    //Assign the sphere to a SharedGroup to use it multiple
    //times in the scene.
    SharedGroup sgSphere = new SharedGroup();
    sgSphere.addChild(bSphere);



    //Generate a two-dimensional array of rows*columns spheres.
    //rowStep and columnStep define the distance between the spheres.
    int rows = 40;
    float rowStep = 0.25f;
    int columns = 20;
    float columnStep = 0.3f;

    TransformGroup[][] tgArray = new TransformGroup[rows][columns];
    Transform3D[][] tfArray = new Transform3D[rows][columns];

    for (int i=0; i<rows; i++)
    {
      for (int j=0; j<columns; j++)
      {
        tfArray[i][j] = new Transform3D();
        tfArray[i][j].setTranslation(new Vector3f(i*columnStep-2.0f,j*0.1f-0.5f,-j*rowStep));
        tgArray[i][j] = new TransformGroup(tfArray[i][j]);
        tgArray[i][j].addChild(new Link(sgSphere));
        theScene.addChild(tgArray[i][j]);
      }
    }




    //Generate a background in the colour of the fog.
    Color3f fogColour = new Color3f(0.5f,0.5f,0.5f);
    Background bg = new Background(fogColour);
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);

View Full Code Here

  {

    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);
View Full Code Here

//*** The platform on which the helicopter stands ***
//*** and its transformation group.               ***

    //An Appearance to make the platform red.
    Appearance redApp = new Appearance();
    setToMyDefaultAppearance(redApp,new Color3f(0.8f,0.0f,0.0f));


    //Half edge length of the cube that represents the platform.
    float platformSize = 0.1f;

    //Generate the platform in the form of a cube.
    Box platform = new Box(platformSize,platformSize,platformSize,redApp);

    //A transformation rotating the platform a little bit.
    Transform3D tfPlatform = new Transform3D();
    tfPlatform.rotY(Math.PI/6);

    //The transformation group of the platform.
    TransformGroup tgPlatform = new TransformGroup(tfPlatform);
    tgPlatform.addChild(platform);





//*** The cockpit of the helicopter. ****

    //An Appearance to make the cockpit green.
    Appearance greenApp = new Appearance();
    setToMyDefaultAppearance(greenApp,new Color3f(0.0f,0.7f,0.0f));

    //Radius of the cockpit.
    float cabinRadius = 0.1f;

    //Generate the cockpit in the form of a sphere.
    Sphere cabin = new Sphere(cabinRadius,greenApp);

    //The transformation group for the cockpit.
    //The cockpit first remains in the origin. Later on, the whole
    //helicopter is shifted onto the platform.
    TransformGroup tgCabin = new TransformGroup();
    tgCabin.addChild(cabin);


//*** The rotor blade of the helicopter. ***

    //An Appearance to make the rotor blade blue.
    Appearance blueApp = new Appearance();
    setToMyDefaultAppearance(blueApp,new Color3f(0.0f,0.0f,1.0f));

    //Generate the rotor blade in the form of a (very thin and long) box.
    Box rotor = new Box(0.4f,0.0001f,0.01f,blueApp);

    //A transformation placing the rotor blade on top of the cockpit.
    Transform3D tfRotor = new Transform3D();
    tfRotor.setTranslation(new Vector3f(0.0f,cabinRadius,0.0f));

    //The transformation group for the rotor blade.
    TransformGroup tgRotor = new TransformGroup(tfRotor);
    tgRotor.addChild(rotor);


//*** The tail of the helicopter. ***

    //Length of the tail.
    float halfTailLength = 0.2f;

    //Generate the tail in form of a green box.
    Box tail = new Box(halfTailLength,0.02f,0.02f,greenApp);

    //A transformation placing the tail at the end of the cockpit.
    Transform3D tfTail = new Transform3D();
    tfTail.setTranslation(new Vector3f(cabinRadius+halfTailLength,0.0f,0.0f));

    //The transformation group for the tail.
    TransformGroup tgTail = new TransformGroup(tfTail);
    tgTail.addChild(tail);



//*** The helicopter, assembled by the transformation groups  ***
//*** for the cockpit, the rotor blade and the tail.          ***
//*** Afterwards, the helicopter must be lifted onto the      ***
//*** platform.                                               ***

    //The transformation placing the helicopter on top of the platform.
    Transform3D tfHelicopter = new Transform3D();
    tfHelicopter.setTranslation(new Vector3f(0.0f,platformSize+cabinRadius,0.0f));

    //The transformation group for the helicopter.
    TransformGroup tgHelicopter = new TransformGroup(tfHelicopter);
    tgHelicopter.addChild(tgCabin);
    tgHelicopter.addChild(tgRotor);
    tgHelicopter.addChild(tgTail);


//*** The helicopter and the platform are joint together in one    ***
//*** transformation group in order to place them together         ***
//*** in the scene.                                                ***
    //The transformation for positioning the helicopter
    //together with the platform.
    Transform3D tfHeliPlat = new Transform3D();
    tfHeliPlat.setTranslation(new Vector3f(0.0f,0.1f,0.0f));

    //The transformation group for the helicopter together with the platform.
    TransformGroup tgHeliPlat = new TransformGroup(tfHeliPlat);
    tgHeliPlat.addChild(tgHelicopter);
    tgHeliPlat.addChild(tgPlatform);



//*** The tree trunk. ***

    //An Appearance to make the tree trunk brown.
    Appearance brownApp = new Appearance();
    setToMyDefaultAppearance(brownApp,new Color3f(0.5f,0.2f,0.2f));

    //Height of the tree trunk.
    float trunkHeight = 0.4f;

    //Generate the tree trunk as a cylinder.
    Cylinder trunk = new Cylinder(0.05f,trunkHeight,brownApp);

    //The transformation group of the tree trunk. The tree trunk first
    //remains in the origin and is placed in the scene together with the
    //leaves.
    TransformGroup tgTrunk = new TransformGroup();
    tgTrunk.addChild(trunk);


//*** The treetop. ***

    //Height of the treetop.
    float leavesHeight = 0.4f;

    //Generate the treetop in the form of a green cone.
    Cone leaves = new Cone(0.3f,leavesHeight,greenApp);

    //A transformation to place the treetop on top of the tree trunk.
    Transform3D tfLeaves = new Transform3D();
    tfLeaves.setTranslation(new Vector3f(0.0f,(trunkHeight+leavesHeight)/2,0.0f));

    //The transformation group of the treetop.
    TransformGroup tgLeaves = new TransformGroup(tfLeaves);
    tgLeaves.addChild(leaves);


//*** The tree assembled from the transformation groups for     ***
//*** the tree trunk and the treetop.                           ***

    //A transformation for positioning the tree in the scene.
    Transform3D tfTree = new Transform3D();
    tfTree.setTranslation(new Vector3f(-0.6f,0.0f,0.0f));

    //The transformation group of the tree.
    TransformGroup tgTree = new TransformGroup(tfTree);
    tgTree.addChild(tgTrunk);
    tgTree.addChild(tgLeaves);


//*** 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));
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0),Double.MAX_VALUE);
    bg.setApplicationBounds(bounds);
    theScene.addChild(bg);


View Full Code Here

  {

    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);
View Full Code Here

  }
 
  private void createSceneGraph() {
      parent = new BranchGroup();
     
      ciel = new Background(new Color3f(0.9f, 0.9f, 1.0f));
      ciel.setCapability(Background.ALLOW_COLOR_WRITE);
      ciel.setApplicationBounds(new BoundingSphere(new Point3d(0, 0, 0), 80));
      parent.addChild(ciel);
     
      parent.addChild(new ColorCube(0.4));
     
      TransformGroup tg = new TransformGroup();
      Transform3D translation;
      translation = new Transform3D();
      translation.setTranslation(new Vector3f (0, 0, 20));
      tg.setTransform(translation);
      Sphere sphere = new Sphere(1.2f);
      sphere.getAppearance().setColoringAttributes(new ColoringAttributes(0.1f, 0.8f, 0.8f, ColoringAttributes.NICEST));
      tg.addChild(sphere);
      parent.addChild(tg);
     
      TransformGroup tg2 = new TransformGroup();
      Transform3D translation2;
      translation2 = new Transform3D();
      translation2.setTranslation(new Vector3f (0, 0, -20));
      tg2.setTransform(translation2);
      Box box = new Box();
      tg2.addChild(box);
      parent.addChild(tg2);
     
      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();
View Full Code Here

TOP

Related Classes of javax.vecmath.Color3f

Copyright © 2018 www.massapicom. 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.