WT_Matrix Class Reference

#include <matrix.h>

Inheritance diagram for WT_Matrix:

Inheritance graph
[legend]
List of all members.

Detailed Description

Simple 4x4 matrix.

Definition at line 30 of file matrix.h.

Public Member Functions

 WT_Matrix ()
 Constructs a WT_Matrix object (sets it to an identity matrix.).
 WT_Matrix (WT_Matrix const &xform)
 Constructs a WT_Matrix object. Copy constructor.
 WT_Matrix (double const *xform)
 Constructs a WT_Matrix object from an array of doubles (must be 16 doubles in the array.).
virtual ~WT_Matrix ()
double const * elements () const
 Returns a 16 element double array containing the matrix values.
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).
void adjoin (WT_Matrix &result) const
 Adjoins the given matrix to this matrix and returns the result.
void rotate (WT_Matrix &result, long rotation) const
 Rotates the matrix.
void set_identity ()
 Sets the matrix to the identity matrix (1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1).
void set (double const *xform)
 Sets the matrix to the array of doubles (must be 16 doubles in the array.).
void set (WT_Matrix const &xform)
 Sets the matrix from the given one (copies its values.).
void transform (WT_Point3D const &pt, WT_Point3D &result, double *out_w=WD_Null, double cutoff=0.0) const
 Uses this matrix to transform the given point.
WT_Matrixoperator *= (WT_Transform const &xform)
 Adds the scaling and translation values from the given transform to the corresponding entries in the matrix.
WT_Boolean is_identity () const
 Returns WD_True if the matrix is an identity matrix.
WT_Boolean operator== (WT_Matrix const &matrix) const
 Returns WD_True if the matrix is equivalent to this one.
WT_Boolean operator!= (WT_Matrix const &matrix) const
 Returns WD_True if the matrix is NOT equivalent to this one.

Protected Attributes

double m_elements [4][4]


Member Function Documentation

void WT_Matrix::adjoin WT_Matrix result  )  const
 

Adjoins the given matrix to this matrix and returns the result.

Returns the matrix obtained by joining each row of result to the right of the corresponding row of this matrix.

double& WT_Matrix::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 <= 3).

Definition at line 69 of file matrix.h.

double WT_Matrix::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 <= 3).

Definition at line 61 of file matrix.h.

void WT_Matrix::rotate WT_Matrix result,
long  rotation
const
 

Rotates the matrix.

This method takes the matrix and applies a rotation of the first quadrant of WHIP! coordinate space about that quadrant's center (in other words it rotates the first quadrant around (MAX_Int/2, Max_int/2)

void WT_Matrix::transform WT_Point3D const &  pt,
WT_Point3D result,
double *  out_w = WD_Null,
double  cutoff = 0.0
const
 

Uses this matrix to transform the given point.

Transforms pt into result.

Parameters:
pt  The source point.
result  Output parameter. The resultant transformed point.
out_w  Output parameter. If non-null, receives the homogeneous adjustment (projection constant) for the point.
cutoff  Maximum homogeneous adjustment (projection constant) 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