IKO_gp_Mat2d Interface
Describes a two column, two row matrix. This sort of
object is used in various vectorial or matrix computations.
Query IKO_Standard_Object from this interface to create a copy or obtain the type name
Methods
- Init
- Init1
- SetCol
- SetCols
- SetDiagonal
- SetIdentity
- SetRotation
- SetRow
- SetRows
- SetScale
- SetValue
- Column
- Determinant
- Diagonal
- Row
- Value
- ChangeValue
- IsSingular
- Add
- Added
- Divide
- Divided
- Invert
- Inverted
- Multiplied
- Multiply
- PreMultiply
- Multiplied1
- Multiply1
- Power
- Powered
- Subtract
- Subtracted
- Transpose
- Transposed
- _CSFDB_Getgp_Mat2dmatrix
HRESULT Init()
Creates a matrix with null coefficients.
HRESULT Init1(KC2D* Col1, KC2D* Col2)
HRESULT SetCol(int Col, KC2D* Value)
HRESULT SetCols(KC2D* Col1, KC2D* Col2)
HRESULT 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.
HRESULT SetIdentity()
HRESULT SetRotation(double Ang)
Modifies this matrix, so that it representso a rotation. Ang is the angular
value in radian of the rotation.
HRESULT SetRow(int Row, KC2D* Value)
HRESULT SetRows(KC2D* Row1, KC2D* Row2)
HRESULT SetScale(double S)
Modifies the matrix such that it
represents a scaling transformation, where S is the scale factor :
| S 0.0 |
this = | 0.0 S |
HRESULT 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
HRESULT Column(int Col, KC2D* ret)
HRESULT Determinant(double* ret)
Computes the determinant of the matrix.
HRESULT Diagonal(KC2D* ret)
HRESULT Row(int Row, KC2D* ret)
HRESULT Value(int Row, int Col, double* ret)
Returns the coefficient of range (Row, Col)
Raises OutOfRange
if Row 1 or Row 2 or Col 1 or Col 2
HRESULT ChangeValue(int Row, int Col, double* ret)
Returns the coefficient of range (Row, Col)
Raises OutOfRange
if Row 1 or Row 2 or Col 1 or Col 2
HRESULT IsSingular(VARIANT_BOOL* ret)
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.
HRESULT Add(IKO_gp_Mat2d* Other)
HRESULT Added(IKO_gp_Mat2d* Other, IKO_gp_Mat2d** ret)
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.
HRESULT Divide(double Scalar)
HRESULT Divided(double Scalar, IKO_gp_Mat2d** ret)
Divides all the coefficients of the matrix by a scalar.
HRESULT Invert()
HRESULT Inverted(IKO_gp_Mat2d** ret)
Inverses the matrix and raises exception if the matrix
is singular.
HRESULT Multiplied(IKO_gp_Mat2d* Other, IKO_gp_Mat2d** ret)
HRESULT Multiply(IKO_gp_Mat2d* Other)
Computes the product of two matrices this * Other
HRESULT PreMultiply(IKO_gp_Mat2d* Other)
Modifies this matrix by premultiplying it by the matrix Other
this = Other * me.
HRESULT Multiplied1(double Scalar, IKO_gp_Mat2d** ret)
HRESULT Multiply1(double Scalar)
Multiplies all the coefficients of the matrix by a scalar.
HRESULT Power(int N)
HRESULT Powered(int N, IKO_gp_Mat2d** ret)
computes this = this * this * .......* me, N time.
if N = 0 this = Identity
if N 0 this = me.Invert() *...........* me.Invert(). br
If N 0 an exception can be raised if the matrix is not
HRESULT Subtract(IKO_gp_Mat2d* Other)
HRESULT Subtracted(IKO_gp_Mat2d* Other, IKO_gp_Mat2d** ret)
Computes for each coefficient of the matrix :
me.Coef(i,j) - Other.Coef(i,j)
HRESULT Transpose()
HRESULT Transposed(IKO_gp_Mat2d** ret)
Transposes the matrix. A(j, i) -> A (i, j)
HRESULT _CSFDB_Getgp_Mat2dmatrix(int i1, int i2, double* ret)
|