Examples of rotX()


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

    this.turnUpButton = new JButton(new ResourceAction(preferences, FurniturePanel.class, "TURN_UP", true) {
        @Override
        public void actionPerformed(ActionEvent ev) {
          Transform3D oldTransform = getModelRotationTransform();
          Transform3D upRotation = new Transform3D();
          upRotation.rotX(-Math.PI / 2);
          upRotation.mul(oldTransform);
          updateModelRotation(upRotation);
        }
      });
    this.turnDownButton = new JButton(new ResourceAction(preferences, FurniturePanel.class, "TURN_DOWN", true) {
View Full Code Here

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

    this.turnDownButton = new JButton(new ResourceAction(preferences, FurniturePanel.class, "TURN_DOWN", true) {
        @Override
        public void actionPerformed(ActionEvent ev) {
          Transform3D oldTransform = getModelRotationTransform();
          Transform3D downRotation = new Transform3D();
          downRotation.rotX(Math.PI / 2);
          downRotation.mul(oldTransform);
          updateModelRotation(downRotation);
        }
      });
View Full Code Here

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

            tgy.setName("Y");           
            makeSolidAxis(tgy, 1.f, 0.04f, 0.02f, 0.04f, Color.GREEN, Color.GREEN, 10);           
            g.addChild(tgy);
           
            Transform3D px=new Transform3D();
            px.rotX(Math.PI/2.);
            TransformGroup tgz=new TransformGroup(px);
            tgz.setName("Z");           
            makeSolidAxis(tgz, 1.f, 0.04f, 0.02f, 0.04f, Color.BLUE, Color.BLUE, 10);           
            g.addChild(tgz);
View Full Code Here

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

            ImportedFurnitureWizardStepsPanel.class, "TURN_UP", true) {
        @Override
        public void actionPerformed(ActionEvent ev) {
          Transform3D oldTransform = getModelRotationTransform();
          Transform3D upRotation = new Transform3D();
          upRotation.rotX(-Math.PI / 2);
          upRotation.mul(oldTransform);
          updateModelRotation(upRotation);
        }
      });
    this.turnDownButton = new JButton(new ResourceAction(preferences,
View Full Code Here

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

            ImportedFurnitureWizardStepsPanel.class, "TURN_DOWN", true) {
        @Override
        public void actionPerformed(ActionEvent ev) {
          Transform3D oldTransform = getModelRotationTransform();
          Transform3D downRotation = new Transform3D();
          downRotation.rotX(Math.PI / 2);
          downRotation.mul(oldTransform);
          updateModelRotation(downRotation);
        }
      });
    this.backFaceShownLabel = new JLabel(preferences.getLocalizedString(
View Full Code Here

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

                                           float cameraYaw, float cameraPitch) {
    Transform3D yawRotation = new Transform3D();
    yawRotation.rotY(-cameraYaw + Math.PI);
   
    Transform3D pitchRotation = new Transform3D();
    pitchRotation.rotX(-cameraPitch);
    yawRotation.mul(pitchRotation);
   
    transform.setIdentity();
    transform.setTranslation(new Vector3f(cameraX, cameraZ, cameraY));
    transform.mul(yawRotation);
View Full Code Here

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

    // Default distance used to view a 2 unit wide scene
    double nominalDistanceToCenter = 1.4 / Math.tan(Math.PI / 8);
    // We don't use a TransformGroup in scene tree to be able to share the same scene
    // in the different views displayed by OrientationPreviewComponent class
    Transform3D pitchRotation = new Transform3D();
    pitchRotation.rotX(viewPitch);
    Transform3D yawRotation = new Transform3D();
    yawRotation.rotY(viewYaw);
    Transform3D transform = new Transform3D();
    transform.setTranslation(
        new Vector3d(Math.sin(viewYaw) * nominalDistanceToCenter * Math.cos(viewPitch),
View Full Code Here

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

        computeBounds(this.visualScene, bounds, new Transform3D());

        // Set orientation to Y_UP
        Transform3D axisTransform = new Transform3D();
        if ("Z_UP".equals(axis)) {
          axisTransform.rotX(-Math.PI / 2);
        } else if ("X_UP".equals(axis)) {
          axisTransform.rotZ(Math.PI / 2);
        }
        rootTransform.mul(axisTransform);
        // Translate model to its center
View Full Code Here

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

        IHex hex = game.getBoard().getHex(c);
        Vector3d tl = new Vector3d(BoardModel.getHexLocation(c, hex.surface()));
        Transform3D t = new Transform3D();
        if (type == TilesetManager.ARTILLERY_INCOMING) {
            // FIXME: nearly invisible on map view
            t.rotX(Math.PI/2);
            tl.z += BoardModel.HEX_DIAMETER;
        }
        t.setScale(new Vector3d(2*BoardModel.HEX_SIDE_LENGTH, BoardModel.HEX_DIAMETER, 1.0));
        t.setTranslation(tl);
        TransformGroup anim = new TransformGroup();
View Full Code Here

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

        if (true) {
            Shape3D sh = tilesetManager.getModel(entity);

            Transform3D t = new Transform3D();

            t.rotX(pitch(entity));
            t.setScale(scale);

            mech = new TransformGroup(t);
            mech.addChild(sh);
        }
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.