AnyCAD Rapid API 2024
Help you to create a better world!
载入中...
搜索中...
未找到
GMat类 参考

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() [1/2]

GMat.GMat ( )

creates a matrix with null coefficients.

◆ GMat() [2/2]

GMat.GMat ( GXYZ theCol1,
GXYZ theCol2,
GXYZ theCol3 )

Creates a matrix. theCol1, theCol2, theCol3 are the 3 columns of the matrix.

成员函数说明

◆ Added()

GMat GMat.Added ( GMat theOther)

Computes the sum of this matrix and the matrix theOther for each coefficient of the matrix : <me>.Coef(i,j) + <theOther>.Coef(i,j)

◆ Column()

GXYZ GMat.Column ( int theCol)

Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 3

◆ Determinant()

double GMat.Determinant ( )

Computes the determinant of the matrix.

◆ Diagonal()

GXYZ GMat.Diagonal ( )

Returns the main diagonal of the matrix.

◆ Divided()

GMat GMat.Divided ( double theScalar)

Divides all the coefficients of the matrix by Scalar

◆ Inverted()

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.

◆ IsSingular()

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.

◆ Multiplied()

GMat GMat.Multiplied ( GMat theOther)

Computes the product of two matrices <me> * <Other>

◆ Multiply() [1/2]

void GMat.Multiply ( double theScalar)

Multiplies all the coefficients of the matrix by Scalar

◆ Multiply() [2/2]

void GMat.Multiply ( GMat theOther)

Computes the product of two matrices <me> = <Other> * <me>.

◆ Powered()

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

◆ Row()

GXYZ GMat.Row ( int theRow)

returns the row of theRow index. Raises OutOfRange if theRow < 1 or theRow > 3

◆ SetCol()

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.

◆ SetCols()

void GMat.SetCols ( GXYZ theCol1,
GXYZ theCol2,
GXYZ theCol3 )

Assigns the number triples theCol1, theCol2, theCol3 to the three columns of this matrix.

◆ SetCross()

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.

◆ SetDiagonal()

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.

◆ SetDot()

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.

◆ SetIdentity()

void GMat.SetIdentity ( )

Modifies this matrix so that it represents the Identity matrix.

◆ SetRotation()

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()

◆ SetRow()

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.

◆ SetRows()

void GMat.SetRows ( GXYZ theRow1,
GXYZ theRow2,
GXYZ theRow3 )

Assigns the number triples theRow1, theRow2, theRow3 to the three rows of this matrix.

◆ SetScale()

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 |

◆ SetValue()

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

◆ Subtracted()

GMat GMat.Subtracted ( GMat theOther)

cOmputes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j)

◆ Transposed()

GMat GMat.Transposed ( )

Transposes the matrix. A(j, i) -> A (i, j)

◆ Value()

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