Examples of rotZ()


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

            TransformGroup g=new TransformGroup();
            // TODO i18n
            g.setName("SolidFrame");
           
            Transform3D nz=new Transform3D();
            nz.rotZ(-Math.PI/2.);
            TransformGroup tgx=new TransformGroup(nz);
            tgx.setName("X");           
            makeSolidAxis(tgx, 1.f, 0.04f, 0.02f, 0.04f, Color.RED, Color.RED, 10);           
            g.addChild(tgx);
View Full Code Here

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

        // 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
        Point3d lower = new Point3d();
        bounds.getLower(lower);
View Full Code Here

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

            mech.addChild(sh);
        }
        mech.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);

        Transform3D ftrans = new Transform3D();
        ftrans.rotZ(facing(dir));
        ftrans.setTranslation(location(hex, c, elevation, height(entity)));
        facing = new TransformGroup(ftrans);
        facing.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
        facing.addChild(mech);
View Full Code Here

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

            si.setSchedulingBounds(BoardModel.bounds);
            si.setMinimumScale(.8f);
            si.setMaximumScale(1.25f);
            fscale.addChild(co);
            Transform3D sftrans = new Transform3D();
            sftrans.rotZ(facing(sdir-dir));
            Vector3d sv = new Vector3d(0.0, 5*BoardModel.HEX_DIAMETER/12, 0.0);
            sftrans.transform(sv);
            sftrans.setTranslation(sv);
            TransformGroup sfacing = new TransformGroup(sftrans);
            sfacing.addChild(fscale);
View Full Code Here

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

       
        case MovePath.STEP_TURN_LEFT:
        case MovePath.STEP_TURN_RIGHT:
            anim.removeChild(arrow);
            centerOffset = BoardModel.HEX_DIAMETER/6;
            trans.rotZ(-Math.PI/3*step.getFacing());
            break;
        default:
            centerOffset = -BoardModel.HEX_DIAMETER/3;
            trans.rotZ(-Math.PI/3*step.getFacing());
        }
View Full Code Here

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

            centerOffset = BoardModel.HEX_DIAMETER/6;
            trans.rotZ(-Math.PI/3*step.getFacing());
            break;
        default:
            centerOffset = -BoardModel.HEX_DIAMETER/3;
            trans.rotZ(-Math.PI/3*step.getFacing());
        }
        Vector3d translate = new Vector3d(0.0, centerOffset, -BoardModel.HEX_HEIGHT-count*.1);
        trans.transform(translate);
        trans.setTranslation(translate);
       
View Full Code Here

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

    setToMyDefaultAppearance(lightBlueApp,new Color3f(0.0f,0.1f,0.3f));
    extractedObject.setAppearance(lightBlueApp);

    //Assign the chosen part to a transformation group.
    Transform3D tfObject = new Transform3D();
    tfObject.rotZ(0.4*Math.PI);
    Transform3D xRotation = new Transform3D();
    xRotation.rotY(0.4*Math.PI);
    tfObject.mul(xRotation);
    TransformGroup tgObject = new TransformGroup(tfObject);

View Full Code Here

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

            System.out.println("File loading failed:" + e);
        }

        // Generate a transformation group for the loaded object.
        Transform3D tfObject = new Transform3D();
        tfObject.rotZ(0.4 * Math.PI);
        Transform3D xRotation = new Transform3D();
        xRotation.rotY(0.4 * Math.PI);
        tfObject.mul(xRotation);
        TransformGroup tgObject = new TransformGroup(tfObject);
        tgObject.addChild(s.getSceneGroup());
View Full Code Here

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

    //Define the movement for the flight.
    int timeAcc = 300; //The acceleration and breaking phase should last 0.3 seconds.
    //The helicopter fly slightly of from the vertical axis.
    Transform3D helicopterFlightAxis = new Transform3D();
    helicopterFlightAxis.rotZ(0.4*Math.PI);

    //The Alpha for the flight of the helicopter.
    Alpha helicopterAlpha = new Alpha(1,Alpha.INCREASING_ENABLE+Alpha.DECREASING_ENABLE,
                                      timeFlightStart,0,timeOneWayFlight,timeAcc,
                                      timeHovering,timeOneWayFlight,timeAcc,0);
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
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.