OCC Main Page | FoundationClasses | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FoundationClasses
TKMath
gp


gp_Mat Class Reference

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

#include <gp_Mat.hxx>


Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
 gp_Mat ()
 creates a matrix with null coefficients.

 gp_Mat (const Standard_Real a11, const Standard_Real a12, const Standard_Real a13, const Standard_Real a21, const Standard_Real a22, const Standard_Real a23, const Standard_Real a31, const Standard_Real a32, const Standard_Real a33)
Standard_EXPORT gp_Mat (const gp_XYZ &Col1, const gp_XYZ &Col2, const gp_XYZ &Col3)
 Creates a matrix.
Col1, Col2, Col3 are the 3 columns of the matrix.
.
Standard_EXPORT void SetCol (const Standard_Integer Col, const gp_XYZ &Value)
 Assigns the three coordinates of Value to the column of index
Col of this matrix.
Raises OutOfRange if Col < 1 or Col > 3.
.
Standard_EXPORT void SetCols (const gp_XYZ &Col1, const gp_XYZ &Col2, const gp_XYZ &Col3)
 Assigns the number triples Col1, Col2, Col3 to the three
columns of this matrix.
.
Standard_EXPORT void SetCross (const gp_XYZ &Ref)
 Modifies the matrix M so that applying it to any number
triple (X, Y, Z) produces the same result as the cross
product of Ref and the number triple (X, Y, Z):
i.e.: M * {X,Y,Z}t = Ref.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 Ref and the triplet {XYZ}.
Note: this matrix is anti-symmetric.
.
void SetDiagonal (const Standard_Real X1, const Standard_Real X2, const Standard_Real X3)
 Modifies the main diagonal of the matrix.
<me>.Value (1, 1) = X1
<me>.Value (2, 2) = X2
<me>.Value (3, 3) = X3
The other coefficients of the matrix are not modified.
.
Standard_EXPORT void SetDot (const gp_XYZ &Ref)
 Modifies this matrix so that applying it to any number
triple (X, Y, Z) produces the same result as the scalar
product of Ref and the number triple (X, Y, Z):
this * (X,Y,Z) = Ref.(X,Y,Z)
Note: this matrix is symmetric.
.
void SetIdentity ()
 Modifies this matrix so that it represents the Identity matrix.
.
Standard_EXPORT void SetRotation (const gp_XYZ &Axis, const Standard_Real Ang)
 Modifies this matrix so that it represents a rotation. Ang is the angular value in
radians and the XYZ axis gives the direction of the
rotation.
Raises ConstructionError if XYZ.Modulus() <= Resolution()
.
Standard_EXPORT void SetRow (const Standard_Integer Row, const gp_XYZ &Value)
 Assigns the three coordinates of Value to the row of index
Row of this matrix. Raises OutOfRange if Row < 1 or Row > 3.
.
Standard_EXPORT void SetRows (const gp_XYZ &Row1, const gp_XYZ &Row2, const gp_XYZ &Row3)
 Assigns the number triples Row1, Row2, Row3 to the three
rows of this matrix.
.
void SetScale (const Standard_Real S)
 Modifies the the matrix so that it represents
a scaling transformation, where S is the scale factor. :
| S 0.0 0.0 |
<me> = | 0.0 S 0.0 |
| 0.0 0.0 S |
.
void SetValue (const Standard_Integer Row, const Standard_Integer Col, const Standard_Real Value)
 Assigns <value> to the coefficient of row Row, column Col of this matrix.
Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
.
Standard_EXPORT gp_XYZ Column (const Standard_Integer Col) const
 Returns the column of Col index.
Raises OutOfRange if Col < 1 or Col > 3
.
Standard_Real Determinant () const
 Computes the determinant of the matrix.
.
Standard_EXPORT gp_XYZ Diagonal () const
 Returns the main diagonal of the matrix.
.
Standard_EXPORT gp_XYZ Row (const Standard_Integer Row) const
 returns the row of Row index.
Raises OutOfRange if Row < 1 or Row > 3

