Examples of fromAngleNormalAxis()


Examples of com.ardor3d.math.Quaternion.fromAngleNormalAxis()

            }
            case GeomMesh: {
                final Quaternion tempQuat = Quaternion.fetchTempInstance();
                final ReadOnlyVector3 norm = triModel.getNormal();
                if (orient != 0) {
                    tempQuat.fromAngleNormalAxis(orient, norm);
                }

                for (int x = 0; x < 3; x++) {
                    if (orient != 0) {
                        tempQuat.apply(triModel.get(x), tempVec3);
View Full Code Here

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

                return;
            }
        }

        Matrix3f mat = new Matrix3f();
        mat.fromAngleNormalAxis(rotationSpeed * value, axis);

        Vector3f up = cam.getUp();
        Vector3f left = cam.getLeft();
        Vector3f dir = cam.getDirection();

View Full Code Here

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

        } else {
            // calculating surface tangent (velocity contains the 'normal' value)
            temp.set(particle.velocity.z * surfaceTangentFactor, particle.velocity.y * surfaceTangentFactor, -particle.velocity.x * surfaceTangentFactor);
            if (surfaceTangentRotation != 0.0f) {// rotating the tangent
                Matrix3f m = new Matrix3f();
                m.fromAngleNormalAxis(FastMath.PI * surfaceTangentRotation, particle.velocity);
                temp = m.multLocal(temp);
            }
            // applying normal factor (this must be done first)
            particle.velocity.multLocal(normalVelocity);
            // adding tangent vector
View Full Code Here

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

                return;
            }
        }

        Matrix3f mat = new Matrix3f();
        mat.fromAngleNormalAxis(rotationSpeed * value, axis);

        Vector3f up = cam.getUp();
        Vector3f left = cam.getLeft();
        Vector3f dir = cam.getDirection();

View Full Code Here

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

  public void update(float tpf) {
    // float crouchOffset = jumpCrouching ? Math.min(((jumpCrouchTime / MAX_JUMP_TIME) * 0.25f),
    // 0.25f) : 0.0f;

    Matrix3f bodyRot = new Matrix3f();
    bodyRot.fromAngleNormalAxis(walkAngle * FastMath.DEG_TO_RAD, Vector3f.UNIT_Y);
    Vector3f bodyDir = bodyRot.mult(Vector3f.UNIT_Z.negate()).normalizeLocal();

    if (walking) {
      lastWalkDir = bodyDir.mult(walkMult * 2.0f);
      player.setWalkDirection(lastWalkDir);
 
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.