![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Describes a three column, three row matrix. This sort of object is used in various vectorial or matrix computations. More...
#include <gp_Mat.hxx>
Public Member Functions | |
| constexpr | gp_Mat () noexcept |
| Creates a matrix with null coefficients. | |
| constexpr | gp_Mat (const double theA11, const double theA12, const double theA13, const double theA21, const double theA22, const double theA23, const double theA31, const double theA32, const double theA33) noexcept |
| gp_Mat (const gp_XYZ &theCol1, const gp_XYZ &theCol2, const gp_XYZ &theCol3) | |
| Creates a matrix. theCol1, theCol2, theCol3 are the 3 columns of the matrix. | |
| void | SetCol (const int theCol, const gp_XYZ &theValue) |
| Assigns the three coordinates of theValue to the column of index theCol of this matrix. Raises OutOfRange if theCol < 1 or theCol > 3. | |
| void | SetCols (const gp_XYZ &theCol1, const gp_XYZ &theCol2, const gp_XYZ &theCol3) |
| Assigns the number triples theCol1, theCol2, theCol3 to the three columns of this matrix. | |
| void | SetCross (const gp_XYZ &theRef) |
| Modifies the matrix M so that applying it to any number triple (X, Y, Z) produces the same result as the cross product of theRef and the number triple (X, Y, Z): i.e.: M * {X,Y,Z}t = theRef.Cross({X, Y ,Z}) this matrix is anti symmetric. To apply this matrix to the triplet {XYZ} is the same as to do the cross product between the triplet theRef and the triplet {XYZ}. Note: this matrix is anti-symmetric. | |
| constexpr void | SetDiagonal (const double theX1, const double theX2, const double theX3) noexcept |
| Modifies the main diagonal of the matrix. | |
| void | SetDot (const gp_XYZ &theRef) noexcept |
| Modifies this matrix so that applying it to any number triple (X, Y, Z) produces the same result as the scalar product of theRef and the number triple (X, Y, Z): this * (X,Y,Z) = theRef.(X,Y,Z) Note: this matrix is symmetric. | |
| constexpr void | SetIdentity () noexcept |
| Modifies this matrix so that it represents the Identity matrix. | |
| void | SetRotation (const gp_XYZ &theAxis, const double theAng) |
| Modifies this matrix so that it represents a rotation. theAng is the angular value in radians and the XYZ axis gives the direction of the rotation. Raises ConstructionError if XYZ.Modulus() <= Resolution() | |
| void | SetRow (const int theRow, const gp_XYZ &theValue) |
| Assigns the three coordinates of Value to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 3. | |
| void | SetRows (const gp_XYZ &theRow1, const gp_XYZ &theRow2, const gp_XYZ &theRow3) |
| Assigns the number triples theRow1, theRow2, theRow3 to the three rows of this matrix. | |
| constexpr void | SetScale (const double theS) noexcept |
| Modifies the matrix so that it represents a scaling transformation, where theS is the scale factor. : | |
| void | SetValue (const int theRow, const int theCol, const double theValue) |
| Assigns <theValue> to the coefficient of row theRow, column theCol of this matrix. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3. | |
| gp_XYZ | Column (const int theCol) const |
| Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 3. | |
| constexpr double | Determinant () const noexcept |
| Computes the determinant of the matrix. | |
| gp_XYZ | Diagonal () const |
| Returns the main diagonal of the matrix. | |
| gp_XYZ | Row (const int theRow) const |
| returns the row of theRow index. Raises OutOfRange if theRow < 1 or theRow > 3 | |
| const double & | Value (const int theRow, const int theCol) const |
| Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3. | |
| const double & | operator() (const int theRow, const int theCol) const |
| double & | ChangeValue (const int theRow, const int theCol) |
| Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3. | |
| double & | operator() (const int theRow, const int theCol) |
| constexpr bool | IsSingular () const noexcept |
| The Gauss LU decomposition is used to invert the matrix (see Math package) so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp. | |
| constexpr void | Add (const gp_Mat &theOther) noexcept |
| constexpr void | operator+= (const gp_Mat &theOther) noexcept |
| constexpr gp_Mat | Added (const gp_Mat &theOther) const noexcept |
| Computes the sum of this matrix and the matrix theOther for each coefficient of the matrix : <me>.Coef(i,j) + <theOther>.Coef(i,j) | |
| constexpr gp_Mat | operator+ (const gp_Mat &theOther) const noexcept |
| constexpr void | Divide (const double theScalar) |
| constexpr void | operator/= (const double theScalar) |
| constexpr gp_Mat | Divided (const double theScalar) const |
| Divides all the coefficients of the matrix by Scalar. | |
| constexpr gp_Mat | operator/ (const double theScalar) const |
| void | Invert () |
| gp_Mat | Inverted () const |
| Inverses the matrix and raises if the matrix is singular. | |
| constexpr gp_Mat | Multiplied (const gp_Mat &theOther) const noexcept |
| Computes the product of two matrices <me> * <Other> | |
| constexpr gp_Mat | operator* (const gp_Mat &theOther) const noexcept |
| constexpr void | Multiply (const gp_Mat &theOther) noexcept |
| Computes the product of two matrices <me> = <Other> * <me>. | |
| constexpr void | operator*= (const gp_Mat &theOther) noexcept |
| constexpr void | PreMultiply (const gp_Mat &theOther) noexcept |
| constexpr gp_Mat | Multiplied (const double theScalar) const noexcept |
| constexpr gp_Mat | operator* (const double theScalar) const noexcept |
| constexpr void | Multiply (const double theScalar) noexcept |
| Multiplies all the coefficients of the matrix by Scalar. | |
| constexpr void | operator*= (const double theScalar) noexcept |
| void | Power (const int N) |
| gp_Mat | Powered (const int theN) const |
| Computes <me> = <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Invert() *...........* <me>.Invert(). If theN < 0 an exception will be raised if the matrix is not inversible. | |
| constexpr void | Subtract (const gp_Mat &theOther) noexcept |
| constexpr void | operator-= (const gp_Mat &theOther) noexcept |
| constexpr gp_Mat | Subtracted (const gp_Mat &theOther) const noexcept |
| cOmputes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j) | |
| constexpr gp_Mat | operator- (const gp_Mat &theOther) const noexcept |
| void | Transpose () |
| gp_Mat | Transposed () const |
| Transposes the matrix. A(j, i) -> A (i, j) | |
| void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| Dumps the content of me into the stream. | |
Describes a three column, three row matrix. This sort of object is used in various vectorial or matrix computations.
|
inlineconstexprnoexcept |
Creates a matrix with null coefficients.
|
inlineconstexprnoexcept |
Creates a matrix. theCol1, theCol2, theCol3 are the 3 columns of the matrix.
Computes the sum of this matrix and the matrix theOther for each coefficient of the matrix : <me>.Coef(i,j) + <theOther>.Coef(i,j)
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3.
Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 3.
Computes the determinant of the matrix.
| gp_XYZ gp_Mat::Diagonal | ( | ) | const |
Returns the main diagonal of the matrix.
Divides all the coefficients of the matrix by Scalar.
| void gp_Mat::DumpJson | ( | Standard_OStream & | theOStream, |
| int | theDepth = -1 ) const |
Dumps the content of me into the stream.
| void gp_Mat::Invert | ( | ) |
| gp_Mat gp_Mat::Inverted | ( | ) | const |
Inverses the matrix and raises if the matrix is singular.
The Gauss LU decomposition is used to invert the matrix (see Math package) so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp.
Computes the product of two matrices <me> * <Other>
Multiplies all the coefficients of the matrix by Scalar.
Computes the product of two matrices <me> = <Other> * <me>.
returns the row of theRow index. Raises OutOfRange if theRow < 1 or theRow > 3
Assigns the three coordinates of theValue to the column of index theCol of this matrix. Raises OutOfRange if theCol < 1 or theCol > 3.
Assigns the number triples theCol1, theCol2, theCol3 to the three columns of this matrix.
Modifies the matrix M so that applying it to any number triple (X, Y, Z) produces the same result as the cross product of theRef and the number triple (X, Y, Z): i.e.: M * {X,Y,Z}t = theRef.Cross({X, Y ,Z}) this matrix is anti symmetric. To apply this matrix to the triplet {XYZ} is the same as to do the cross product between the triplet theRef and the triplet {XYZ}. Note: this matrix is anti-symmetric.
|
inlineconstexprnoexcept |
Modifies the main diagonal of the matrix.
The other coefficients of the matrix are not modified.
Modifies this matrix so that applying it to any number triple (X, Y, Z) produces the same result as the scalar product of theRef and the number triple (X, Y, Z): this * (X,Y,Z) = theRef.(X,Y,Z) Note: this matrix is symmetric.
Modifies this matrix so that it represents the Identity matrix.
Modifies this matrix so that it represents a rotation. theAng is the angular value in radians and the XYZ axis gives the direction of the rotation. Raises ConstructionError if XYZ.Modulus() <= Resolution()
Assigns the three coordinates of Value to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 3.
Assigns the number triples theRow1, theRow2, theRow3 to the three rows of this matrix.
Assigns <theValue> to the coefficient of row theRow, column theCol of this matrix. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3.
cOmputes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j)
|
inline |
|
inline |
Transposes the matrix. A(j, i) -> A (i, j)
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3.