public class SbMatrixd extends SbBasic
See SbMatrix
for discussion of storage layout and usage of matrices.
See also:
SbMatrix
, SbMatrix3
, SbRotation
, SbRotationd
, SbVec2d
, SbVec2f
, SbVec2i32
, SbVec2s
, SbVec3d
, SbVec3f
, SbVec3i32
, SbVec3s
, SbVec4b
, SbVec4d
, SbVec4f
, SbVec4i32
, SbVec4s
, SbVec4ub
, SbVec4ui32
, SbVec4us
Modifier and Type | Class and Description |
---|---|
static class |
SbMatrixd.Decomposition |
static class |
SbMatrixd.Factorization |
Modifier and Type | Field and Description |
---|---|
double[] |
array |
Constructor and Description |
---|
SbMatrixd() |
SbMatrixd(double[] components) |
SbMatrixd(double c0,
double c1,
double c2,
double c3,
double c4,
double c5,
double c6,
double c7,
double c8,
double c9,
double c10,
double c11,
double c12,
double c13,
double c14,
double c15) |
SbMatrixd(SbMatrixd copyFrom) |
Modifier and Type | Method and Description |
---|---|
SbMatrixd.Decomposition |
decompose()
Return translation, rotation, scale, and scale orientation components of the matrix.
|
SbMatrixd.Decomposition |
decompose(SbVec3d center)
Decomposes the matrix into a translation, rotation, scale, and scale orientation.
|
double |
det3()
Returns determinant of upper-left 3x3 submatrix.
|
double |
det3(int r1,
int r2,
int r3,
int c1,
int c2,
int c3)
Returns determinant of 3x3 submatrix composed of given row and column indices (0-3 for each).
|
double |
det4()
Returns determinant of entire matrix.
|
boolean |
equals(java.lang.Object obj) |
boolean |
equals(SbMatrixd m,
double tolerance)
Equality comparison within given tolerance, for each component.
|
SbMatrixd.Factorization |
factor()
Factors a matrix m into 5 pieces: m = r s r^ u t, where r^ means transpose of r, and r and u are rotations, s is a scale, and t is a translation.
|
double[] |
getValue() |
double |
getValueAt(int index) |
static SbMatrixd |
identity()
Returns an identity matrix.
|
SbMatrixd |
inverse()
Returns inverse of matrix.
|
boolean |
isInvertible()
Returns true if the matrix is invertible.
|
void |
makeIdentity()
Sets matrix to be identity.
|
SbVec3d |
multDirMatrix(SbVec3d src)
Pre-multiplies the matrix by the given row vector, giving vector result.
|
void |
multiply(SbMatrixd m)
Post-multiplies the matrix by the given matrix (equivalent to
multRight() method). |
SbMatrixd |
multLeft(SbMatrixd m)
Pre-multiplies the matrix by given matrix.
|
SbLined |
multLineMatrix(SbLined src)
Multiplies the given line's origin by the matrix, and the line's direction by the rotation portion of the matrix.
|
SbVec3d |
multMatrixVec(SbVec3d src)
Post-multiplies matrix by given column vector, giving a 3D vector result.
|
SbMatrixd |
multRight(SbMatrixd m)
Post-multiplies the matrix by given matrix.
|
SbVec3d |
multVecMatrix(SbVec3d src)
Pre-multiplies matrix by the given row vector, giving a 3D vector result.
|
void |
scale(SbVec3d scaleFactor)
Scales this matrice by the given vector.
|
void |
setRotate(SbRotationd q)
Sets matrix to rotate by given rotation.
|
void |
setScale(double s)
Sets matrix to scale by given uniform factor.
|
void |
setScale(SbVec3d s)
Sets matrix to scale by given vector.
|
void |
setTransform(SbVec3d t,
SbRotationd r,
SbVec3d s)
Composes the matrix based on a translation, rotation, and scale.
|
void |
setTransform(SbVec3d t,
SbRotationd r,
SbVec3d s,
SbRotationd so)
Composes the matrix based on a translation, rotation, scale, and orientation for scale.
|
void |
setTransform(SbVec3d translation,
SbRotationd rotation,
SbVec3d scaleFactor,
SbRotationd scaleOrientation,
SbVec3d center)
Composes the matrix based on a translation, rotation, scale, orientation for scale, and center.
|
void |
setTranslate(SbVec3d t)
Sets matrix to translate by given vector.
|
SbMatrixd |
setValue(double[] components) |
SbMatrixd |
setValue(double[] components,
int startIndex) |
SbMatrixd |
setValue(double c0,
double c1,
double c2,
double c3,
double c4,
double c5,
double c6,
double c7,
double c8,
double c9,
double c10,
double c11,
double c12,
double c13,
double c14,
double c15) |
void |
setValue(SbMatrix m)
Sets values from a single precision matrix.
|
void |
setValue(SbMatrixd copyFrom) |
void |
setValueAt(int index,
double value) |
SbMatrixd |
times(SbMatrixd m2)
Multiplies two matrices, returning a matrix result.
|
static SbMatrixd[] |
toArray(long nativeArray,
long length) |
void |
translate(SbVec3d translation)
Translates this matrice by the given vector.
|
SbMatrixd |
transpose()
Returns transpose of matrix.
|
public SbMatrixd(double c0, double c1, double c2, double c3, double c4, double c5, double c6, double c7, double c8, double c9, double c10, double c11, double c12, double c13, double c14, double c15)
public SbMatrixd(double[] components)
public SbMatrixd(SbMatrixd copyFrom)
public SbMatrixd()
public void setValue(SbMatrixd copyFrom)
public double getValueAt(int index)
public SbMatrixd setValue(double[] components, int startIndex)
public double[] getValue()
public SbMatrixd setValue(double[] components)
public void setValueAt(int index, double value)
public SbMatrixd setValue(double c0, double c1, double c2, double c3, double c4, double c5, double c6, double c7, double c8, double c9, double c10, double c11, double c12, double c13, double c14, double c15)
public boolean equals(SbMatrixd m, double tolerance)
public void setTransform(SbVec3d translation, SbRotationd rotation, SbVec3d scaleFactor, SbRotationd scaleOrientation, SbVec3d center)
public void setTransform(SbVec3d t, SbRotationd r, SbVec3d s)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public static SbMatrixd identity()
public boolean isInvertible()
public static SbMatrixd[] toArray(long nativeArray, long length)
public void multiply(SbMatrixd m)
multRight()
method).
Matrix is replaced by the resulting matrix.public void translate(SbVec3d translation)
public void makeIdentity()
public SbMatrixd inverse()
public void setScale(SbVec3d s)
public void setValue(SbMatrix m)
public void scale(SbVec3d scaleFactor)
public double det3()
public void setScale(double s)
public double det3(int r1, int r2, int r3, int c1, int c2, int c3)
public double det4()
public SbMatrixd.Decomposition decompose()
public SbMatrixd.Factorization factor()
public void setRotate(SbRotationd q)
public SbVec3d multVecMatrix(SbVec3d src)
Use this method to transform a point (position vector).
Use multDirMatrix()
to transform a normal (direction vector).
public void setTransform(SbVec3d t, SbRotationd r, SbVec3d s, SbRotationd so)
public SbVec3d multDirMatrix(SbVec3d src)
Note: If you need to transform surface points and normal vectors by a matrix, call multVecMatrix()
for the points and call multDirMatrix()
for the normals. Generally normals should be transformed by the inverse transpose of the matrix. However note that the inverse transpose is equal to the original matrix if the matrix is orthonormal, i.e. purely rotational with no scaling or shearing.
public void setTranslate(SbVec3d t)
public SbLined multLineMatrix(SbLined src)
public SbMatrixd multRight(SbMatrixd m)
public SbMatrixd transpose()
public SbMatrixd.Decomposition decompose(SbVec3d center)
factor()
where t is translation, u is rotation, s is scaleFactor, and r is scaleOrientation. public SbVec3d multMatrixVec(SbVec3d src)
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com