Package com.openinventor.inventor
Class SbMatrix3
java.lang.Object
com.openinventor.inventor.SbBasic
com.openinventor.inventor.SbMatrix3
3x3 matrix class.
3x3 matrix class/datatype.
See SbMatrix for discussion of storage layout and usage of matrices.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatdet()Returns the determinant of the matrix.booleanfloat[]getValue()floatgetValueAt(int index) static SbMatrix3identity()Returns an identity matrix.inverse()Returns the inverse of the matrix.voidSets matrix to be identity.voidPost-multiplies the matrix by the given matrix (equivalent tomultRight()method).Pre-multiplies matrix by the given matrix.multMatrixVec(SbVec3f src) Post-multiplies matrix by the given column vector, giving a 3D vector result.Post-multiplies the matrix by the given matrix.multVecMatrix(SbVec3f src) Pre-multiplies matrix by the given row vector, giving a 3D vector result.voidSets matrix to rotate by given rotation.voidsetScale(float s) Sets matrix to scale by given uniform factor.voidSets matrix to scale by given vector.setValue(float[] components) setValue(float[] components, int startIndex) setValue(float c0, float c1, float c2, float c3, float c4, float c5, float c6, float c7, float c8) voidvoidsetValueAt(int index, float value) Multiplies two matrices, returning a matrix result.Multiplies matrices by vector, returning a matrix result.static SbMatrix3[]toArray(long nativeArray, long length)
-
Field Details
-
array
public final float[] array
-
-
Constructor Details
-
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
-
SbMatrix3
public SbMatrix3()
-
-
Method Details
-
setValue
-
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
-
setValue
-
identity
Returns an identity matrix. -
setRotate
Sets matrix to rotate by given rotation. -
equals
-
makeIdentity
public void makeIdentity()Sets matrix to be identity. -
toArray
-
setScale
public void setScale(float s) Sets matrix to scale by given uniform factor. -
setScale
Sets matrix to scale by given vector. -
times
Multiplies matrices by vector, returning a matrix result. Return M*v -
det
public float det()Returns the determinant of the matrix. -
multVecMatrix
Pre-multiplies matrix by the given row vector, giving a 3D vector result. -
inverse
Returns the inverse of the matrix. Results are undefined for singular matrices.
The matrix is not modified. -
multLeft
Pre-multiplies matrix by the given matrix. Matrix is replaced by the result. -
multRight
Post-multiplies the matrix by the given matrix. Matrix is replaced by the result. -
times
Multiplies two matrices, returning a matrix result. -
multMatrixVec
Post-multiplies matrix by the given column vector, giving a 3D vector result. -
multiply
Post-multiplies the matrix by the given matrix (equivalent tomultRight()method). Matrix is replaced by the resulting matrix.
-