Package javax.vecmath

Examples of javax.vecmath.Quat4f.mul()


    Quat4f dorn = Stack.alloc(Quat4f.class);
    dorn.set(axis.x, axis.y, axis.z, (float) Math.cos(fAngle * timeStep * 0.5f));
    Quat4f orn0 = curTrans.getRotation(Stack.alloc(Quat4f.class));

    Quat4f predictedOrn = Stack.alloc(Quat4f.class);
    predictedOrn.mul(dorn, orn0);
    predictedOrn.normalize();
//  #endif
    predictedTransform.setRotation(predictedOrn);
  }

View Full Code Here


                    Vector3f pos = boneLocation.getWorldPosition();
                    pos.sub(worldPos);
                    QuaternionUtil.quatRotate(inverseWorldRot, pos, pos);
                    bonePositions.add(pos);
                    Quat4f rot = new Quat4f();
                    rot.mul(inverseWorldRot, boneLocation.getWorldRotation());
                    boneRotations.add(rot);
                } else {
                    logger.warn("Unable to resolve bone \"{}\"", bone.getName());
                    bonePositions.add(new Vector3f());
                    boneRotations.add(new Quat4f());
View Full Code Here

        return result;
    }

    public static Quat4f correctQuat4f(Quat4f rot) {
        Quat4f result = new Quat4f(CORRECTION_QUATERNION);
        result.mul(rot);
        return result;
    }

    public static Vector3f correctOffset(Vector3f offset) {
        return QuaternionUtil.quatRotate(CORRECTION_QUATERNION, offset, new Vector3f());
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.