WT_Matrix2D Class Reference

#include <matrix.h>

Inheritance diagram for WT_Matrix2D:

Inheritance graph
[legend]
Collaboration diagram for WT_Matrix2D:

Collaboration graph
[legend]
List of all members.

Detailed Description

Simple 3x3 matrix.

Definition at line 195 of file matrix.h.

Public Member Functions

Materialization / serialization
 WT_Matrix2D ()
 Constructs a WT_Matrix2D_IO object (sets it to an identity matrix.).
 WT_Matrix2D (const WT_Matrix2D &r)
 Constructs a WT_Matrix2D_IO object. Copy constructor.
virtual ~WT_Matrix2D ()
double determinant () const
 Computes and returns the matrix's determinant.
void get_adjoint (WT_Matrix2D &matrix) const
 Returns the adjoin of this matrix.
void get_inverse (WT_Matrix2D &result) const
 Returns the inverse of this matrix.
double minor (unsigned int r0, unsigned int r1, unsigned int c0, unsigned int c1) const
 Returns the minor of the matrix using the submatrix comprised of the given rows and columns.
double operator() (unsigned int row, unsigned int col) const
 Returns the value at the given row and column.
double & operator() (unsigned int row, unsigned int col)
 Returns a reference to the value at the given row and column (can be used to set the value).
WT_Matrix2Dadjoin ()
 Sets this matrix to its adjoint.
void set (const WT_Matrix2D &matrix)
 Sets the matrix from the given one (copies its values.).
void rotate (WT_Matrix2D &result, long rotation) const
 Rotate the matrix by the angle (degrees) provided.
void rotate (WT_Matrix2D &result, double rotation) const
 Rotate the matrix by the angle (rads) provided.
WT_Matrix2Dset_to_identity ()
 Sets the matrix to the identity matrix (1 0 0 0 1 0 0 0 1).
double transform (const WT_Point2D &pt, WT_Point2D &result, double cutoff=0.0) const
 Uses this matrix to transform the given point.
WT_Matrix2Doperator *= (const WT_Matrix2D &rMatrix)
 Multiplies matrix by the matrix .
WT_Matrix2Doperator *= (double d)
 Multiplies all matrix values by the given number.
WT_Boolean operator== (const WT_Matrix2D &matrix) const
 Returns WD_True if the matrix is equivalent to this one.
WT_Boolean operator!= (const WT_Matrix2D &matrix) const
 Returns WD_True if the matrix is NOT equivalent to this one.

Static Public Attributes

static const WT_Matrix2D kIdentity
 Static identity matrix.

Protected Attributes

double m_elements [3][3]


Member Function Documentation

double WT_Matrix2D::minor unsigned int  r0,
unsigned int  r1,
unsigned int  c0,
unsigned int  c1
const
 

Returns the minor of the matrix using the submatrix comprised of the given rows and columns.

Exceptions:
WT_Result::Toolkit_Usage_Error One of the arguments was out of range (0 <= x <= 2).

double& WT_Matrix2D::operator() unsigned int  row,
unsigned int  col
[inline]
 

Returns a reference to the value at the given row and column (can be used to set the value).

Exceptions:
WT_Result::Toolkit_Usage_Error One of the arguments was out of range (0 <= x <= 2).

Definition at line 236 of file matrix.h.

double WT_Matrix2D::operator() unsigned int  row,
unsigned int  col
const [inline]
 

Returns the value at the given row and column.

Exceptions:
WT_Result::Toolkit_Usage_Error One of the arguments was out of range (0 <= x <= 2).

Definition at line 228 of file matrix.h.

double WT_Matrix2D::transform const WT_Point2D pt,
WT_Point2D result,
double  cutoff = 0.0
const
 

Uses this matrix to transform the given point.

Transforms pt into result.

Return values:
double The homogeneous adjustment (projection) constant for the point.
Parameters:
pt  The source point.
result  Output parameter. The resultant transformed point.
cutoff  The maximum homogeneous adjustment (projection) allowed for the point.


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:41:22 2009 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.5