Package javax.media.j3d

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


    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

   
    // 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

                            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

    }

    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

    }

    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

            break;
        case Y:
            rotation.rotY(rotationAngle);
            break;
        case Z:
            rotation.rotZ(rotationAngle);
            break;
        }
        return rotation;
    }
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.