const Standard_RealValue (const Standard_Integer Row, const Standard_Integer Col) const
 Returns the coefficient of range (Row, Col)
Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
.
const Standard_Realoperator() (const Standard_Integer Row, const Standard_Integer Col) const
Standard_RealChangeValue (const Standard_Integer Row, const Standard_Integer Col)
 Returns the coefficient of range (Row, Col)
Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
.
Standard_Realoperator() (const Standard_Integer Row, const Standard_Integer Col)
Standard_Boolean IsSingular () const
 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 Add (const gp_Mat &Other)
void operator+= (const gp_Mat &Other)
gp_Mat Added (const gp_Mat &Other) const
 Computes the sum of this matrix and
the matrix Other for each coefficient of the matrix :
<me>.Coef(i,j) + <other>.Coef(i,j)
.
gp_Mat operator+ (const gp_Mat &Other) const
void Divide (const Standard_Real Scalar)
void operator/= (const Standard_Real Scalar)
gp_Mat Divided (const Standard_Real Scalar) const
 Divides all the coefficients of the matrix by Scalar
.
gp_Mat operator/ (const Standard_Real Scalar) const
Standard_EXPORT void Invert ()
Standard_EXPORT gp_Mat Inverted () const
 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.
.
gp_Mat Multiplied (const gp_Mat &Other) const
 Computes the product of two matrices <me> * <other>
.
gp_Mat operator * (const gp_Mat &Other) const
void Multiply (const gp_Mat &Other)
 Computes the product of two matrices <me> = <other> * <me>.
.
void operator *= (const gp_Mat &Other)
void PreMultiply (const gp_Mat &Other)
gp_Mat Multiplied (const Standard_Real Scalar) const
gp_Mat operator * (const Standard_Real Scalar) const
void Multiply (const Standard_Real Scalar)
 Multiplies all the coefficients of the matrix by Scalar
.
void operator *= (const Standard_Real Scalar)
Standard_EXPORT void Power (const Standard_Integer N)
gp_Mat Powered (const Standard_Integer N) const
 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 will be raised if the matrix is not
inversible
.
void Subtract (const gp_Mat &Other)
void operator-= (const gp_Mat &Other)
gp_Mat Subtracted (const gp_Mat &Other) const
 cOmputes for each coefficient of the matrix :
<me>.Coef(i,j) - <other>.Coef(i,j)

gp_Mat operator- (const gp_Mat &Other) const
void Transpose ()
gp_Mat Transposed () const
 Transposes the matrix. A(j, i) -> A (i, j)
.
Standard_Real_CSFDB_Getgp_Matmatrix (const Standard_Integer i1, const Standard_Integer i2)

Private Attributes

Standard_Real matrix [3][3]

Friends

Standard_EXPORT friend Handle_Standard_Type & gp_Mat_Type_ ()


Constructor & Destructor Documentation

gp_Mat::gp_Mat  )  [inline]
 

gp_Mat::gp_Mat const Standard_Real  a11,
const Standard_Real  a12,
const Standard_Real  a13,
const Standard_Real  a21,
const Standard_Real  a22,
const Standard_Real  a23,
const Standard_Real  a31,
const Standard_Real  a32,
const Standard_Real  a33
[inline]
 

Standard_EXPORT gp_Mat::gp_Mat const gp_XYZ Col1,
const gp_XYZ Col2,
const gp_XYZ Col3
 


Member Function Documentation

Standard_Real& gp_Mat::_CSFDB_Getgp_Matmatrix const Standard_Integer  i1,
const Standard_Integer  i2
[inline]
 

void gp_Mat::Add const gp_Mat Other  )  [inline]
 

gp_Mat gp_Mat::Added const gp_Mat Other  )  const [inline]
 

Standard_Real & gp_Mat::ChangeValue const Standard_Integer  Row,
const Standard_Integer  Col
[inline]
 

Standard_EXPORT gp_XYZ gp_Mat::Column const Standard_Integer  Col  )  const
 

Standard_Real gp_Mat::Determinant  )  const [inline]
 

Standard_EXPORT gp_XYZ gp_Mat::Diagonal  )  const
 

void gp_Mat::Divide const Standard_Real  Scalar  )  [inline]
 

gp_Mat gp_Mat::Divided const Standard_Real  Scalar  )  const [inline]
 

Standard_EXPORT void gp_Mat::Invert  ) 
 

Standard_EXPORT gp_Mat gp_Mat::Inverted  )  const
 

