Panda3D
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

LMatrix3d Class Reference

This is a 3-by-3 transform matrix. More...

#include "lmatrix.h"

List of all members.

Classes

class  CRow
class  Row

Public Types

typedef const double * const_iterator
typedef const double * iterator

Public Member Functions

 LMatrix3d (const LMatrix3d &other)
 LMatrix3d (double e00, double e01, double e02, double e10, double e11, double e12, double e20, double e21, double e22)
size_t add_hash (size_t hash) const
 Adds the vector into the running hash.
size_t add_hash (size_t hash, double threshold) const
 Adds the vector into the running hash.
bool almost_equal (const LMatrix3d &other, double threshold) const
 Returns true if two matrices are memberwise equal within a specified tolerance.
bool almost_equal (const LMatrix3d &other) const
 Returns true if two matrices are memberwise equal within a default tolerance based on the numeric type.
const_iterator begin () const
 Returns an iterator that may be used to traverse the elements of the matrix, STL-style.
iterator begin ()
 Returns an iterator that may be used to traverse the elements of the matrix, STL-style.
int compare_to (const LMatrix3d &other) const
 This flavor of compare_to uses a default threshold value based on the numeric type.
int compare_to (const LMatrix3d &other, double threshold) const
 Sorts matrices lexicographically, componentwise.
double determinant () const
 Returns the determinant of the matrix.
const_iterator end () const
 Returns an iterator that may be used to traverse the elements of the matrix, STL-style.
iterator end ()
 Returns an iterator that may be used to traverse the elements of the matrix, STL-style.
void fill (double fill_value)
 Sets each element of the matrix to the indicated fill_value.
void generate_hash (ChecksumHashGenerator &hashgen) const
 Adds the vector to the indicated hash generator.
void generate_hash (ChecksumHashGenerator &hashgen, double threshold) const
 Adds the vector to the indicated hash generator.
double get_cell (int row, int col) const
 Returns a particular element of the matrix.
LVecBase3d get_col (int col) const
 Returns the indicated column of the matrix as a three-component vector.
LVecBase2d get_col2 (int col) const
 Returns the indicated column of the matrix as a two-component vector, ignoring the last row.
const double * get_data () const
 Returns the address of the first of the nine data elements in the matrix.
size_t get_hash () const
 Returns a suitable hash for phash_map.
size_t get_hash (double threshold) const
 Returns a suitable hash for phash_map.
int get_num_components () const
 Returns the number of elements in the matrix, nine.
void get_row (LVecBase3d &result_vec, int row) const
LVecBase3d get_row (int row) const
 Returns the indicated row of the matrix as a three-component vector.
LVecBase2d get_row2 (int row) const
 Returns the indicated row of the matrix as a two-component vector, ignoring the last column.
bool invert_from (const LMatrix3d &other)
 Computes the inverse of the other matrix, and stores the result in this matrix.
bool invert_in_place ()
 Inverts the current matrix.
bool invert_transpose_from (const LMatrix4d &other)
 Simultaneously computes the inverse of the indicated matrix, and then the transpose of that inverse.
bool invert_transpose_from (const LMatrix3d &other)
 Simultaneously computes the inverse of the indicated matrix, and then the transpose of that inverse.
bool is_nan () const
 Returns true if any component of the matrix is not-a-number, false otherwise.
 MAKE_SEQ (get_row2s, size, get_row2)
 MAKE_SEQ (get_col2s, size, get_col2)
 MAKE_SEQ (get_rows, size, get_row)
 MAKE_SEQ (get_cols, size, get_col)
void multiply (const LMatrix3d &other1, const LMatrix3d &other2)
bool operator!= (const LMatrix3d &other) const
double & operator() (int row, int col)
double operator() (int row, int col) const
LMatrix3d operator* (const LMatrix3d &other) const
LMatrix3d operator* (double scalar) const
LMatrix3doperator*= (const LMatrix3d &other)
LMatrix3doperator*= (double scalar)
 Performs a memberwise scale.
LMatrix3doperator+= (const LMatrix3d &other)
 Performs a memberwise addition between two matrices.
LMatrix3doperator-= (const LMatrix3d &other)
 Performs a memberwise subtraction between two matrices.
