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 (const LMatrix3f &upper3) | |
LMatrix4f (const LMatrix3f &upper3, const LVecBase3f &trans) | |
LMatrix4f (const EMatrix4 &m) | |
LMatrix4f (const UnalignedLMatrix4f &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) | |
void | accumulate (const LMatrix4f &other, float weight) |
Computes (*this) += other * weight. | |
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 |
Stores the indicated row of the matrix as a 4-component vector. | |
LVecBase3f | get_row3 (int row) const |
Retrieves the row column of the matrix as a 3-component vector, ignoring the last column. | |
void | get_row3 (LVecBase3f &result_vec, int row) const |
Stores 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. | |
typedef | LINMATH_MATRIX (float, 4, 4) EMatrix4 |
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*= (float scalar) |
LMatrix4f & | operator*= (const LMatrix4f &other) |
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= (const UnalignedLMatrix4f &other) |
LMatrix4f & | operator= (const LMatrix4f &other) |
LMatrix4f & | operator= (float fill_value) |
bool | operator== (const LMatrix4f &other) const |
CRow | operator[] (int i) const |
Row | operator[] (int i) |
void | output (ostream &out) const |
void | read_datagram (DatagramIterator &source) |
Reads the matrix from the Datagram using get_stdfloat(). | |
void | read_datagram_fixed (DatagramIterator &scan) |
Reads the matrix from the Datagram using get_float32() or get_float64(). | |
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 LVecBase3f &v) |
Replaces the indicated column of the matrix with the indicated 3-component vector, ignoring the last row. | |
void | set_col (int col, const LVecBase4f &v) |
Replaces the indicated column of the matrix. | |
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 LVecBase4f &v) |
Replaces the indicated row of the matrix. | |
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_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 using add_stdfloat(). | |
void | write_datagram_fixed (Datagram &destination) const |
Writes the matrix to the Datagram using add_float32() or add_float64(), depending on the type of floats in the matrix, regardless of the setting of Datagram::set_stdfloat_double(). | |
LVecBase4f | xform (const LVecBase4f &v) const |
4-component vector or point times matrix. | |
void | xform_in_place (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. | |
void | xform_point_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component point (including translation component). | |
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. | |
void | xform_vec_general_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component vector (without translation component), as a fully general operation. | |
void | xform_vec_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component vector (without translation component). | |
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 | |
EMatrix4 | _m |
void LMatrix4f::accumulate | ( | const LMatrix4f & | other, |
float | weight | ||
) | [inline] |
Computes (*this) += other * weight.
Definition at line 2192 of file lmatrix.h.
Referenced by VertexTransform::accumulate_matrix(), and JointVertexTransform::accumulate_matrix().
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 870 of file lmatrix.cxx.
Referenced by GeomTransformer::apply_texture_colors(), ProjectionScreen::recompute_if_stale(), BulletSoftBodyNode::transform_changed(), BulletRigidBodyNode::transform_changed(), BulletGhostNode::transform_changed(), BulletCharacterControllerNode::transform_changed(), CollisionNode::xform(), and PartBundleNode::xform().
bool LMatrix4f::almost_equal | ( | const LMatrix4f & | other | ) | const [inline] |
LMatrix4f::const_iterator LMatrix4f::begin | ( | ) | const [inline] |
LMatrix4f::iterator LMatrix4f::begin | ( | ) | [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.
Definition at line 1523 of file lmatrix.h.
Referenced by TransformState::compare_to().
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 717 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 649 of file lmatrix.cxx.
Referenced by DXGraphicsStateGuardian9::bind_clip_plane(), DXGraphicsStateGuardian8::bind_clip_plane(), DXGraphicsStateGuardian9::bind_light(), DXGraphicsStateGuardian8::bind_light(), SpeedTreeNode::cull_callback(), 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 961 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 1262 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 1424 of file lmatrix.h.
Referenced by DXGraphicsStateGuardian9::begin_draw_primitives(), DXGraphicsStateGuardian8::begin_draw_primitives(), SpeedTreeNode::cull_callback(), DXGraphicsStateGuardian9::do_issue_transform(), DXGraphicsStateGuardian9::end_draw_primitives(), DXGraphicsStateGuardian8::end_draw_primitives(), DXGraphicsStateGuardian9::prepare_lens(), and DXGraphicsStateGuardian8::prepare_lens().
size_t LMatrix4f::get_hash | ( | ) | const [inline] |
size_t LMatrix4f::get_hash | ( | float | threshold | ) | const [inline] |
int LMatrix4f::get_num_components | ( | ) | const [inline] |
void LMatrix4f::get_row | ( | LVecBase4f & | result_vec, |
int | row | ||
) | 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 1226 of file lmatrix.h.
Referenced by NurbsCurveResult::eval_segment_extended_point(), and NurbsCurveResult::eval_segment_extended_points().
void LMatrix4f::get_row3 | ( | LVecBase3f & | result_vec, |
int | row | ||
) | const [inline] |
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 1280 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(), Lens::set_frustum_from_corners(), PGFrameStyle::xform(), and LODNode::xform().
LMatrix3f LMatrix4f::get_upper_3 | ( | ) | const [inline] |
Retrieves the upper 3x3 submatrix.
Definition at line 1137 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 871 of file lmatrix.h.
Referenced by GeomTransformer::apply_texture_colors(), Geom::calc_tight_bounds(), RopeNode::clear_matrix(), Lens::clear_view_mat(), Lens::do_compute_lens_mat(), PerspectiveLens::do_compute_projection_mat(), OrthographicLens::do_compute_projection_mat(), Lens::do_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 there was a singularity.
Definition at line 2141 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 2072 of file lmatrix.h.
Referenced by PGItem::activate_region(), GraphicsStateGuardian::fetch_specified_part(), 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 2180 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 1385 of file lmatrix.h.
Referenced by PhysicsObject::get_lcs(), PhysxActor::move_global_mat(), PhysxBox::rotate(), PhysxActor::set_global_mat(), PortalNode::xform(), OccluderNode::xform(), and CollisionNode::xform().
const LMatrix4f & LMatrix4f::ones_mat | ( | ) | [inline, static] |
Returns an matrix filled with ones.
Definition at line 881 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 & | source | ) |
Reads the matrix from the Datagram using get_stdfloat().
Definition at line 1150 of file lmatrix.cxx.
Referenced by TransformState::fillin(), CollisionBox::fillin(), CharacterJoint::fillin(), and PartGroup::fillin().
void LMatrix4f::read_datagram_fixed | ( | DatagramIterator & | scan | ) |
Reads the matrix from the Datagram using get_float32() or get_float64().
Definition at line 1115 of file lmatrix.cxx.
LMatrix4f LMatrix4f::rotate_mat | ( | float | angle, |
const LVecBase3f & | 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 2317 of file lmatrix.h.
Referenced by PfmTrans::ns_dispatch_rotate_axis(), and PfmTrans::ns_dispatch_rotate_xyz().
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] |
Returns a matrix that applies the indicated scale in each of the three axes.
Definition at line 2348 of file lmatrix.h.
Referenced by PfmTrans::dispatch_scale().
LMatrix4f LMatrix4f::scale_mat | ( | float | sx, |
float | sy, | ||
float | sz | ||
) | [inline, static] |
LMatrix4f LMatrix4f::scale_mat | ( | float | scale | ) | [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 2418 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 1172 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 739 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 810 of file lmatrix.cxx.
void LMatrix4f::set_row | ( | int | row, |
const LVecBase4f & | v | ||
) | [inline] |
Replaces the indicated row of the matrix.
Definition at line 1155 of file lmatrix.h.
Referenced by CollisionBox::calc_to_3d_mat(), TrackerNode::do_transmit_data(), GraphicsStateGuardian::fetch_specified_value(), CollisionTube::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_row | ( | int | row, |
const LVecBase3f & | v | ||
) | [inline] |
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 | ( | const LVecBase3f & | shear, |
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
LMatrix4f LMatrix4f::shear_mat | ( | float | shxy, |
float | shxz, | ||
float | shyz, | ||
CoordinateSystem | cs = CS_default |
||
) | [inline, static] |
int LMatrix4f::size | ( | ) | [inline, static] |
LMatrix4f LMatrix4f::translate_mat | ( | const LVecBase3f & | trans | ) | [inline, static] |
Returns a matrix that applies the indicated translation.
Definition at line 2289 of file lmatrix.h.
Referenced by PfmTrans::dispatch_translate(), PerspectiveLens::do_compute_projection_mat(), GraphicsStateGuardian::fetch_specified_part(), PhysicsObject::get_lcs(), Trackball::move_origin(), CollisionLevelStateBase::prepare_collider(), and Trackball::set_origin().
LMatrix4f LMatrix4f::translate_mat | ( | float | tx, |
float | ty, | ||
float | tz | ||
) | [inline, static] |
void LMatrix4f::write_datagram | ( | Datagram & | destination | ) | const |
Writes the matrix to the Datagram using add_stdfloat().
This is appropriate when you want to write the matrix using the standard width setting, especially when you are writing a bam file.
Definition at line 1136 of file lmatrix.cxx.
Referenced by TransformState::write_datagram(), CollisionBox::write_datagram(), and CharacterJoint::write_datagram().
void LMatrix4f::write_datagram_fixed | ( | Datagram & | destination | ) | const |
Writes the matrix to the Datagram using add_float32() or add_float64(), depending on the type of floats in the matrix, regardless of the setting of Datagram::set_stdfloat_double().
This is appropriate when you want to write a fixed-width value to the datagram, especially when you are not writing a bam file.
Definition at line 1096 of file lmatrix.cxx.
LVecBase4f LMatrix4f::xform | ( | const LVecBase4f & | v | ) | const [inline] |
4-component vector or point times matrix.
This is a fully general operation.
Definition at line 1603 of file lmatrix.h.
Referenced by Lens::do_extrude(), Lens::do_project(), and CMotionTrail::update_motion_trail().
void LMatrix4f::xform_in_place | ( | LVecBase4f & | v | ) | const [inline] |
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 1623 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(), PfmFile::project(), PNMImage::remix_channels(), and Lens::set_frustum_from_corners().
void LMatrix4f::xform_point_in_place | ( | LVecBase3f & | v | ) | const [inline] |
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 1648 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] |
void LMatrix4f::xform_vec_general_in_place | ( | LVecBase3f & | v | ) | const [inline] |
void LMatrix4f::xform_vec_in_place | ( | 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 2449 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 891 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().