Standard_Boolean gp_Mat::IsSingular  )  const [inline]
 

gp_Mat gp_Mat::Multiplied const Standard_Real  Scalar  )  const [inline]
 

gp_Mat gp_Mat::Multiplied const gp_Mat Other  )  const [inline]
 

void gp_Mat::Multiply const Standard_Real  Scalar  )  [inline]
 

void gp_Mat::Multiply const gp_Mat Other  )  [inline]
 

gp_Mat gp_Mat::operator * const Standard_Real  Scalar  )  const [inline]
 

gp_Mat gp_Mat::operator * const gp_Mat Other  )  const [inline]
 

void gp_Mat::operator *= const Standard_Real  Scalar  )  [inline]
 

void gp_Mat::operator *= const gp_Mat Other  )  [inline]
 

void gp_Mat::operator delete void *  anAddress  )  [inline]
 

void* gp_Mat::operator new size_t  size  )  [inline]
 

void* gp_Mat::operator new size_t  ,
void *  anAddress
[inline]
 

Standard_Real& gp_Mat::operator() const Standard_Integer  Row,
const Standard_Integer  Col
[inline]
 

const Standard_Real& gp_Mat::operator() const Standard_Integer  Row,
const Standard_Integer  Col
const [inline]
 

gp_Mat gp_Mat::operator+ const gp_Mat Other  )  const [inline]
 

void gp_Mat::operator+= const gp_Mat Other  )  [inline]
 

gp_Mat gp_Mat::operator- const gp_Mat Other  )  const [inline]
 

void gp_Mat::operator-= const gp_Mat Other  )  [inline]
 

gp_Mat gp_Mat::operator/ const Standard_Real  Scalar  )  const [inline]
 

void gp_Mat::operator/= const Standard_Real  Scalar  )  [inline]
 

Standard_EXPORT void gp_Mat::Power const Standard_Integer  N  ) 
 

gp_Mat gp_Mat::Powered const Standard_Integer  N  )  const [inline]
 

void gp_Mat::PreMultiply const gp_Mat Other  )  [inline]
 

Standard_EXPORT gp_XYZ gp_Mat::Row const Standard_Integer  Row  )  const
 

Standard_EXPORT void gp_Mat::SetCol const Standard_Integer  Col,
const gp_XYZ Value
 

Standard_EXPORT void gp_Mat::SetCols const gp_XYZ Col1,
const gp_XYZ Col2,
const gp_XYZ Col3
 

Standard_EXPORT void gp_Mat::SetCross const gp_XYZ Ref  ) 
 

void gp_Mat::SetDiagonal const Standard_Real  X1,
const Standard_Real  X2,
const Standard_Real  X3
[inline]
 

Standard_EXPORT void gp_Mat::SetDot const gp_XYZ Ref  ) 
 

void gp_Mat::SetIdentity  )  [inline]
 

Standard_EXPORT void gp_Mat::SetRotation const gp_XYZ Axis,
const Standard_Real  Ang
 

Standard_EXPORT void gp_Mat::SetRow const Standard_Integer  Row,
const gp_XYZ Value
 

Standard_EXPORT void gp_Mat::SetRows const gp_XYZ Row1,
const gp_XYZ Row2,
const gp_XYZ Row3
 

void gp_Mat::SetScale const Standard_Real  S  )  [inline]
 

void gp_Mat::SetValue const Standard_Integer  Row,
const Standard_Integer  Col,
const Standard_Real  Value
[inline]
 

void gp_Mat::Subtract const gp_Mat Other  )  [inline]
 

gp_Mat gp_Mat::Subtracted const gp_Mat Other  )  const [inline]
 

void gp_Mat::Transpose  )  [inline]
 

gp_Mat gp_Mat::Transposed  )  const [inline]
 

const Standard_Real & gp_Mat::Value const Standard_Integer  Row,
const Standard_Integer  Col
const [inline]
 


Friends And Related Function Documentation

Standard_EXPORT friend Handle_Standard_Type& gp_Mat_Type_  )  [friend]
 


Field Documentation

Standard_Real gp_Mat::matrix[3][3] [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:12:41 2008 for OpenCASCADE by  doxygen 1.4.1