public class Ilv3DRotation extends Object
Ilv3DRotation
represents a rotation with float precision
components.Constructor and Description |
---|
Ilv3DRotation()
Creates an identity rotation.
|
Ilv3DRotation(Ilv3DFloatVector axis,
float angle)
Creates a rotation from an axis and a rotation angle.
|
Ilv3DRotation(Ilv3DRotation arg)
Creates a new
Rotf by copying the rotation passed as a
parameter. |
Modifier and Type | Method and Description |
---|---|
void |
fromMatrix(Ilv3DFloatMatrix mat)
Turns the upper left 3x3 of the passed matrix into a rotation.
|
void |
init()
Resets this rotation to the identity rotation.
|
Ilv3DRotation |
inverse()
Returns the inverse of this rotation and creates a new rotation.
|
void |
invert()
Inverts this rotation.
|
Ilv3DFloatVector |
rotateVector(Ilv3DFloatVector src)
Rotate a vector by this rotation.
|
void |
rotateVector(Ilv3DFloatVector src,
Ilv3DFloatVector dest)
Rotates a vector by this rotation.
|
void |
set(Ilv3DFloatVector axis,
float angle)
Sets the axis and the angle of this rotation.
|
void |
set(Ilv3DRotation arg)
Sets this rotation equal to the one passed as a parameter.
|
void |
toMatrix(Ilv3DFloatMatrix mat)
Turns this rotation into a 3x3 rotation matrix.
|
String |
toString()
Prints this rotation.
|
public Ilv3DRotation()
public Ilv3DRotation(Ilv3DRotation arg)
Rotf
by copying the rotation passed as a
parameter.arg
- The rotation to copy.public Ilv3DRotation(Ilv3DFloatVector axis, float angle)
axis
- The axis vector.angle
- The angle in radians.public void init()
public void set(Ilv3DFloatVector axis, float angle)
axis
- The axis vector.angle
- The angle in radians.public void set(Ilv3DRotation arg)
arg
- The rotation to copy.public Ilv3DRotation inverse()
public void invert()
public void toMatrix(Ilv3DFloatMatrix mat)
mat
- The matrix to store the result.public void fromMatrix(Ilv3DFloatMatrix mat)
mat
- The matrix to turn into a rotation.public void rotateVector(Ilv3DFloatVector src, Ilv3DFloatVector dest)
src
- The vector to rotate.dest
- The rotated vector (result).public Ilv3DFloatVector rotateVector(Ilv3DFloatVector src)
src
- The vector to rotate.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.