|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjautil.geometry.TRUtil
public class TRUtil
A collection of (static) utility methods for translation and rotation data.
Field Summary | |
---|---|
static float[] |
ID_ROT_ARRAY
The array for the identity rotation (in the order: x, y, z, w). |
static int |
IX_W
Index of the W component of a vector/quaternion array. |
static int |
IX_X
Index of the X component of a vector/quaternion array. |
static int |
IX_Y
Index of the Y component of a vector/quaternion array. |
static int |
IX_Z
Index of the Z component of a vector/quaternion array. |
static float |
METRES_TO_INCHES
Scale factor converting metres to inches. |
static int |
ROT_SIZE
The number of elements in a rotation array, that is, in a quaternion. |
static int |
TRANS_SIZE
The number of elements in a translation array. |
Constructor Summary | |
---|---|
TRUtil()
|
Method Summary | |
---|---|
static float[] |
clampWOfRotation(float[] rot)
Returns the given rotation as long as its w component does not exceed 1; otherwise returns a new copy of the given rotation but with the copy's w value set to 1. |
static double[] |
rotationDirectionAndAngle(float[] rot)
Provides the given rotation data as a direction vector (that is, the 3 direction cosines), together with the angle of rotation about that vector (in degrees). |
static void |
setRotation(float[] rdest,
float[] rsrc)
Copies the given source rotation to the given destination one. |
static void |
setRotation(float[] rdest,
Quaternion qsrc)
Copies the given source quaternion rotation values to the given destination array. |
static void |
setScaledTranslation(float[] tdest,
float[] tsrc,
float scale)
Copies the given source translation to the given destination one. |
static void |
setTranslation(float[] tdest,
float[] tsrc)
Copies the given source translation to the given destination one. |
static java.lang.String |
stringForTR(int fourcc,
float[] trans,
float[] rot)
Returns a string representation of the given translation and rotation data. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TRANS_SIZE
public static final int ROT_SIZE
public static final int IX_X
public static final int IX_Y
public static final int IX_Z
public static final int IX_W
public static final float[] ID_ROT_ARRAY
public static final float METRES_TO_INCHES
Constructor Detail |
---|
public TRUtil()
Method Detail |
---|
public static void setTranslation(float[] tdest, float[] tsrc)
public static void setScaledTranslation(float[] tdest, float[] tsrc, float scale)
public static void setRotation(float[] rdest, float[] rsrc)
public static void setRotation(float[] rdest, Quaternion qsrc)
public static float[] clampWOfRotation(float[] rot)
public static java.lang.String stringForTR(int fourcc, float[] trans, float[] rot)
public static double[] rotationDirectionAndAngle(float[] rot)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |