Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

WT_Matrix2D Class Reference

#include <matrix.h>

Collaboration diagram for WT_Matrix2D:

Collaboration graph
[legend]
List of all members.

Detailed Description

Simple 3x3 matrix.

Definition at line 153 of file matrix.h.

Public Member Functions

Construction
 WT_Matrix2D ()
 Constructs a WT_Matrix2D object (sets it to an identity matrix.).
 WT_Matrix2D (const WT_Matrix2D &r)
 Constructs a WT_Matrix2D object. Copy constructor.
Data access methods
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).
Manipulation methods
WT_Matrix2Dadjoin ()
 Sets this matrix to its adjoint.
void set (const WT_Matrix2D &matrix)
 Sets the matrix from the given one (copies its values.).
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 *= (double d)
 Multiplies all matrix values by the given number.
Inspection methods
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.
Materialization / serialization
Warning:
These methods are typically only used by parent objects. Client code should not call these methods.


WT_Result serialize (WT_File &file) const
WT_Result materialize (WT_File &file)

Static Public Attributes

static const WT_Matrix2D kIdentity
 Static identity matrix.


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 190 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 182 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 May 17 12:07:59 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1