Package com.sun.j3d.utils.geometry

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


        Appearance groundApp = new Appearance();

        Texture textureGround = new TextureLoader("img/groundimage3.jpg", this).getTexture();
        groundApp.setTexture(textureGround);
       
        Box ground = new Box(35f,0.1f,35f, groundApp);
       
       

        objTransform.addChild(ground);        // add ground;       
View Full Code Here


    //platform
    Transform3D trPlat = new Transform3D();
    Vector3f vPlat = new Vector3f(0f,4.5f,0f);
    trPlat.set(vPlat);
    TransformGroup tgPlat = new TransformGroup(trPlat);
    tgPlat.addChild(new Box(3f,0.15f,3f,appP));
   
   
    //leg1
    Transform3D trleg1 = new Transform3D();
    Vector3f vLeg1 = new Vector3f(2f,3.5f,2f);
View Full Code Here

    tr1.mul(tr11);
   
   
    //tr1.set(new Vector3f(0f,-0.5f,0f));
    TransformGroup trGbox1 = new TransformGroup(tr1);
    Box box1 = new Box(0.2f,1f,0.2f,app);
    trGbox1.addChild(box1);
   
   
    Transform3D tr2 = new Transform3D();
    tr2.set(new Vector3f(0f,-0.5f,0.3f));
    tr1.mul(tr2);
   
    Transform3D tr3 = new Transform3D();
    //tr3.rotX(30*Math.PI/180);
    tr3.rotX(rot3*Math.PI/180);

    // Cylinder 3
    Transform3D trCyl3 = new Transform3D();
    //trCyl3.set(new Vector3f(0f,-1.5f,0f));
   
                            Transform3D trCyl33 = new Transform3D();
                            trCyl33.set(new Vector3f(0f,-0.5f,-0.2f));
                            trCyl3.mul(tr1);
                            trCyl3.mul(trCyl33);
    Transform3D trCyl3rot = new Transform3D();
    trCyl3rot.rotZ(90*Math.PI/180);
    trCyl3.mul(trCyl3rot);
    TransformGroup trGcyl3 = new TransformGroup(trCyl3);
    Cylinder cyl3 = new Cylinder(0.2f,0.5f,appCyl);
    trGcyl3.addChild(cyl3);
   
    Transform3D tr4 = new Transform3D();
    tr4.set(new Vector3f(0f,-1.5f,0f));
    tr3.mul(tr4);
   
    tr1.mul(tr3);

    // box2
    TransformGroup trGbox2 = new TransformGroup(tr1);
    Box box2= new Box(0.2f,1f,0.2f,app);
    trGbox2.addChild(box2);
   
   
    // transform for sphere
    Transform3D tr5 = new Transform3D();
View Full Code Here

   
  }
 
  public Node createBox( double xDim, double yDim, double zDim, double xCenter, double yCenter, double zCenter){
   
      Box box = new Box((float) xDim, (float) yDim, (float) zDim, appearance);
      return transform(box, defaultTransformationFactory.createTranslation(xCenter, yCenter, zCenter));
  }
View Full Code Here

    private static final char BANNER = 'B';
    private static final char LIGHT = 'L';

    private static TransformGroup makeObstacle(int x, int z,
            Appearance appearance) {
        final Primitive obstruction = new Box(RADIUS, HEIGHT / 2, RADIUS,
                Primitive.GENERATE_TEXTURE_COORDS | Primitive.GENERATE_NORMALS,
                appearance);
        final Vector3d position = new Vector3d(x, HEIGHT / 2, z);
        final Transform3D transform = Transforms.translation(position);
        final TransformGroup transformGroup = new TransformGroup(transform);
View Full Code Here

TOP

Related Classes of com.sun.j3d.utils.geometry.Box

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.