AnyCAD Rapid API 2024
Help you to create a better world!
|
Public 成员函数 | |
GMat2d () | |
GMat2d (GXY theCol1, GXY theCol2) | |
void | SetCol (int theCol, GXY theValue) |
void | SetCols (GXY theCol1, GXY theCol2) |
void | SetDiagonal (double theX1, double theX2) |
void | SetIdentity () |
void | SetRotation (double theAng) |
void | SetRow (int theRow, GXY theValue) |
void | SetRows (GXY theRow1, GXY theRow2) |
void | SetScale (double theS) |
void | SetValue (int theRow, int theCol, double theValue) |
GXY | Column (int theCol) |
double | Determinant () |
GXY | Diagonal () |
GXY | Row (int theRow) |
double | Value (int theRow, int theCol) |
boolean | IsSingular () |
void | Add (GMat2d Other) |
GMat2d | Added (GMat2d theOther) |
void | Divide (double theScalar) |
GMat2d | Divided (double theScalar) |
void | Invert () |
GMat2d | Inverted () |
GMat2d | Multiplied (GMat2d theOther) |
void | Multiply (GMat2d theOther) |
void | PreMultiply (GMat2d theOther) |
GMat2d | Multiplied (double theScalar) |
void | Multiply (double theScalar) |
void | Power (int theN) |
GMat2d | Powered (int theN) |
void | Subtract (GMat2d theOther) |
GMat2d | Subtracted (GMat2d theOther) |
void | Transpose () |
GMat2d | Transposed () |
Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations.
GMat2d.GMat2d | ( | ) |
Creates a matrix with null coefficients.
Computes the sum of this matrix and the matrix theOther.for each coefficient of the matrix : <me>.Coef(i,j) + <theOther>.Coef(i,j)
Note: - operator += assigns the result to this matrix, while - operator + creates a new one.
GXY GMat2d.Column | ( | int | theCol | ) |
Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 2
double GMat2d.Determinant | ( | ) |
Computes the determinant of the matrix.
GXY GMat2d.Diagonal | ( | ) |
Returns the main diagonal of the matrix.
GMat2d GMat2d.Divided | ( | double | theScalar | ) |
Divides all the coefficients of the matrix by a scalar.
GMat2d GMat2d.Inverted | ( | ) |
Inverses the matrix and raises exception if the matrix is singular.
boolean GMat2d.IsSingular | ( | ) |
Returns true if this matrix is singular (and therefore, cannot be inverted). The Gauss LU decomposition is used to invert the matrix so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp.
void GMat2d.Multiply | ( | double | theScalar | ) |
Multiplies all the coefficients of the matrix by a scalar.
void GMat2d.Multiply | ( | GMat2d | theOther | ) |
Computes the product of two matrices <me> * <theOther>
GMat2d GMat2d.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 can be raised if the matrix is not inversible
void GMat2d.PreMultiply | ( | GMat2d | theOther | ) |
Modifies this matrix by premultiplying it by the matrix Other <me> = theOther * <me>.
GXY GMat2d.Row | ( | int | theRow | ) |
Returns the row of index theRow. Raised if theRow < 1 or theRow > 2
void GMat2d.SetCol | ( | int | theCol, |
GXY | theValue ) |
Assigns the two coordinates of theValue to the column of range theCol of this matrix Raises OutOfRange if theCol < 1 or theCol > 2.
Assigns the number pairs theCol1, theCol2 to the two columns of this matrix
void GMat2d.SetDiagonal | ( | double | theX1, |
double | theX2 ) |
Modifies the main diagonal of the matrix. <me>.Value (1, 1) = theX1 <me>.Value (2, 2) = theX2
The other coefficients of the matrix are not modified.
void GMat2d.SetIdentity | ( | ) |
Modifies this matrix, so that it represents the Identity matrix.
void GMat2d.SetRotation | ( | double | theAng | ) |
Modifies this matrix, so that it represents a rotation. theAng is the angular value in radian of the rotation.
void GMat2d.SetRow | ( | int | theRow, |
GXY | theValue ) |
Assigns the two coordinates of theValue to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2.
Assigns the number pairs theRow1, theRow2 to the two rows of this matrix.
void GMat2d.SetScale | ( | double | theS | ) |
Modifies the matrix such that it represents a scaling transformation, where theS is the scale factor : | theS 0.0 | <me> = | 0.0 theS |
void GMat2d.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 > 2 or theCol < 1 or theCol > 2
Computes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j)
GMat2d GMat2d.Transposed | ( | ) |
Transposes the matrix. A(j, i) -> A (i, j)
double GMat2d.Value | ( | int | theRow, |
int | theCol ) |
Returns the coefficient of range (ttheheRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2