Panda3D
|
This is a 4-by-4 transform matrix. More...
#include "lmatrix.h"
Classes | |
class | CRow |
class | Row |
Public Types | |
typedef const float * | const_iterator |
typedef const float * | iterator |
Public Member Functions | |
LMatrix4f (const LMatrix4f &other) | |
LMatrix4f (float e00, float e01, float e02, float e03, float e10, float e11, float e12, float e13, float e20, float e21, float e22, float e23, float e30, float e31, float e32, float e33) | |
LMatrix4f (const LMatrix3f &upper3) | |
LMatrix4f (const LMatrix3f &upper3, const LVecBase3f &trans) | |
size_t | add_hash (size_t hash) const |
Adds the vector into the running hash. | |
size_t | add_hash (size_t hash, float threshold) const |
Adds the vector into the running hash. | |
bool | almost_equal (const LMatrix4f &other, float threshold) const |
Returns true if two matrices are memberwise equal within a specified tolerance. | |
bool | almost_equal (const LMatrix4f &other) const |
Returns true if two matrices are memberwise equal within a default tolerance based on the numeric type. | |
iterator | begin () |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. | |
const_iterator | begin () const |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. | |
int | compare_to (const LMatrix4f &other) const |
This flavor of compare_to uses a default threshold value based on the numeric type. | |
int | compare_to (const LMatrix4f &other, float threshold) const |
Sorts matrices lexicographically, componentwise. | |
iterator | end () |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. | |
const_iterator | end () const |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. | |
void | fill (float 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, float scale) const |
Adds the vector to the indicated hash generator. | |
float | get_cell (int row, int col) const |
Returns a particular element of the matrix. | |
LVecBase4f | get_col (int col) const |
Retrieves the indicated column of the matrix as a 4-component vector. | |
LVecBase3f | get_col3 (int col) const |
Retrieves the indicated column of the matrix as a 3-component vector, ignoring the last row. | |
const float * | 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 (float threshold) const |
Returns a suitable hash for phash_map. | |
int | get_num_components () const |
Returns the number of elements in the matrix, 16. | |
LVecBase4f | get_row (int row) const |
Retrieves the indicated row of the matrix as a 4-component vector. | |
void | get_row (LVecBase4f &result_vec, int row) const |
void | get_row3 (LVecBase3f &result_vec, int row) const |
LVecBase3f | get_row3 (int row) const |
Retrieves the row column of the matrix as a 3-component vector, ignoring the last column. | |
LMatrix3f | get_upper_3 () const |
Retrieves the upper 3x3 submatrix. | |
bool | invert_affine_from (const LMatrix4f &other) |
Performs an invert of the indicated matrix, storing the result in this matrix. | |
bool | invert_from (const LMatrix4f &other) |
Computes the inverse of the other matrix, and stores the result in this matrix. | |
bool | invert_in_place () |
Inverts the current matrix. | |
bool | is_nan () const |
Returns true if any component of the matrix is not-a-number, false otherwise. | |
MAKE_SEQ (get_rows, size, get_row) | |
MAKE_SEQ (get_cols, size, get_col) | |
MAKE_SEQ (get_row3s, size, get_row3) | |
void | multiply (const LMatrix4f &other1, const LMatrix4f &other2) |
bool | operator!= (const LMatrix4f &other) const |
float & | operator() (int row, int col) |
float | operator() (int row, int col) const |
LMatrix4f | operator* (float scalar) const |
LMatrix4f | operator* (const LMatrix4f &other) const |
LMatrix4f & | operator*= (const LMatrix4f &other) |
LMatrix4f & | operator*= (float scalar) |
LMatrix4f & | operator+= (const LMatrix4f &other) |
Performs a memberwise addition between two matrices. | |
LMatrix4f & | operator-= (const LMatrix4f &other) |
Performs a memberwise addition between two matrices. | |
LMatrix4f | operator/ (float scalar) const |
LMatrix4f & | operator/= (float scalar) |
bool | operator< (const LMatrix4f &other) const |
This performs a lexicographical comparison. | |
LMatrix4f & | operator= (float fill_value) |
LMatrix4f & | operator= (const LMatrix4f &other) |
bool | operator== (const LMatrix4f &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 (float e00, float e01, float e02, float e03, float e10, float e11, float e12, float e13, float e20, float e21, float e22, float e23, float e30, float e31, float e32, float e33) |
void | set_cell (int row, int col, float value) |
Changes a particular element of the matrix. | |
void | set_col (int col, const LVecBase4f &v) |
Replaces the indicated column of the matrix. | |
void | set_col (int col, const LVecBase3f &v) |
Replaces the indicated column of the matrix with the indicated 3-component vector, ignoring the last row. | |
void | set_rotate_mat (float angle, const LVecBase3f &axis, CoordinateSystem cs=CS_default) |
Sets mat to a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. | |
void | set_rotate_mat_normaxis (float angle, const LVecBase3f &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 LVecBase3f &v) |
Replaces the indicated row of the matrix with the indicated 3-component vector, ignoring the last column. | |
void | set_row (int row, const LVecBase4f &v) |
Replaces the indicated row of the matrix. | |
void | set_scale_mat (const LVecBase3f &scale) |
Fills mat with a matrix that applies the indicated scale in each of the three axes. | |
void | set_scale_shear_mat (const LVecBase3f &scale, const LVecBase3f &shear, CoordinateSystem cs=CS_default) |
Fills mat with a matrix that applies the indicated scale and shear. | |
void | set_shear_mat (const LVecBase3f &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 LVecBase3f &trans) |
Fills mat with a matrix that applies the indicated translation. | |
void | set_upper_3 (const LMatrix3f &upper3) |
Sets the upper 3x3 submatrix. | |
void | transpose_from (const LMatrix4f &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. | |
LVecBase4f | xform (const LVecBase4f &v) const |
4-component vector or point times matrix. | |
LVecBase3f | xform_point (const LVecBase3f &v) const |
The matrix transforms a 3-component point (including translation component) and returns the result. | |
LVecBase3f | xform_vec (const LVecBase3f &v) const |
The matrix transforms a 3-component vector (without translation component) and returns the result. | |
LVecBase3f | xform_vec_general (const LVecBase3f &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 LMatrix4f & | convert_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 LMatrix4f & | ident_mat () |
Returns an identity matrix. | |
static void | init_type () |
static const LMatrix4f & | ones_mat () |
Returns an matrix filled with ones. | |
static LMatrix4f | rotate_mat (float angle, const LVecBase3f &axis, CoordinateSystem cs=CS_default) |
Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. | |
static LMatrix4f | rotate_mat_normaxis (float angle, const LVecBase3f &axis, CoordinateSystem cs=CS_default) |
Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector. | |
static LMatrix4f | scale_mat (const LVecBase3f &scale) |
Returns a matrix that applies the indicated scale in each of the three axes. | |
static LMatrix4f | scale_mat (float sx, float sy, float sz) |
Returns a matrix that applies the indicated scale in each of the three axes. | |
static LMatrix4f | scale_mat (float scale) |
Returns a matrix that applies the indicated uniform scale. | |
static LMatrix4f | scale_shear_mat (const LVecBase3f &scale, const LVecBase3f &shear, CoordinateSystem cs=CS_default) |
Returns a matrix that applies the indicated scale and shear. | |
static LMatrix4f | scale_shear_mat (float sx, float sy, float sz, float shxy, float shxz, float shyz, CoordinateSystem cs=CS_default) |
Returns a matrix that applies the indicated scale and shear. | |
static LMatrix4f | shear_mat (float shxy, float shxz, float shyz, CoordinateSystem cs=CS_default) |
Returns a matrix that applies the indicated shear in each of the three planes. | |
static LMatrix4f | shear_mat (const LVecBase3f &shear, CoordinateSystem cs=CS_default) |
Returns a matrix that applies the indicated shear in each of the three planes. | |
static int | size () |
Returns 4: the number of rows of a LMatrix4. | |
static LMatrix4f | translate_mat (float tx, float ty, float tz) |
Returns a matrix that applies the indicated translation. | |
static LMatrix4f | translate_mat (const LVecBase3f &trans) |
Returns a matrix that applies the indicated translation. | |
static const LMatrix4f & | y_to_z_up_mat () |
Returns a matrix that transforms from the Y-up coordinate system to the Z-up coordinate system. | |
static const LMatrix4f & | z_to_y_up_mat () |
Returns a matrix that transforms from the Y-up coordinate system to the Z-up coordinate system. | |
static const LMatrix4f & | zeros_mat () |
Returns an matrix filled with zeros. | |
Public Attributes | |
union { | |
float data [4 *4] | |
struct { | |
float _00 | |
float _01 | |
float _02 | |
float _03 | |
float _10 | |
float _11 | |
float _12 | |
float _13 | |
float _20 | |
float _21 | |
float _22 | |
float _23 | |
float _30 | |
float _31 | |
float _32 | |
float _33 | |
} m | |
} | _m |
size_t LMatrix4f::add_hash | ( | size_t | hash | ) | const [inline] |
size_t LMatrix4f::add_hash | ( | size_t | hash, |
float | threshold | ||
) | const [inline] |
bool LMatrix4f::almost_equal | ( | const LMatrix4f & | other, |
float | threshold | ||
) | const |
Returns true if two matrices are memberwise equal within a specified tolerance.
Definition at line 893 of file lmatrix.cxx.
Referenced by GeomTransformer::apply_texture_colors(), ProjectionScreen::recompute_if_stale(), CollisionNode::xform(), and PartBundleNode::xform().
bool LMatrix4f::almost_equal | ( | const LMatrix4f & | other | ) | const [inline] |
LMatrix4f::iterator LMatrix4f::begin | ( | ) | [inline] |
LMatrix4f::const_iterator LMatrix4f::begin | ( | ) | const [inline] |
int LMatrix4f::compare_to | ( | const LMatrix4f & | other | ) | const [inline] |
This flavor of compare_to uses a default threshold value based on the numeric type.
int LMatrix4f::compare_to | ( | const LMatrix4f & | other, |
float | 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 742 of file lmatrix.cxx.
const LMatrix4f & LMatrix4f::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 674 of file lmatrix.cxx.
Referenced by DXGraphicsStateGuardian9::bind_clip_plane(), DXGraphicsStateGuardian8::bind_clip_plane(), DXGraphicsStateGuardian9::bind_light(), DXGraphicsStateGuardian8::bind_light(), TrackerNode::do_transmit_data(), GraphicsStateGuardian::fetch_specified_part(), and GraphicsStateGuardian::set_coordinate_system().
LMatrix4f::const_iterator LMatrix4f::end | ( | ) | const [inline] |
LMatrix4f::iterator LMatrix4f::end | ( | ) | [inline] |
void LMatrix4f::fill | ( | float | fill_value | ) | [inline] |
void LMatrix4f::generate_hash | ( | ChecksumHashGenerator & | hashgen | ) | const [inline] |
void LMatrix4f::generate_hash | ( | ChecksumHashGenerator & | hashgen, |
float | scale | ||
) | const |
Adds the vector to the indicated hash generator.
Definition at line 1015 of file lmatrix.cxx.
float LMatrix4f::get_cell | ( | int | row, |
int | col | ||
) | const [inline] |
LVecBase4f LMatrix4f::get_col | ( | int | col | ) | const [inline] |
Retrieves the indicated column of the matrix as a 4-component vector.
Definition at line 1154 of file lmatrix.h.
Referenced by CubicCurveseg::CubicCurveseg(), and NurbsCurve::rebuild_curveseg().
LVecBase3f LMatrix4f::get_col3 | ( | int | col | ) | const [inline] |
const float * LMatrix4f::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 1294 of file lmatrix.h.
Referenced by DXGraphicsStateGuardian9::begin_draw_primitives(), DXGraphicsStateGuardian8::begin_draw_primitives(), DXGraphicsStateGuardian9::do_issue_transform(), and DXGraphicsStateGuardian8::do_issue_transform().
size_t LMatrix4f::get_hash | ( | ) | const [inline] |
size_t LMatrix4f::get_hash | ( | float | threshold | ) | const [inline] |
int LMatrix4f::get_num_components | ( | ) | const [inline] |
LVecBase4f LMatrix4f::get_row | ( | int | row | ) | const [inline] |
Retrieves the indicated row of the matrix as a 4-component vector.
Definition at line 1132 of file lmatrix.h.
Referenced by NurbsCurveResult::eval_segment_extended_point(), and NurbsCurveResult::eval_segment_extended_points().
LVecBase3f LMatrix4f::get_row3 | ( | int | row | ) | const [inline] |
Retrieves the row column of the matrix as a 3-component vector, ignoring the last column.
Definition at line 1168 of file lmatrix.h.
Referenced by NodePath::do_billboard_axis(), NodePath::do_billboard_point_eye(), NodePath::do_billboard_point_world(), GraphicsStateGuardian::fetch_specified_value(), Lens::get_nodal_point(), Trackball::get_origin(), PhysxManager::mat4_to_nxMat34(), PGFrameStyle::xform(), and LODNode::xform().
LMatrix3f LMatrix4f::get_upper_3 | ( | ) | const [inline] |
Retrieves the upper 3x3 submatrix.
Definition at line 1063 of file lmatrix.h.
Referenced by PhysxManager::mat4_to_nxMat34().
const LMatrix4f & LMatrix4f::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 824 of file lmatrix.h.
Referenced by GeomTransformer::apply_texture_colors(), Geom::calc_tight_bounds(), RopeNode::clear_matrix(), Lens::clear_view_mat(), Lens::compute_lens_mat(), PerspectiveLens::compute_projection_mat(), OrthographicLens::compute_projection_mat(), Lens::compute_projection_mat(), GraphicsStateGuardian::fetch_specified_part(), GraphicsStateGuardian::fetch_specified_value(), NurbsBasisVector::get_basis(), PhysicsObject::get_inertial_tensor(), TransformState::get_mat(), NodePath::get_mat(), Trackball::reset(), Lens::set_frustum_from_corners(), TextNode::TextNode(), CollisionNode::xform(), and PartBundleNode::xform().
bool LMatrix4f::invert_affine_from | ( | const LMatrix4f & | other | ) | [inline] |
Performs an invert of the indicated matrix, storing the result in this matrix.
The calculation is only correct of the other matrix represents an affine transform.
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 1895 of file lmatrix.h.
Referenced by Lens::set_frustum_from_corners().
bool LMatrix4f::invert_from | ( | const LMatrix4f & | 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 1844 of file lmatrix.h.
Referenced by PGItem::activate_region(), GraphicsStateGuardian::fetch_specified_part(), Lens::get_film_mat_inv(), Lens::get_lens_mat_inv(), Lens::get_projection_mat_inv(), CollisionBox::rederive_to_3d_mat(), Lens::set_frustum_from_corners(), and CollisionBox::setup_points().
bool LMatrix4f::invert_in_place | ( | ) | [inline] |
Inverts the current matrix.
Returns true if the inverse is successful, false if the matrix was singular.
Definition at line 1934 of file lmatrix.h.
Referenced by CMotionTrail::update_motion_trail().
bool LMatrix4f::is_nan | ( | ) | const [inline] |
Returns true if any component of the matrix is not-a-number, false otherwise.
Definition at line 1255 of file lmatrix.h.
Referenced by PhysicsObject::get_lcs(), PhysxActor::move_global_mat(), PhysxBox::rotate(), PhysxActor::set_global_mat(), Lens::set_view_mat(), PortalNode::xform(), and CollisionNode::xform().
const LMatrix4f & LMatrix4f::ones_mat | ( | ) | [inline, static] |
Returns an matrix filled with ones.
Definition at line 834 of file lmatrix.h.
Referenced by GraphicsStateGuardian::fetch_specified_part().
bool LMatrix4f::operator< | ( | const LMatrix4f & | 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().
void LMatrix4f::read_datagram | ( | DatagramIterator & | scan | ) |
Reads itself out of the datagram.
Definition at line 1157 of file lmatrix.cxx.
Referenced by TransformState::fillin(), CollisionBox::fillin(), CharacterJoint::fillin(), and PartGroup::fillin().
LMatrix4f LMatrix4f::rotate_mat | ( | float | angle, |
const LVecBase3f & | axis, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
LMatrix4f LMatrix4f::rotate_mat_normaxis | ( | float | angle, |
const LVecBase3f & | axis, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
LMatrix4f LMatrix4f::scale_mat | ( | const LVecBase3f & | scale | ) | [inline, static] |
LMatrix4f LMatrix4f::scale_mat | ( | float | scale | ) | [inline, static] |
LMatrix4f LMatrix4f::scale_mat | ( | float | sx, |
float | sy, | ||
float | sz | ||
) | [inline, static] |
LMatrix4f LMatrix4f::scale_shear_mat | ( | const LVecBase3f & | scale, |
const LVecBase3f & | shear, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
Returns a matrix that applies the indicated scale and shear.
Definition at line 2140 of file lmatrix.h.
Referenced by MovingPartMatrix::get_blend_value().
LMatrix4f LMatrix4f::scale_shear_mat | ( | float | sx, |
float | sy, | ||
float | sz, | ||
float | shxy, | ||
float | shxz, | ||
float | shyz, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
void LMatrix4f::set_cell | ( | int | row, |
int | col, | ||
float | value | ||
) | [inline] |
void LMatrix4f::set_col | ( | int | col, |
const LVecBase4f & | v | ||
) | [inline] |
Replaces the indicated column of the matrix.
Definition at line 1090 of file lmatrix.h.
Referenced by NurbsCurve::rebuild_curveseg().
void LMatrix4f::set_col | ( | int | col, |
const LVecBase3f & | v | ||
) | [inline] |
void LMatrix4f::set_rotate_mat | ( | float | angle, |
const LVecBase3f & | axis, | ||
CoordinateSystem | cs = CS_default |
||
) |
Sets mat to a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
Definition at line 762 of file lmatrix.cxx.
void LMatrix4f::set_rotate_mat_normaxis | ( | float | angle, |
const LVecBase3f & | 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 prenormalized.
Definition at line 833 of file lmatrix.cxx.
void LMatrix4f::set_row | ( | int | row, |
const LVecBase3f & | v | ||
) | [inline] |
void LMatrix4f::set_row | ( | int | row, |
const LVecBase4f & | v | ||
) | [inline] |
Replaces the indicated row of the matrix.
Definition at line 1077 of file lmatrix.h.
Referenced by CollisionBox::calc_to_3d_mat(), TrackerNode::do_transmit_data(), GraphicsStateGuardian::fetch_specified_value(), CollisionTube::fill_viz_geom(), CollisionDSSolid::fill_viz_geom(), MovingPartMatrix::get_blend_value(), NurbsCurveResult::NurbsCurveResult(), Lens::set_frustum_from_corners(), Trackball::set_origin(), and LODNode::show_switches_cull_callback().
void LMatrix4f::set_scale_mat | ( | const LVecBase3f & | scale | ) | [inline] |
void LMatrix4f::set_scale_shear_mat | ( | const LVecBase3f & | scale, |
const LVecBase3f & | shear, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline] |
void LMatrix4f::set_shear_mat | ( | const LVecBase3f & | shear, |
CoordinateSystem | cs = CS_default |
||
) | [inline] |
void LMatrix4f::set_translate_mat | ( | const LVecBase3f & | trans | ) | [inline] |
void LMatrix4f::set_upper_3 | ( | const LMatrix3f & | upper3 | ) | [inline] |
LMatrix4f LMatrix4f::shear_mat | ( | float | shxy, |
float | shxz, | ||
float | shyz, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
LMatrix4f LMatrix4f::shear_mat | ( | const LVecBase3f & | shear, |
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
int LMatrix4f::size | ( | ) | [inline, static] |
LMatrix4f LMatrix4f::translate_mat | ( | float | tx, |
float | ty, | ||
float | tz | ||
) | [inline, static] |
LMatrix4f LMatrix4f::translate_mat | ( | const LVecBase3f & | trans | ) | [inline, static] |
Returns a matrix that applies the indicated translation.
Definition at line 2011 of file lmatrix.h.
Referenced by PerspectiveLens::compute_projection_mat(), GraphicsStateGuardian::fetch_specified_part(), PhysicsObject::get_lcs(), Trackball::move_origin(), CollisionLevelStateBase::prepare_collider(), and Trackball::set_origin().
void LMatrix4f::write_datagram | ( | Datagram & | destination | ) | const |
Writes the matrix to the datagram.
Definition at line 1143 of file lmatrix.cxx.
Referenced by TransformState::write_datagram(), CollisionBox::write_datagram(), and CharacterJoint::write_datagram().
LVecBase4f LMatrix4f::xform | ( | const LVecBase4f & | v | ) | const [inline] |
4-component vector or point times matrix.
This is a fully general operation.
Definition at line 1473 of file lmatrix.h.
Referenced by Lens::extrude_impl(), Lens::project_impl(), and CMotionTrail::update_motion_trail().
LVecBase3f LMatrix4f::xform_point | ( | const LVecBase3f & | v | ) | const [inline] |
The matrix transforms a 3-component point (including translation component) and returns the result.
This assumes the matrix is an affine transform.
Definition at line 1489 of file lmatrix.h.
Referenced by GeomPrimitive::calc_tight_bounds(), GraphicsStateGuardian::fetch_specified_part(), GraphicsStateGuardian::fetch_specified_value(), Texture::generate_normalization_cube_map(), PGItem::mouse_to_local(), PNMImage::remix_channels(), and Lens::set_frustum_from_corners().
LVecBase3f LMatrix4f::xform_vec | ( | const LVecBase3f & | v | ) | const [inline] |
The matrix transforms a 3-component vector (without translation component) and returns the result.
This assumes the matrix is an orthonormal transform.
Definition at line 1510 of file lmatrix.h.
Referenced by GraphicsStateGuardian::fetch_specified_part(), and GraphicsStateGuardian::fetch_specified_value().
LVecBase3f LMatrix4f::xform_vec_general | ( | const LVecBase3f & | v | ) | const [inline] |
const LMatrix4f & LMatrix4f::y_to_z_up_mat | ( | ) | [inline, static] |
Returns a matrix that transforms from the Y-up coordinate system to the Z-up coordinate system.
Definition at line 2171 of file lmatrix.h.
Referenced by PhysxWheelShapeDesc::set_to_default(), and PhysxHeightFieldShapeDesc::set_to_default().
const LMatrix4f & LMatrix4f::z_to_y_up_mat | ( | ) | [inline, static] |
const LMatrix4f & LMatrix4f::zeros_mat | ( | ) | [inline, static] |
Returns an matrix filled with zeros.
Definition at line 844 of file lmatrix.h.
Referenced by GraphicsStateGuardian::fetch_specified_part(), MovingPartMatrix::get_blend_value(), PhysxActor::get_c_mass_global_mat(), PhysxActor::get_c_mass_local_mat(), PhysxActor::get_global_mat(), PhysxShape::get_local_mat(), and PhysxForceFieldShape::get_mat().