Package com.openinventor.inventor
Class SbMatrix3
- java.lang.Object
-
- com.openinventor.inventor.SbBasic
-
- com.openinventor.inventor.SbMatrix3
-
-
Field Summary
Fields Modifier and Type Field Description float[]
array
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
det()
Returns the determinant of the matrix.boolean
equals(java.lang.Object obj)
float[]
getValue()
float
getValueAt(int index)
static SbMatrix3
identity()
Returns an identity matrix.SbMatrix3
inverse()
Returns the inverse of the matrix.void
makeIdentity()
Sets matrix to be identity.void
multiply(SbMatrix3 m)
Post-multiplies the matrix by the given matrix (equivalent tomultRight()
method).SbMatrix3
multLeft(SbMatrix3 m)
Pre-multiplies matrix by the given matrix.SbVec3f
multMatrixVec(SbVec3f src)
Post-multiplies matrix by the given column vector, giving a 3D vector result.SbMatrix3
multRight(SbMatrix3 m)
Post-multiplies the matrix by the given matrix.SbVec3f
multVecMatrix(SbVec3f src)
Pre-multiplies matrix by the given row vector, giving a 3D vector result.void
setRotate(SbRotation q)
Sets matrix to rotate by given rotation.void
setScale(float s)
Sets matrix to scale by given uniform factor.void
setScale(SbVec3f s)
Sets matrix to scale by given vector.SbMatrix3
setValue(float[] components)
SbMatrix3
setValue(float[] components, int startIndex)
SbMatrix3
setValue(float c0, float c1, float c2, float c3, float c4, float c5, float c6, float c7, float c8)
void
setValue(SbMatrix3 copyFrom)
void
setValueAt(int index, float value)
SbMatrix3
times(SbMatrix3 m2)
Multiplies two matrices, returning a matrix result.SbVec3f
times(SbVec3f v)
Multiplies matrices by vector, returning a matrix result.static SbMatrix3[]
toArray(long nativeArray, long length)
-
-
-
Constructor Detail
-
SbMatrix3
public SbMatrix3(float[] components)
-
SbMatrix3
public SbMatrix3(float c0, float c1, float c2, float c3, float c4, float c5, float c6, float c7, float c8)
-
SbMatrix3
public SbMatrix3(SbMatrix3 copyFrom)
-
SbMatrix3
public SbMatrix3()
-
-
Method Detail
-
setValue
public void setValue(SbMatrix3 copyFrom)
-
getValue
public float[] getValue()
-
getValueAt
public float getValueAt(int index)
-
setValueAt
public void setValueAt(int index, float value)
-
setValue
public SbMatrix3 setValue(float c0, float c1, float c2, float c3, float c4, float c5, float c6, float c7, float c8)
-
setValue
public SbMatrix3 setValue(float[] components, int startIndex)
-
setValue
public SbMatrix3 setValue(float[] components)
-
identity
public static SbMatrix3 identity()
Returns an identity matrix.
-
setRotate
public void setRotate(SbRotation q)
Sets matrix to rotate by given rotation.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
makeIdentity
public void makeIdentity()
Sets matrix to be identity.
-
toArray
public static SbMatrix3[] toArray(long nativeArray, long length)
-
setScale
public void setScale(float s)
Sets matrix to scale by given uniform factor.
-
setScale
public void setScale(SbVec3f s)
Sets matrix to scale by given vector.
-
times
public SbVec3f times(SbVec3f v)
Multiplies matrices by vector, returning a matrix result. Return M*v
-
det
public float det()
Returns the determinant of the matrix.
-
multVecMatrix
public SbVec3f multVecMatrix(SbVec3f src)
Pre-multiplies matrix by the given row vector, giving a 3D vector result.
-
inverse
public SbMatrix3 inverse()
Returns the inverse of the matrix. Results are undefined for singular matrices.
The matrix is not modified.
-
multLeft
public SbMatrix3 multLeft(SbMatrix3 m)
Pre-multiplies matrix by the given matrix. Matrix is replaced by the result.
-
multRight
public SbMatrix3 multRight(SbMatrix3 m)
Post-multiplies the matrix by the given matrix. Matrix is replaced by the result.
-
multMatrixVec
public SbVec3f multMatrixVec(SbVec3f src)
Post-multiplies matrix by the given column vector, giving a 3D vector result.
-
multiply
public void multiply(SbMatrix3 m)
Post-multiplies the matrix by the given matrix (equivalent tomultRight()
method). Matrix is replaced by the resulting matrix.
-
-