Examples of Torus


Examples of com.jme.scene.shape.Torus

    normBuf.put( 0 ).put( 1 ).put( 0 );
    normBuf.put( 0 ).put( 1 ).put( 0 );
    normBuf.put( 0 ).put( 1 ).put( 0 );
    normBuf.put( 0 ).put( 1 ).put( 0 );

    Torus torus = new Torus( "Torus", 50, 50, 10, 20 );
    torus.setLocalTranslation( new Vector3f( 50, -5, 20 ) );
   
    waterEffectRenderPass.setWaterEffectOnSpatial( torus );
    rootNode.attachChild( torus );

    createDebugQuads();
View Full Code Here

Examples of com.jme.scene.shape.Torus

  }

  private Node createObjects() {
    Node objects = new Node( "objects" );

    Torus torus = new Torus( "Torus", 50, 50, 10, 20 );
    torus.setLocalTranslation( new Vector3f( 50, -5, 20 ) );
    TextureState ts = display.getRenderer().createTextureState();
    Texture t0 = TextureManager.loadTexture(
        TestSimpleQuadWater.class.getClassLoader().getResource(
            "jmetest/data/images/Monkey.jpg" ),
        Texture.MM_LINEAR_LINEAR,
        Texture.FM_LINEAR );
    Texture t1 = TextureManager.loadTexture(
        TestSimpleQuadWater.class.getClassLoader().getResource(
            "jmetest/data/texture/north.jpg" ),
        Texture.MM_LINEAR_LINEAR,
        Texture.FM_LINEAR );
    t1.setEnvironmentalMapMode( Texture.EM_SPHERE );
    ts.setTexture( t0, 0 );
    ts.setTexture( t1, 1 );
    ts.setEnabled( true );
    torus.setRenderState( ts );
    objects.attachChild( torus );

    ts = display.getRenderer().createTextureState();
    t0 = TextureManager.loadTexture(
        TestSimpleQuadWater.class.getClassLoader().getResource(
View Full Code Here

Examples of com.jme.scene.shape.Torus

public class TestVBO extends SimpleGameWithMonitor {
    private Geometry s;
    private Random r = FastMath.rand;
    @Override
    protected void simpleInitGame() {
        s = new Torus("sphere", 10, 10, 5,6);
        rootNode.attachChild(s);

    }
View Full Code Here

Examples of com.jme.scene.shape.Torus

        triMesh[0].setModelBound(new BoundingSphere());
        subNode[1] = new Node("boxes");
        triMesh[1] = new Box("box", new Vector3f(0, 0, 0), 5, 5, 5);
        triMesh[1].setModelBound(new BoundingBox());
        subNode[2] = new Node("toruses");
        triMesh[2] = new Torus("torus", 10, 10, 2, 3);
        triMesh[2].setModelBound(new BoundingBox());
        subNode[3] = new Node("cylinders");
        triMesh[3] = new Cylinder("cylinder", 10, 10, 2, 3, true);
        triMesh[3].setModelBound(new BoundingBox());
        subNode[4] = new Node("pyramids");
View Full Code Here

Examples of com.jme.scene.shape.Torus

        // nastavim hedou jako pozadi sceny pro lepsi rozliseni pruhlednosti na testovanem boxu
        display.getRenderer().setBackgroundColor(ColorRGBA.brown);

        // vrznu doprostred sceny torus aby byla dobre videt pruhlednost na testovanem boxu
        Torus torus = new Torus("torus", 20, 50, 2, 3);
        rootNode.attachChild(torus);

        // testovany box
        box = new Box("box", Vector3f.ZERO, 10, 10, 10);
View Full Code Here

Examples of com.jme.scene.shape.Torus

public class TestVBO extends SimpleGameWithMonitor {
    private Geometry s;
    private Random r = FastMath.rand;
    @Override
    protected void simpleInitGame() {
        s = new Torus("sphere", 10, 10, 5,6);
        rootNode.attachChild(s);

    }
View Full Code Here

Examples of com.jme.scene.shape.Torus

        // nastavim hedou jako pozadi sceny pro lepsi rozliseni pruhlednosti na testovanem boxu
        display.getRenderer().setBackgroundColor(ColorRGBA.brown);

        // vrznu doprostred sceny torus aby byla dobre videt pruhlednost na testovanem boxu
        Torus torus = new Torus("torus", 20, 50, 2, 3);
        rootNode.attachChild(torus);

        // testovany box
        box = new Box("box", Vector3f.ZERO, 10, 10, 10);
View Full Code Here

Examples of org.jwildfire.create.eden.primitive.Torus

        if (q[i][j] != 0) {
          double dx = i - (width - 1) * 0.5;
          double dy = j - (height - 1) * 0.5;
          double r = Math.sqrt(dx * dx + dy * dy) / maxR + MathLib.EPSILON;
          double size = minSize + (maxSize - minSize) * r;
          Torus sphere = new Torus();
          sphere.getPosition().setValue(dx * gridSize + xOffset, dy * gridSize + yOffset, zOffset);
          sphere.getSize().setValue(size);
          sphere.getRotate().setValue(90 + Math.random() * 12.0 - 6.0, Math.random() * 12.0 - 6.0, Math.random() * 12.0 - 6.0);
          pScene.addObject(sphere);
        }
      }
    }

View Full Code Here

Examples of org.jwildfire.create.eden.primitive.Torus

      size.setX(size.getX() + deltaSize.getX());
      size.setY(size.getY() + deltaSize.getY());
      size.setZ(size.getZ() + deltaSize.getZ());
      //      System.out.println("  SIZE " + size.getX() + " " + size.getY() + " " + size.getZ());

      Torus box = new Torus();
      box.getPosition().assign(position);
      box.getSize().assign(size);
      box.getRotate().assign(rotate);
      scene.addObject(box);

      deltaRotate.setZ(deltaRotate.getZ() - 0.1 * (0.5 + Math.random()));
    }
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.