LMatrix3d operator/ (double scalar) const
LMatrix3doperator/= (double scalar)
 Performs a memberwise scale.
bool operator< (const LMatrix3d &other) const
 This performs a lexicographical comparison.
LMatrix3doperator= (double fill_value)
LMatrix3doperator= (const LMatrix3d &other)
bool operator== (const LMatrix3d &other) const
Row operator[] (int i)
CRow operator[] (int i) const
void output (ostream &out) const
void read_datagram (DatagramIterator &scan)
 Reads itself out of the datagram.
void set (double e00, double e01, double e02, double e10, double e11, double e12, double e20, double e21, double e22)
void set_cell (int row, int col, double value)
 Changes a particular element of the matrix.
void set_col (int col, const LVecBase2d &v)
 Replaces the indicated column of the matrix from a two-component vector, ignoring the last row.
void set_col (int col, const LVecBase3d &v)
 Replaces the indicated column of the matrix from a three-component vector.
void set_rotate_mat (double angle)
 Fills mat with a matrix that rotates by the given angle in degrees counterclockwise.
void set_rotate_mat (double angle, LVecBase3d axis, CoordinateSystem cs=CS_default)
 Fills mat with a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
void set_rotate_mat_normaxis (double angle, const LVecBase3d &axis, CoordinateSystem cs=CS_default)
 Fills mat with a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
void set_row (int row, const LVecBase3d &v)
 Replaces the indicated row of the matrix from a three-component vector.
void set_row (int row, const LVecBase2d &v)
 Replaces the indicated row of the matrix from a two-component vector, ignoring the last column.
void set_scale_mat (const LVecBase3d &scale)
 Fills mat with a matrix that applies the indicated scale in each of the three axes.
void set_scale_mat (const LVecBase2d &scale)
 Fills mat with a matrix that applies the indicated scale in each of the two axes.
void set_scale_shear_mat (const LVecBase3d &scale, const LVecBase3d &shear, CoordinateSystem cs=CS_default)
 Fills mat with a matrix that applies the indicated scale and shear.
void set_shear_mat (const LVecBase3d &shear, CoordinateSystem cs=CS_default)
 Fills mat with a matrix that applies the indicated shear in each of the three planes.
void set_translate_mat (const LVecBase2d &trans)
 Fills mat with a matrix that applies the indicated translation.
void transpose_from (const LMatrix3d &other)
void transpose_in_place ()
void write (ostream &out, int indent_level=0) const
void write_datagram (Datagram &destination) const
 Writes the matrix to the datagram.
LVecBase3d xform (const LVecBase3d &v) const
 3-component vector or point times matrix.
LVecBase2d xform_point (const LVecBase2d &v) const
 The matrix transforms a 2-component point (including translation component) and returns the result.
LVecBase3d xform_vec (const LVecBase3d &v) const
 The matrix transforms a 3-component vector and returns the result.
LVecBase2d xform_vec (const LVecBase2d &v) const
 The matrix transforms a 2-component vector (without translation component) and returns the result.
LVecBase3d xform_vec_general (const LVecBase3d &v) const
 The matrix transforms a 3-component vector (without translation component) and returns the result, as a fully general operation.

Static Public Member Functions

static const LMatrix3dconvert_mat (CoordinateSystem from, CoordinateSystem to)
 Returns a matrix that transforms from the indicated coordinate system to the indicated coordinate system.
static TypeHandle get_class_type ()
static const LMatrix3dident_mat ()
 Returns an identity matrix.
static void init_type ()
static LMatrix3d rotate_mat (double angle, LVecBase3d axis, CoordinateSystem cs=CS_default)
 Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
static LMatrix3d rotate_mat (double angle)
 Returns a matrix that rotates by the given angle in degrees counterclockwise.
static LMatrix3d rotate_mat_normaxis (double angle, const LVecBase3d &axis, CoordinateSystem cs=CS_default)
 Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
static LMatrix3d scale_mat (const LVecBase3d &scale)
 Returns a matrix that applies the indicated scale in each of the three axes.
static LMatrix3d scale_mat (double sx, double sy, double sz)
 Returns a matrix that applies the indicated scale in each of the three axes.
static LMatrix3d scale_mat (const LVecBase2d &scale)
 Returns a matrix that applies the indicated scale in each of the two axes.
