Examples of Sphere


Examples of com.sun.j3d.utils.geometry.Sphere

    Appearance bSphereApp = new Appearance();

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

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

    //The UserData are needed in order to identify the sphere when it is picked.
    bSphere.setUserData("sphere");

    Transform3D tfBSphere = new Transform3D();
    tfBSphere.setTranslation(new Vector3f(2.0f,0.0f,-10.5f));
    TransformGroup tgBSphere = new TransformGroup(tfBSphere);
    tgBSphere.addChild(bSphere);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

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

    //The sphere.
    Sphere bSphere = new Sphere(0.4f,bSphereApp);

    //The transformation group for the sphere.
    Transform3D tfBSphere = new Transform3D();
    tfBSphere.setTranslation(new Vector3f(0.0f,2.7f,-10.5f));
    TransformGroup tgBSphere = new TransformGroup(tfBSphere);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

    float boxHL = 0.7f*r; //Half the vertex length of the cube.
    float shift = 3.0f*r; //Distance between cube and sphere.


//*** The sphere and its transformation group ***
    Sphere s = new Sphere(r,Sphere.GENERATE_NORMALS,100,shadedApp);
    Transform3D tfSphere = new Transform3D();
    tfSphere.setTranslation(new Vector3f(-0.95f+r,0.0f,0.0f));
    TransformGroup tgSphere = new TransformGroup(tfSphere);
    tgSphere.addChild(s);
    theScene.addChild(tgSphere);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

    //Generate the sphere, their transformations and their
    //transformation groups. Add everyting to the scene.
    for (int i=0; i<n; i++)
    {
      spheres[i] = new Sphere(r,Sphere.GENERATE_NORMALS,4+i*i*i,sphereApp);
      tf[i] = new Transform3D();
      tf[i].setTranslation(new Vector3f(-0.95f+r+shift*i,0.0f,0.0f));
      tg[i] = new TransformGroup(tf[i]);
      tg[i].addChild(spheres[i]);
      theScene.addChild(tg[i]);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

    float boxHL = 0.7f*r; //Half the vertex length of the cube.
    float shift = 3.0f*r; //Distance between cube and sphere.


//*** The sphere and its transformation group ***
    Sphere s = new Sphere(r,Sphere.GENERATE_NORMALS,100,shadedApp);
    Transform3D tfSphere = new Transform3D();
    tfSphere.setTranslation(new Vector3f(-0.95f+r,0.0f,0.0f));
    TransformGroup tgSphere = new TransformGroup(tfSphere);
    tgSphere.addChild(s);
    theScene.addChild(tgSphere);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

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

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

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

Examples of com.sun.j3d.utils.geometry.Sphere

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

Examples of com.sun.j3d.utils.geometry.Sphere

    //Generate the sphere, their transformations and their
    //transformation groups. Add everyting to the scene.
    for (int i=0; i<n; i++)
    {
      spheres[i] = new Sphere(r,Sphere.GENERATE_NORMALS,4+i*i*i,sphereApp);
      tf[i] = new Transform3D();
      tf[i].setTranslation(new Vector3f(-0.95f+r+shift*i,0.0f,0.0f));
      tg[i] = new TransformGroup(tf[i]);
      tg[i].addChild(spheres[i]);
      theScene.addChild(tg[i]);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

        if (_changesAllowedNow) {
            scale = 1.0;
        }

        _containedNode = new Sphere((float) scale, primitiveFlags,
                divisionsValue, _appearance);

        if (_changesAllowedNow) {
            TransformGroup scaler = new TransformGroup();
            scaler.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
View Full Code Here

Examples of com.sun.j3d.utils.geometry.Sphere

        } else {
            _iterationSynchronized = false;
        }

        if (_shouldShowAxes()) {
            Sphere origin = new Sphere((float) 0.05);
            _userTransformation.addChild(origin);

            Cylinder yAxis = new Cylinder((float) 0.01, (float) 6.0);
            _userTransformation.addChild(yAxis);
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.