public class Transformation extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
DISK_USED
Allow Stream directly read/write the data members and Spatial to
access DISK_USED.
|
private boolean |
m_bIsIdentity
True if the Transformation is the identity matrix.
|
private boolean |
m_bIsRSMatrix
True if the Transformation is a rotation/scale matrix.
|
private boolean |
m_bIsUniformScale
True if Transformation is a uniform scale.
|
private boolean |
m_bUpdateInverse
True is the matrix inverse needs to be updated.
|
private Matrix3f |
m_kMatrix
Transformation matrix.
|
private Matrix3f |
m_kMatrixInverse |
private Vector3f |
m_kScale
Scale vector.
|
private Vector3f |
m_kTranslate
Translation vector.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
Transformation()
The default constructor produces the identity transformation.
|
Transformation(Transformation rkA)
Copy into this transformation.
|
Modifier and Type | Method and Description |
---|---|
Plane3f |
ApplyForward(Plane3f rkInput)
Transform the plane Dot(N0,X) = c0 to Dot(N1,Y) = c1 where both N0 and
N1 must be unit-length normals.
|
Vector3f |
ApplyForward(Vector3f rkInput)
Compute Y = M*X+T where X is the input and Y is the output.
|
void |
ApplyForward(Vector3f rkInput,
Vector3f kOutput)
Compute Y = M*X+T where X is the input and Y is the output.
|
Vector3f |
ApplyInverse(Vector3f rkInput)
Compute X = M^{-1}*(Y-T) where Y is the input and X is the output.
|
void |
ApplyInverse(Vector3f rkInput,
Vector3f kOutput)
Compute X = M^{-1}*(Y-T) where Y is the input and X is the output.
|
void |
Copy(Transformation rkA)
Copy into this transformation.
|
void |
dispose()
Delete memory.
|
void |
GetHomogeneous(Matrix4f rkHMatrix)
Pack the transformation into a 4-by-4 matrix, stored so that it may be
applied to 1-by-4 vectors on the left.
|
Matrix3f |
GetMatrix()
Get matrix reference.
|
float |
GetNorm()
For M = R*S, the largest value of S in absolute value is returned.
|
Matrix3f |
GetRotate()
Get the rotation matrix.
|
Vector3f |
GetScale()
Get the scale vector.
|
Vector3f |
GetTranslate()
Get the translation vector.
|
float |
GetUniformScale()
Get uniform scale factor.
|
(package private) void |
Inverse()
Set this to the inverse transformation.
|
Vector3f |
InvertVector(Vector3f rkInput)
Inverse-transform the input vector V0.
|
boolean |
IsIdentity()
Hints about the structure of the transformation.
|
boolean |
IsRSMatrix()
Hints about the structure of the transformation.
|
boolean |
IsUniformScale()
Hints about the structure of the transformation.
|
void |
MakeIdentity()
Set the transformation to the identity.
|
void |
MakeUnitScale()
Set the scales to 1.
|
void |
Product(Transformation rkA,
Transformation rkB)
Compute this = A*B.
|
void |
SetIsIdentity(boolean bValue)
Set IsIdentity flag.
|
void |
SetIsRSMatrix(boolean bValue)
Set IsRSMatrix flag.
|
void |
SetIsUniformScale(boolean bValue)
Set IsUniformScale flag.
|
void |
SetMatrix(Matrix3f rkMatrix)
The Set* functions set the is-identity hint to false.
|
void |
SetMatrixCopy(Matrix3f rkMatrix)
The Set* functions set the is-identity hint to false.
|
void |
SetRotate(Matrix3f rkRotate)
The Set* functions set the is-identity hint to false.
|
void |
SetRotateCopy(Matrix3f rkRotate)
The Set* functions set the is-identity hint to false.
|
void |
SetScale(float fSx,
float fSy,
float fSz)
The Set* functions set the is-identity hint to false.
|
void |
SetScale(Vector3f rkScale)
The Set* functions set the is-identity hint to false.
|
void |
SetTranslate(float fTx,
float fTy,
float fTz)
Set the translation vector.
|
void |
SetTranslate(Vector3f rkTranslate)
Set the translation vector.
|
void |
SetUniformScale(float fScale)
Set uniform scale factor.
|
private static final long serialVersionUID
public static int DISK_USED
private Matrix3f m_kMatrix
private Matrix3f m_kMatrixInverse
private Vector3f m_kTranslate
private Vector3f m_kScale
private boolean m_bIsIdentity
private boolean m_bIsRSMatrix
private boolean m_bIsUniformScale
private boolean m_bUpdateInverse
public Transformation()
public Transformation(Transformation rkA)
rkA
- Transformation to copyvoid Inverse()
public Plane3f ApplyForward(Plane3f rkInput)
rkInput
- input plane.public Vector3f ApplyForward(Vector3f rkInput)
rkInput
- input vector X.public void ApplyForward(Vector3f rkInput, Vector3f kOutput)
rkInput
- input vector X.public Vector3f ApplyInverse(Vector3f rkInput)
rkInput
- input vector Y.public void ApplyInverse(Vector3f rkInput, Vector3f kOutput)
rkInput
- input vector Y.public void Copy(Transformation rkA)
rkA
- Transformation to copypublic void dispose()
public void GetHomogeneous(Matrix4f rkHMatrix)
rkHMatrix
- matrix to pack the transformation into.public final Matrix3f GetMatrix()
public float GetNorm()
public Matrix3f GetRotate()
public Vector3f GetScale()
public final Vector3f GetTranslate()
public float GetUniformScale()
public Vector3f InvertVector(Vector3f rkInput)
rkInput
- input vector V0.public final boolean IsIdentity()
public final boolean IsRSMatrix()
public final boolean IsUniformScale()
public void MakeIdentity()
public void MakeUnitScale()
public void Product(Transformation rkA, Transformation rkB)
rkA
- input A.rkB
- input B.public void SetIsIdentity(boolean bValue)
bValue
- identity value.public void SetIsRSMatrix(boolean bValue)
bValue
- rotation/scale matrix value.public void SetIsUniformScale(boolean bValue)
bValue
- uniform scale matrix value.public void SetMatrix(Matrix3f rkMatrix)
rkRotate
- new matrix.public void SetMatrixCopy(Matrix3f rkMatrix)
rkRotate
- new matrix.public void SetRotate(Matrix3f rkRotate)
rkRotate
- new matrix.public void SetRotateCopy(Matrix3f rkRotate)
rkRotate
- new matrix.public void SetScale(float fSx, float fSy, float fSz)
rkRotate
- new scale vector.public void SetScale(Vector3f rkScale)
rkRotate
- new scale vector.public void SetTranslate(float fTx, float fTy, float fTz)
the
- new translation vector.public void SetTranslate(Vector3f rkTranslate)
the
- new translation vector.public void SetUniformScale(float fScale)
fScale
- uniform scale factor.