AnyCAD Rapid API 2024
Help you to create a better world!
|
Public 成员函数 | |
GMat () | |
GMat (double theA11, double theA12, double theA13, double theA21, double theA22, double theA23, double theA31, double theA32, double theA33) | |
GMat (GXYZ theCol1, GXYZ theCol2, GXYZ theCol3) | |
void | SetCol (int theCol, GXYZ theValue) |
void | SetCols (GXYZ theCol1, GXYZ theCol2, GXYZ theCol3) |
void | SetCross (GXYZ theRef) |
void | SetDiagonal (double theX1, double theX2, double theX3) |
void | SetDot (GXYZ theRef) |
void | SetIdentity () |
void | SetRotation (GXYZ theAxis, double theAng) |
void | SetRow (int theRow, GXYZ theValue) |
void | SetRows (GXYZ theRow1, GXYZ theRow2, GXYZ theRow3) |
void | SetScale (double theS) |
void | SetValue (int theRow, int theCol, double theValue) |
GXYZ | Column (int theCol) |
double | Determinant () |
GXYZ | Diagonal () |
GXYZ | Row (int theRow) |
double | Value (int theRow, int theCol) |
boolean | IsSingular () |
void | Add (GMat theOther) |
GMat | Added (GMat theOther) |
void | Divide (double theScalar) |
GMat | Divided (double theScalar) |
void | Invert () |
GMat | Inverted () |
GMat | Multiplied (GMat theOther) |
void | Multiply (GMat theOther) |
void | PreMultiply (GMat theOther) |
GMat | Multiplied (double theScalar) |
void | Multiply (double theScalar) |
void | Power (int N) |
GMat | Powered (int theN) |
void | Subtract (GMat theOther) |
GMat | Subtracted (GMat theOther) |
void | Transpose () |
GMat | Transposed () |
Describes a three column, three row matrix. This sort of object is used in various vectorial or matrix computations.
GMat.GMat | ( | ) |
creates a matrix with null coefficients.
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)
GXYZ GMat.Column | ( | int | theCol | ) |
Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 3
double GMat.Determinant | ( | ) |
Computes the determinant of the matrix.
GXYZ GMat.Diagonal | ( | ) |
Returns the main diagonal of the matrix.
GMat GMat.Divided | ( | double | theScalar | ) |
Divides all the coefficients of the matrix by Scalar
GMat GMat.Inverted | ( | ) |
Inverses the matrix and raises if the matrix is singular. - Invert assigns the result to this matrix, while - Inverted creates a new one. Warning The Gauss LU decomposition is used to invert the matrix. Consequently, the matrix is considered as singular if the largest pivot found is less than or equal to gp::Resolution(). Exceptions Standard_ConstructionError if this matrix is singular, and therefore cannot be inverted.
boolean GMat.IsSingular | ( | ) |
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.
void GMat.Multiply | ( | double | theScalar | ) |
Multiplies all the coefficients of the matrix by Scalar
void GMat.Multiply | ( | GMat | theOther | ) |
Computes the product of two matrices <me> = <Other> * <me>.
GMat GMat.Powered | ( | int | theN | ) |
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
GXYZ GMat.Row | ( | int | theRow | ) |
returns the row of theRow index. Raises OutOfRange if theRow < 1 or theRow > 3
void GMat.SetCol | ( | int | theCol, |
GXYZ | theValue ) |
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.
void GMat.SetCross | ( | GXYZ | 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.
void GMat.SetDiagonal | ( | double | theX1, |
double | theX2, | ||
double | theX3 ) |
Modifies the main diagonal of the matrix. <me>.Value (1, 1) = theX1 <me>.Value (2, 2) = theX2 <me>.Value (3, 3) = theX3
The other coefficients of the matrix are not modified.
void GMat.SetDot | ( | GXYZ | theRef | ) |
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.
void GMat.SetIdentity | ( | ) |
Modifies this matrix so that it represents the Identity matrix.
void GMat.SetRotation | ( | GXYZ | theAxis, |
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 GMat.SetRow | ( | int | theRow, |
GXYZ | theValue ) |
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.
void GMat.SetScale | ( | double | theS | ) |
Modifies the matrix so that it represents a scaling transformation, where theS is the scale factor. : | theS 0.0 0.0 | <me> = | 0.0 theS 0.0 | | 0.0 0.0 theS |
void GMat.SetValue | ( | int | theRow, |
int | theCol, | ||
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
cOmputes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j)
GMat GMat.Transposed | ( | ) |
Transposes the matrix. A(j, i) -> A (i, j)
double GMat.Value | ( | int | theRow, |
int | theCol ) |
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3