newQuat.interpolate (keyFrame[1].quat, keyFrame[2].quat, u);
/** * Multiplies this quaternion by the inverse of quaternion q1 and places * the value into this quaternion. The value of the argument quaternion * is preserved (this = this * q^-1). * @param q1 the other quaternion */ public final void mulInverse(Quat4f q1) { Quat4f tempQuat = new Quat4f(q1); tempQuat.inverse(); this.mul(tempQuat); }
public Quat4f readQuat4f( DataInput in ) throws IOException { return (Quat4f)readTuple4f( in, new Quat4f() ); }
/** * Retrieves the quat value at the specified index. * @param index the index of the value requested * @param quat the quat to receive the quat value at the index */ public void getQuat(int index, Quat4f quat) { quat.set(this.quats[index]); }
tQuat.normalize(); rotation.set(tQuat);
@Override public void writeConstructorParams( DataOutput out ) throws IOException { super.writeConstructorParams( out ); quats = new Quat4f[ knots.length ]; for(int i=0; i<quats.length; i++) { quats[i] = new Quat4f(); } ((RotationPathInterpolator)node).getQuats( quats ); for(int i=0; i<quats.length; i++) { control.writeQuat4f( out, quats[i] ); } }
/** * Retrieves the quat value at the specified index. * @param index the index of the value requested * @param quat returns the interpolator's quat value at the index */ public void getQuat(int index, Quat4f quat) { quat.set(this.quats[index]); }
positions[currentKnotIndex].z) * currentInterpolationValue; tQuat.normalize();
colObject.setWorldTransform(new Transform(new Matrix4f(new Quat4f(0, 0, 0, 1), new Vector3f(position.x, position.y, position.z), 1f))); dynamicsWorld.addCollisionObject(colObject);
/** * Retrieves the quat value at the specified index. * @param index the index of the value requested * @param quat the quat object that will have the * quat value at index copied into it. */ public void getQuat(int index, Quat4f quat) { quat.set(this.quats[index]); }
/** * Multiplies quaternion q1 by the inverse of quaternion q2 and places * the value into this quaternion. The value of both argument quaternions * is preservered (this = q1 * q2^-1). * @param q1 the first quaternion * @param q2 the second quaternion */ public final void mulInverse(Quat4f q1, Quat4f q2) { Quat4f tempQuat = new Quat4f(q2); tempQuat.inverse(); this.mul(q1, tempQuat); }
scales[currentKnotIndex]) * currentInterpolationValue; tQuat.normalize();
private void setPathArrays(Quat4f[] quats, Point3f[] positions) { this.quats = new Quat4f[quats.length]; for(int i = 0; i < quats.length; i++) { this.quats[i] = new Quat4f(); this.quats[i].set(quats[i]); } this.positions = new Point3f[positions.length]; for(int i = 0; i < positions.length; i++) { this.positions[i] = new Point3f(); this.positions[i].set(positions[i]); } }
/** * Sets the quat value at the specified index for this * interpolator. * @param index the index to be changed * @param quat the new quat value at index */ public void setQuat(int index, Quat4f quat) { this.quats[index].set(quat); }
private void setPathArrays(Quat4f[] quats, Point3f[] positions, float[] scales) { this.quats = new Quat4f[quats.length]; for(int i = 0; i < quats.length; i++) { this.quats[i] = new Quat4f(); this.quats[i].set(quats[i]); } this.positions = new Point3f[positions.length]; for(int i = 0; i < positions.length; i++) { this.positions[i] = new Point3f(); this.positions[i].set(positions[i]); } this.scales = new float[scales.length]; for(int i = 0; i < scales.length; i++) { this.scales[i] = scales[i]; } }