Examples of rotZ()


Examples of javax.media.j3d.Transform3D.rotZ()

            break;
        case Y:
            rotation.rotY(rotationAngle);
            break;
        case Z:
            rotation.rotZ(rotationAngle);
            break;
        }
        return rotation;
    }
View Full Code Here

Examples of javax.media.j3d.Transform3D.rotZ()

    final AntiAliased<Cone> spitze = new AntiAliased<Cone>(new Cone(
        Achse.WIDTH * 2, Achse.WIDTH * 2, this.appear));

    final Transform3D transform3d = new Transform3D();
    if (aling == Achse.ALING_X)
      transform3d.rotZ(-Math.PI / 2);
    if (aling == Achse.ALING_Z)
      transform3d.rotX(Math.PI / 2);
    this.setTransform(transform3d);
    this.addChild(achse);

View Full Code Here

Examples of javax.media.j3d.Transform3D.rotZ()

   
    // Cylinder 2
    Transform3D trCyl2 = new Transform3D();
    trCyl2.set(new Vector3f(0f,0.5f,0f));
    Transform3D trCyl2rot = new Transform3D();
    trCyl2rot.rotZ(90*Math.PI/180);
    trCyl2.mul(trCyl2rot);
    TransformGroup trGcyl2 = new TransformGroup(trCyl2);
    Cylinder cyl2 = new Cylinder(0.2f,0.5f,appCyl);
    trGcyl2.addChild(cyl2);
   
View Full Code Here

Examples of javax.media.j3d.Transform3D.rotZ()

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

Examples of javax.media.j3d.Transform3D.rotZ()

    }

    public void testGetRotationFromTransformZ() {
        Transform3D transform3D = new Transform3D();
        double rotationAngle = Randomizer.randomRotation();
        transform3D.rotZ(rotationAngle);
        double angle = TransformerHelper.getRotationFromTransform(transform3D, Axis.Z);
        assertEquals(rotationAngle, angle, 0.000001);
    }

}
View Full Code Here

Examples of javax.media.j3d.Transform3D.rotZ()

    }

    public void testGetRotationFromTransformZ() {
        Transform3D transform3D = new Transform3D();
        double rotationAngle = Randomizer.randomRotation();
        transform3D.rotZ(rotationAngle);
        double angle = TransformerHelper.getRotationFromTransform(transform3D, Axis.Z);
        assertEquals(rotationAngle, angle, 0.000001);
    }

}
View Full Code Here

Examples of javax.media.j3d.Transform3D.rotZ()

            break;
        case Y:
            rotation.rotY(rotationAngle);
            break;
        case Z:
            rotation.rotZ(rotationAngle);
            break;
        }
        return rotation;
    }
View Full Code Here

Examples of javax.vecmath.Matrix3d.rotZ()

        direction = dir;
    }
   
    public void setDirection(double angle) {
      Matrix3d mat = new Matrix3d();
      mat.rotZ(angle);
      Vector3d tmp = new Vector3d(1, 0, 0);
      mat.transform(tmp);
      direction = new Vector2d(tmp.x, tmp.y);
    }
View Full Code Here

Examples of javax.vecmath.Matrix3d.rotZ()

  public BranchGroup createSceneGraph2()
  {
      Java3DFactory objectFactory = new Java3DFactory();
    Matrix3d rot = new Matrix3d();
    rot.setIdentity();
    rot.rotZ(1.5);
    Transform3D zRotation = new Transform3D(rot, new Vector3d(), 1);
    TransformGroup objTrans3 = new TransformGroup(zRotation);
    objTrans3.addChild(objectFactory.createCylinder(0.5, 3, 2, 0, 0));
   
    Entry<BoundingSphere, BranchGroup> entry = Java3DUtils.createDefaultBranchGroup(
View Full Code Here

Examples of javax.vecmath.Matrix4d.rotZ()

/* 285 */     debugOutputLn(2, " p, h, b = " + this.pitch + ", " + this.heading + ", " + this.bank);
/*     */
/* 289 */     Matrix4d pitchMat = new Matrix4d();
/* 290 */     pitchMat.rotX(-this.pitch);
/* 291 */     Matrix4d bankMat = new Matrix4d();
/* 292 */     bankMat.rotZ(this.bank);
/* 293 */     mat.rotY(-this.heading);
/* 294 */     mat.mul(pitchMat);
/* 295 */     mat.mul(bankMat);
/* 296 */     debugOutputLn(2, "setRotMat(), mat = " + mat);
/*     */   }
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.