Examples of fromAngleAxis()


Examples of com.jme.math.Matrix3f.fromAngleAxis()

        Matrix3f rotY = new Matrix3f();
        rotY.loadIdentity();
        rotY.fromAngleAxis(y, new Vector3f(0f, 1f, 0f));
        Matrix3f rotZ = new Matrix3f();
        rotZ.loadIdentity();
        rotZ.fromAngleAxis(z, new Vector3f(0f, 0f, 1f));

        m3f.multLocal(rotY);
        m3f.multLocal(rotZ);

        return m3f;
View Full Code Here

Examples of com.jme.math.Matrix3f.fromAngleAxis()

          height, true, font);

                        label.setLocalTranslation(0, heightAbove, 0);

                        Matrix3f rot = new Matrix3f();
                        rot.fromAngleAxis((float) Math.PI, new Vector3f(0f, 1f, 0f));
                        label.setLocalRotation(rot);

                        attachChild(label);
                    } else {
                        label.setFont(font);
View Full Code Here

Examples of com.jme.math.Quaternion.fromAngleAxis()

    public Quaternion unmarshal(QuaternionHandler q) throws Exception {
        if (q==null)
            return null;
        Vector3f axis = new Vector3f(q.x, q.y, q.z);
        Quaternion ret = new Quaternion();
        ret.fromAngleAxis(q.angle, axis);
        return ret;
    }

    @Override
    public QuaternionHandler marshal(Quaternion q) throws Exception {
View Full Code Here

Examples of com.jme.math.Quaternion.fromAngleAxis()

        Quaternion newQuat = new Quaternion();

        float fromAngle = ((Quaternion)from).toAngleAxis(fromAxis);
        float toAngle = ((Quaternion)to).toAngleAxis(toAxis);

        newQuat.fromAngleAxis(fromAngle + (toAngle - fromAngle) * timelinePosition,
                new Vector3f(fromAxis.x + (toAxis.x - fromAxis.x) * timelinePosition,
                fromAxis.y + (toAxis.y - fromAxis.y) * timelinePosition,
                fromAxis.z + (toAxis.z - fromAxis.z) * timelinePosition));
        return newQuat;
    }
View Full Code Here

Examples of com.jme.math.Quaternion.fromAngleAxis()

        // Set the destination look direction from the text field. If the text
        // field is empty, then set the server state as a zero rotation.
        Quaternion look = new Quaternion();
        Vector3f axis = new Vector3f(0.0f, 1.0f, 0.0f);
        float angle = (float) Math.toRadians(origLookDirection);
  look.fromAngleAxis((float) angle, axis);
        state.setLook(look);

  state.setAudioSourceType(origAudioSourceType);
  state.setAudioSource(origAudioSource);
  state.setUploadFile(true);
View Full Code Here

Examples of com.jme.math.Quaternion.fromAngleAxis()

                    yrot = 0 + radDegree;
                }

                tilt = tilt.fromAngleAxis(yrot,left);

                pan = pan.fromAngleAxis(xrot, Vector3f.UNIT_Z);
                pan.multLocal(tilt);
                camerapivot.setLocalRotation(pan);
                cameraOrbit.update();
            }
        }
View Full Code Here

Examples of com.jme.math.Quaternion.fromAngleAxis()

                xrot = xrot + radDegree;
                if (xrot > FastMath.TWO_PI * 2 || xrot < FastMath.TWO_PI * -2) {
                    xrot = 0 + radDegree;
                }

                tilt = tilt.fromAngleAxis(yrot, left);

                pan = pan.fromAngleAxis(xrot, Vector3f.UNIT_Z);
                pan.multLocal(tilt);
                camerapivot.setLocalRotation(pan);
                cameraOrbit.update();
View Full Code Here

Examples of com.jme.math.Quaternion.fromAngleAxis()

            }
           
            // create the rotation
            Quaternion look = new Quaternion();
            Vector3f axis = new Vector3f(Vector3f.UNIT_Y);
            look.fromAngleAxis((float) Math.toRadians(angle), axis);

            // If the URL is an empty string, convert it to null. If the URL
            // is null, then it will use the current server.
            if (url != null && url.length() == 0) {
                url = null;
View Full Code Here

Examples of com.jme3.math.Matrix3f.fromAngleAxis()

    // aureus: temporary solution; scout should ultimately be a separate object
    scoutNode = new Node();
    scoutNode.setLocalTranslation(new Vector3f(0.0f, 3.0f, -10.0f));
    Matrix3f scoutMatrix = new Matrix3f();
    scoutMatrix.fromAngleAxis((float)Math.atan2(3.0f, 10.0f), Vector3f.UNIT_X);
    scoutNode.setLocalRotation(scoutMatrix);
    hector.getLegsNode().attachChild(scoutNode);

    player.setPhysicsLocation(incarn.getLocation());
View Full Code Here

Examples of com.jme3.math.Quaternion.fromAngleAxis()

               
                theta *= influence;

                if (theta != 0) {
                    Vector3f vectorR = vectorA.cross(vectorC);
                    boneWorldRotation.fromAngleAxis(theta, vectorR);
                    boneWorldTransform.getRotation().multLocal(boneWorldRotation);
                    constraintHelper.applyTransform(boneContexts[i].getArmatureObjectOMA(), bone.getName(), Space.CONSTRAINT_SPACE_WORLD, boneWorldTransform);
                }

                bone.updateWorldVectors();
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.