|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.math.TransformQuaternion
public class TransformQuaternion
Started Date: Jul 16, 2004
Same as TransformMatrix, but stores rotations as quats, not Matrix3f. This is faster for interpolation, but slower
than a matrix using Matrix3f for rotation when doing point translation.
| Constructor Summary | |
|---|---|
TransformQuaternion()
|
|
| Method Summary | |
|---|---|
void |
applyToSpatial(Spatial spatial)
Applies the values of this matrix to the given Spatial. |
TransformQuaternion |
clone()
|
TransformQuaternion |
combineWithParent(TransformQuaternion parent)
Changes the values of this matrix acording to it's parent. |
java.lang.Class<? extends TransformQuaternion> |
getClassTag()
|
Quaternion |
getRotation()
Return the rotation quaternion in this matrix. |
Quaternion |
getRotation(Quaternion quat)
Stores this rotation value into the given Quaternion. |
Vector3f |
getScale()
Return the scale vector in this matrix. |
Vector3f |
getScale(Vector3f scale)
Stores this scale value into the given vector3f. |
Vector3f |
getTranslation()
Return the translation vector in this matrix. |
Vector3f |
getTranslation(Vector3f trans)
Stores this translation value into the given vector3f. |
void |
interpolateTransforms(TransformQuaternion t1,
TransformQuaternion t2,
float delta)
Sets this matrix to the interpolation between the first matrix and the second by delta amount. |
void |
loadIdentity()
Loads the identity. |
void |
read(JMEImporter e)
|
void |
set(TransformQuaternion matrixQuat)
Sets this matrix to be equal to the given matrix. |
void |
setRotationQuaternion(Quaternion rot)
Sets this rotation to the given Quaternion value. |
void |
setScale(float x,
float y,
float z)
Sets this matrix's scale to the given x,y,z values. |
void |
setScale(Vector3f scale)
Sets this scale to the given value. |
void |
setTranslation(float x,
float y,
float z)
Sets this matrix's translation to the given x,y,z values. |
void |
setTranslation(Vector3f trans)
Sets this translation to the given value. |
void |
write(JMEExporter e)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransformQuaternion()
| Method Detail |
|---|
public void setRotationQuaternion(Quaternion rot)
rot - The new rotation for this matrix.public void setTranslation(Vector3f trans)
trans - The new translation for this matrix.public Vector3f getTranslation()
public void setScale(Vector3f scale)
scale - The new scale for this matrix.public Vector3f getScale()
public Vector3f getTranslation(Vector3f trans)
trans - The store location for this matrix's translation.
public Quaternion getRotation(Quaternion quat)
quat - The store location for this matrix's rotation.
public Quaternion getRotation()
public Vector3f getScale(Vector3f scale)
scale - The store location for this matrix's scale.
public void interpolateTransforms(TransformQuaternion t1,
TransformQuaternion t2,
float delta)
t1 - The begining transform.t2 - The ending transform.delta - An amount between 0 and 1 representing how far to interpolate from t1 to t2.public TransformQuaternion combineWithParent(TransformQuaternion parent)
parent - The parent matrix.
public void applyToSpatial(Spatial spatial)
spatial - The spatial to be affected by this matrix.
public void setTranslation(float x,
float y,
float z)
x - This matrix's new x translation.y - This matrix's new y translation.z - This matrix's new z translation.
public void setScale(float x,
float y,
float z)
x - This matrix's new x scale.y - This matrix's new y scale.z - This matrix's new z scale.public void loadIdentity()
public void set(TransformQuaternion matrixQuat)
matrixQuat - The matrix to be equal to.
public void write(JMEExporter e)
throws java.io.IOException
write in interface Savablejava.io.IOException
public void read(JMEImporter e)
throws java.io.IOException
read in interface Savablejava.io.IOExceptionpublic java.lang.Class<? extends TransformQuaternion> getClassTag()
getClassTag in interface Savablepublic TransformQuaternion clone()
clone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||