static LMatrix3d scale_mat (double sx, double sy)
 Returns a matrix that applies the indicated scale in each of the two axes.
static LMatrix3d scale_shear_mat (const LVecBase3d &scale, const LVecBase3d &shear, CoordinateSystem cs=CS_default)
 Returns a matrix that applies the indicated scale and shear.
static LMatrix3d scale_shear_mat (double sx, double sy, double sz, double shxy, double shxz, double shyz, CoordinateSystem cs=CS_default)
 Returns a matrix that applies the indicated scale and shear.
static LMatrix3d shear_mat (double shxy, double shxz, double shyz, CoordinateSystem cs=CS_default)
 Returns a matrix that applies the indicated shear in each of the three planes.
static LMatrix3d shear_mat (const LVecBase3d &shear, CoordinateSystem cs=CS_default)
 Returns a matrix that applies the indicated shear in each of the three planes.
static int size ()
 Returns 3: the number of rows of a LMatrix3.
static LMatrix3d translate_mat (const LVecBase2d &trans)
 Returns a matrix that applies the indicated translation.
static LMatrix3d translate_mat (double tx, double ty)
 Returns a matrix that applies the indicated translation.

Public Attributes

union {
   double   data [3 *3]
   struct {
      double   _00
      double   _01
      double   _02
      double   _10
      double   _11
      double   _12
      double   _20
      double   _21
      double   _22
   }   m
_m

Detailed Description

This is a 3-by-3 transform matrix.

It typically will represent either a rotation-and-scale (no translation) matrix in 3-d, or a full affine matrix (rotation, scale, translation) in 2-d, e.g. for a texture matrix.

Definition at line 3660 of file lmatrix.h.


Member Function Documentation

size_t LMatrix3d::add_hash ( size_t  hash) const [inline]

Adds the vector into the running hash.

Definition at line 6321 of file lmatrix.h.

size_t LMatrix3d::add_hash ( size_t  hash,
double  threshold 
) const [inline]

Adds the vector into the running hash.

Definition at line 6331 of file lmatrix.h.

bool LMatrix3d::almost_equal ( const LMatrix3d other,
double  threshold 
) const

Returns true if two matrices are memberwise equal within a specified tolerance.

Definition at line 1599 of file lmatrix.cxx.

Referenced by TextureReference::is_equivalent().

bool LMatrix3d::almost_equal ( const LMatrix3d other) const [inline]

Returns true if two matrices are memberwise equal within a default tolerance based on the numeric type.

Definition at line 7103 of file lmatrix.h.

LMatrix3d::iterator LMatrix3d::begin ( ) [inline]

Returns an iterator that may be used to traverse the elements of the matrix, STL-style.

Definition at line 6213 of file lmatrix.h.

LMatrix3d::const_iterator LMatrix3d::begin ( ) const [inline]

Returns an iterator that may be used to traverse the elements of the matrix, STL-style.

Definition at line 6235 of file lmatrix.h.

int LMatrix3d::compare_to ( const LMatrix3d other) const [inline]

This flavor of compare_to uses a default threshold value based on the numeric type.

Definition at line 6291 of file lmatrix.h.

int LMatrix3d::compare_to ( const LMatrix3d other,
double  threshold 
) const

Sorts matrices lexicographically, componentwise.

Returns a number less than 0 if this matrix sorts before the other one, greater than zero if it sorts after, 0 if they are equivalent (within the indicated tolerance).

Definition at line 1469 of file lmatrix.cxx.

const LMatrix3d & LMatrix3d::convert_mat ( CoordinateSystem  from,
CoordinateSystem  to 
) [static]

Returns a matrix that transforms from the indicated coordinate system to the indicated coordinate system.

Definition at line 1386 of file lmatrix.cxx.

double LMatrix3d::determinant ( ) const [inline]

Returns the determinant of the matrix.

Definition at line 6709 of file lmatrix.h.

LMatrix3d::iterator LMatrix3d::end ( ) [inline]

Returns an iterator that may be used to traverse the elements of the matrix, STL-style.

Definition at line 6224 of file lmatrix.h.

LMatrix3d::const_iterator LMatrix3d::end ( ) const [inline]

Returns an iterator that may be used to traverse the elements of the matrix, STL-style.

Definition at line 6246 of file lmatrix.h.

void LMatrix3d::fill ( double  fill_value)

Sets each element of the matrix to the indicated fill_value.

This is of questionable value, but is sometimes useful when initializing to zero.

Definition at line 1452 of file lmatrix.cxx.

void LMatrix3d::generate_hash ( ChecksumHashGenerator hashgen) const [inline]

Adds the vector to the indicated hash generator.

Definition at line 7113 of file lmatrix.h.

void LMatrix3d::generate_hash ( ChecksumHashGenerator hashgen,
double  threshold 
) const

Adds the vector to the indicated hash generator.

Definition at line 1688 of file lmatrix.cxx.

double LMatrix3d::get_cell ( int  row,
int  col 
) const [inline]

Returns a particular element of the matrix.

Definition at line 6168 of file lmatrix.h.

LVecBase3d LMatrix3d::get_col ( int  col) const [inline]

Returns the indicated column of the matrix as a three-component vector.

Definition at line 6067 of file lmatrix.h.

LVecBase2d LMatrix3d::get_col2 ( int  col) const [inline]

Returns the indicated column of the matrix as a two-component vector, ignoring the last row.

Definition at line 6089 of file lmatrix.h.

const double * LMatrix3d::get_data ( ) const [inline]

Returns the address of the first of the nine data elements in the matrix.

The remaining elements occupy the next eight positions in row-major order.

Definition at line 6192 of file lmatrix.h.

size_t LMatrix3d::get_hash ( ) const [inline]

Returns a suitable hash for phash_map.

Definition at line 6301 of file lmatrix.h.

size_t LMatrix3d::get_hash ( double  threshold) const [inline]

Returns a suitable hash for phash_map.

Definition at line 6311 of file lmatrix.h.

int LMatrix3d::get_num_components ( ) const [inline]

Returns the number of elements in the matrix, nine.

Definition at line 6202 of file lmatrix.h.

LVecBase3d LMatrix3d::get_row ( int  row) const [inline]

Returns the indicated row of the matrix as a three-component vector.

Definition at line 6049 of file lmatrix.h.

LVecBase2d LMatrix3d::get_row2 ( int  row) const [inline]

Returns the indicated row of the matrix as a two-component vector, ignoring the last column.

Definition at line 6078 of file lmatrix.h.

const LMatrix3d & LMatrix3d::ident_mat ( ) [inline, static]

Returns an identity matrix.

This function definition must appear first, since some inline functions below take advantage of it.

Definition at line 5901 of file lmatrix.h.

Referenced by TexturePlacement::compute_tex_matrix(), TextureReference::from_egg(), EggTransform::get_component_mat3(), and EggTransform::get_transform2d().

bool LMatrix3d::invert_from ( const LMatrix3d other) [inline]

Computes the inverse of the other matrix, and stores the result in this matrix.

This is a fully general operation and makes no assumptions about the type of transform represented by the matrix.

The other matrix must be a different object than this matrix. However, if you need to invert a matrix in place, see invert_in_place.

The return value is true if the matrix was successfully inverted, false if the was a singularity.

Definition at line 6732 of file lmatrix.h.

Referenced by TextureReference::from_egg().

bool LMatrix3d::invert_in_place ( ) [inline]

Inverts the current matrix.

Returns true if the inverse is successful, false if the matrix was singular.

Definition at line 6773 of file lmatrix.h.

bool LMatrix3d::invert_transpose_from ( const LMatrix3d other) [inline]

Simultaneously computes the inverse of the indicated matrix, and then the transpose of that inverse.

Definition at line 6786 of file lmatrix.h.

bool LMatrix3d::invert_transpose_from ( const LMatrix4d other) [inline]

Simultaneously computes the inverse of the indicated matrix, and then the transpose of that inverse.

Definition at line 6822 of file lmatrix.h.

bool LMatrix3d::is_nan ( ) const [inline]

Returns true if any component of the matrix is not-a-number, false otherwise.

Definition at line 6154 of file lmatrix.h.

LMatrix3d & LMatrix3d::operator*= ( double  scalar) [inline]

Performs a memberwise scale.

Definition at line 6603 of file lmatrix.h.

LMatrix3d & LMatrix3d::operator+= ( const LMatrix3d other) [inline]

Performs a memberwise addition between two matrices.

Definition at line 6543 of file lmatrix.h.

LMatrix3d & LMatrix3d::operator-= ( const LMatrix3d other) [inline]

Performs a memberwise subtraction between two matrices.

Definition at line 6566 of file lmatrix.h.

LMatrix3d & LMatrix3d::operator/= ( double  scalar) [inline]

Performs a memberwise scale.

Definition at line 6626 of file lmatrix.h.

bool LMatrix3d::operator< ( const LMatrix3d other) const [inline]

This performs a lexicographical comparison.

It's of questionable mathematical meaning, but sometimes has a practical purpose for sorting unique vectors, especially in an STL container. Also see compare_to().

Definition at line 6260 of file lmatrix.h.

void LMatrix3d::read_datagram ( DatagramIterator scan)

Reads itself out of the datagram.

Definition at line 1715 of file lmatrix.cxx.

Referenced by TextureReference::fillin().

LMatrix3d LMatrix3d::rotate_mat ( double  angle) [inline, static]

Returns a matrix that rotates by the given angle in degrees counterclockwise.

Definition at line 6927 of file lmatrix.h.

Referenced by MayaShaderColorDef::compute_texture_matrix().

LMatrix3d LMatrix3d::rotate_mat ( double  angle,
LVecBase3d  axis,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.

Definition at line 6966 of file lmatrix.h.

LMatrix3d LMatrix3d::rotate_mat_normaxis ( double  angle,
const LVecBase3d axis,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.

Assumes axis has been normalized.

Definition at line 6981 of file lmatrix.h.

LMatrix3d LMatrix3d::scale_mat ( double  sx,
double  sy 
) [inline, static]

Returns a matrix that applies the indicated scale in each of the two axes.

Definition at line 6953 of file lmatrix.h.

LMatrix3d LMatrix3d::scale_mat ( const LVecBase3d scale) [inline, static]

Returns a matrix that applies the indicated scale in each of the three axes.

Definition at line 7008 of file lmatrix.h.

LMatrix3d LMatrix3d::scale_mat ( double  sx,
double  sy,
double  sz 
) [inline, static]

Returns a matrix that applies the indicated scale in each of the three axes.

Definition at line 7021 of file lmatrix.h.

LMatrix3d LMatrix3d::scale_mat ( const LVecBase2d scale) [inline, static]

Returns a matrix that applies the indicated scale in each of the two axes.

Definition at line 6940 of file lmatrix.h.

Referenced by TexturePlacement::compute_tex_matrix(), MayaShaderColorDef::compute_texture_matrix(), and PerlinNoise2::set_scale().

LMatrix3d LMatrix3d::scale_shear_mat ( const LVecBase3d scale,
const LVecBase3d shear,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a matrix that applies the indicated scale and shear.

Definition at line 7072 of file lmatrix.h.

LMatrix3d LMatrix3d::scale_shear_mat ( double  sx,
double  sy,
double  sz,
double  shxy,
double  shxz,
double  shyz,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a matrix that applies the indicated scale and shear.

Definition at line 7087 of file lmatrix.h.

void LMatrix3d::set_cell ( int  row,
int  col,
double  value 
) [inline]

Changes a particular element of the matrix.

Definition at line 6179 of file lmatrix.h.

void LMatrix3d::set_col ( int  col,
const LVecBase2d v 
) [inline]

Replaces the indicated column of the matrix from a two-component vector, ignoring the last row.

Definition at line 6037 of file lmatrix.h.

void LMatrix3d::set_col ( int  col,
const LVecBase3d v 
) [inline]

Replaces the indicated column of the matrix from a three-component vector.

Definition at line 6012 of file lmatrix.h.

void LMatrix3d::set_rotate_mat ( double  angle,
LVecBase3d  axis,
CoordinateSystem  cs = CS_default 
)

Fills mat with a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.

Definition at line 1487 of file lmatrix.cxx.

void LMatrix3d::set_rotate_mat ( double  angle) [inline]

Fills mat with a matrix that rotates by the given angle in degrees counterclockwise.

Definition at line 6871 of file lmatrix.h.

void LMatrix3d::set_rotate_mat_normaxis ( double  angle,
const LVecBase3d axis,
CoordinateSystem  cs = CS_default 
)

Fills mat with a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.

Assumes axis has been normalized.

Definition at line 1548 of file lmatrix.cxx.

void LMatrix3d::set_row ( int  row,
const LVecBase3d v 
) [inline]

Replaces the indicated row of the matrix from a three-component vector.

Definition at line 5999 of file lmatrix.h.

void LMatrix3d::set_row ( int  row,
const LVecBase2d v 
) [inline]

Replaces the indicated row of the matrix from a two-component vector, ignoring the last column.

Definition at line 6025 of file lmatrix.h.

void LMatrix3d::set_scale_mat ( const LVecBase3d scale) [inline]

Fills mat with a matrix that applies the indicated scale in each of the three axes.

Definition at line 6995 of file lmatrix.h.

void LMatrix3d::set_scale_mat ( const LVecBase2d scale) [inline]

Fills mat with a matrix that applies the indicated scale in each of the two axes.

Definition at line 6888 of file lmatrix.h.

void LMatrix3d::set_scale_shear_mat ( const LVecBase3d scale,
const LVecBase3d shear,
CoordinateSystem  cs = CS_default 
)

Fills mat with a matrix that applies the indicated scale and shear.

Definition at line 1307 of file lmatrix.cxx.

void LMatrix3d::set_shear_mat ( const LVecBase3d shear,
CoordinateSystem  cs = CS_default 
) [inline]

Fills mat with a matrix that applies the indicated shear in each of the three planes.

Definition at line 7034 of file lmatrix.h.

void LMatrix3d::set_translate_mat ( const LVecBase2d trans) [inline]

Fills mat with a matrix that applies the indicated translation.

Definition at line 6858 of file lmatrix.h.

LMatrix3d LMatrix3d::shear_mat ( const LVecBase3d shear,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a matrix that applies the indicated shear in each of the three planes.

Definition at line 7046 of file lmatrix.h.

LMatrix3d LMatrix3d::shear_mat ( double  shxy,
double  shxz,
double  shyz,
CoordinateSystem  cs = CS_default 
) [inline, static]

Returns a matrix that applies the indicated shear in each of the three planes.

Definition at line 7059 of file lmatrix.h.

int LMatrix3d::size ( ) [inline, static]

Returns 3: the number of rows of a LMatrix3.

Definition at line 6143 of file lmatrix.h.

LMatrix3d LMatrix3d::translate_mat ( double  tx,
double  ty 
) [inline, static]

Returns a matrix that applies the indicated translation.

Definition at line 6914 of file lmatrix.h.

LMatrix3d LMatrix3d::translate_mat ( const LVecBase2d trans) [inline, static]

Returns a matrix that applies the indicated translation.

Definition at line 6901 of file lmatrix.h.

Referenced by TexturePlacement::compute_tex_matrix(), and MayaShaderColorDef::compute_texture_matrix().

void LMatrix3d::write_datagram ( Datagram destination) const

Writes the matrix to the datagram.

Definition at line 1702 of file lmatrix.cxx.

Referenced by TextureReference::write_datagram().

LVecBase3d LMatrix3d::xform ( const LVecBase3d v) const [inline]

3-component vector or point times matrix.

Definition at line 6361 of file lmatrix.h.

LVecBase2d LMatrix3d::xform_point ( const LVecBase2d v) const [inline]

The matrix transforms a 2-component point (including translation component) and returns the result.

This assumes the matrix is an affine transform.

Definition at line 6377 of file lmatrix.h.

Referenced by PerlinNoise2::noise().

LVecBase2d LMatrix3d::xform_vec ( const LVecBase2d v) const [inline]

The matrix transforms a 2-component vector (without translation component) and returns the result.

This assumes the matrix is an affine transform.

Definition at line 6397 of file lmatrix.h.

LVecBase3d LMatrix3d::xform_vec ( const LVecBase3d v) const [inline]

The matrix transforms a 3-component vector and returns the result.

This assumes the matrix is an orthonormal transform.

In practice, this is the same computation as xform().

Definition at line 6423 of file lmatrix.h.

LVecBase3d LMatrix3d::xform_vec_general ( const LVecBase3d v) const [inline]

The matrix transforms a 3-component vector (without translation component) and returns the result, as a fully general operation.

Definition at line 6444 of file lmatrix.h.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations