AnyCAD Rapid SDK  2020
The Rapid CAD SDK
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GMat2d Class Reference

Public Member Functions

synchronized void delete ()
 GMat2d ()
 GMat2d (GXY Col1, GXY Col2)
void SetCol (int Col, GXY Value)
void SetCols (GXY Col1, GXY Col2)
void SetDiagonal (double X1, double X2)
void SetIdentity ()
void SetRotation (double Ang)
void SetRow (int Row, GXY Value)
void SetRows (GXY Row1, GXY Row2)
void SetScale (double S)
void SetValue (int Row, int Col, double Value)
GXY Column (int Col)
double Determinant ()
GXY Diagonal ()
GXY Row (int Row)
double Value (int Row, int Col)
boolean IsSingular ()
void Add (GMat2d Other)
GMat2d Added (GMat2d Other)
void Divide (double Scalar)
GMat2d Divided (double Scalar)
void Invert ()
GMat2d Inverted ()
GMat2d Multiplied (GMat2d Other)
void Multiply (GMat2d Other)
void PreMultiply (GMat2d Other)
GMat2d Multiplied (double Scalar)
void Multiply (double Scalar)
void Power (int N)
GMat2d Powered (int N)
void Subtract (GMat2d Other)
GMat2d Subtracted (GMat2d Other)
void Transpose ()
GMat2d Transposed ()

Protected Member Functions

 GMat2d (long cPtr, boolean cMemoryOwn)
void finalize ()

Static Protected Member Functions

static long getCPtr (GMat2d obj)

Protected Attributes

transient boolean swigCMemOwn

Detailed Description

Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations.

Constructor & Destructor Documentation

GMat2d.GMat2d ( )

Creates a matrix with null coefficients.

GMat2d.GMat2d ( GXY  Col1,
GXY  Col2 

Col1, Col2 are the 2 columns of the matrix.

Member Function Documentation

GMat2d GMat2d.Added ( GMat2d  Other)

Computes the sum of this matrix and the matrix Other.for each coefficient of the matrix : <me>.Coef(i,j) + <Other>.Coef(i,j) Note: - operator += assigns the result to this matrix, while - operator + creates a new one.

GXY GMat2d.Column ( int  Col)

Returns the column of Col index. Raises OutOfRange if Col < 1 or Col > 2

double GMat2d.Determinant ( )

Computes the determinant of the matrix.

GXY GMat2d.Diagonal ( )

Returns the main diagonal of the matrix.

GMat2d GMat2d.Divided ( double  Scalar)

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

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

void GMat2d.Multiply ( double  Scalar)

Multiplies all the coefficients of the matrix by a scalar.

GMat2d GMat2d.Powered ( int  N)

computes <me> = <me> * <me> * .......* <me>, N time. if N = 0 <me> = Identity if N < 0 <me> = <me>.Invert() *...........* <me>.Invert(). If N < 0 an exception can be raised if the matrix is not inversible

void GMat2d.PreMultiply ( GMat2d  Other)

Modifies this matrix by premultiplying it by the matrix Other <me> = Other * <me>.

GXY GMat2d.Row ( int  Row)

Returns the row of index Row. Raised if Row < 1 or Row > 2

void GMat2d.SetCol ( int  Col,
GXY  Value 

Assigns the two coordinates of Value to the column of range Col of this matrix Raises OutOfRange if Col < 1 or Col > 2.

void GMat2d.SetCols ( GXY  Col1,
GXY  Col2 

Assigns the number pairs Col1, Col2 to the two columns of this matrix

void GMat2d.SetDiagonal ( double  X1,
double  X2 

Modifies the main diagonal of the matrix. <me>.Value (1, 1) = X1 <me>.Value (2, 2) = X2 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  Ang)

Modifies this matrix, so that it representso a rotation. Ang is the angular value in radian of the rotation.

void GMat2d.SetRow ( int  Row,
GXY  Value 

Assigns the two coordinates of Value to the row of index Row of this matrix. Raises OutOfRange if Row < 1 or Row > 2.

void GMat2d.SetRows ( GXY  Row1,
GXY  Row2 

Assigns the number pairs Row1, Row2 to the two rows of this matrix.

void GMat2d.SetScale ( double  S)

Modifies the matrix such that it represents a scaling transformation, where S is the scale factor : | S 0.0 | <me> = | 0.0 S |

void GMat2d.SetValue ( int  Row,
int  Col,
double  Value 

Assigns <Value> to the coefficient of row Row, column Col of this matrix. Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 2

GMat2d GMat2d.Subtracted ( GMat2d  Other)

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

GMat2d GMat2d.Transposed ( )

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

double GMat2d.Value ( int  Row,
int  Col 

Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 2