Panda3D
|
This is a 4-by-4 transform matrix. More...
#include "lmatrix.h"
Classes | |
class | CRow |
class | Row |
Public Types | |
enum | { num_components = 16, is_int = 0 } |
typedef const float * | const_iterator |
typedef LSimpleMatrix< float, 4, 4 > | EMatrix4 |
typedef const float * | iterator |
typedef float | numeric_type |
Public Member Functions | |
LMatrix4f (const LMatrix4f &other) | |
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) | |
LMatrix4f (const LMatrix3f &upper3) | |
LMatrix4f (const LMatrix3f &upper3, const LVecBase3f &trans) | |
LMatrix4f (const EMatrix4 &m) | |
void | accumulate (const LMatrix4f &other, float weight) |
Computes (*this) += other * weight. More... | |
size_t | add_hash (size_t hash) const |
Adds the vector into the running hash. More... | |
size_t | add_hash (size_t hash, float threshold) const |
Adds the vector into the running hash. More... | |
bool | almost_equal (const LMatrix4f &other, float threshold) const |
Returns true if two matrices are memberwise equal within a specified tolerance. More... | |
bool | almost_equal (const LMatrix4f &other) const |
Returns true if two matrices are memberwise equal within a default tolerance based on the numeric type. More... | |
iterator | begin () |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. More... | |
const_iterator | begin () const |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. More... | |
int | compare_to (const LMatrix4f &other) const |
This flavor of compare_to uses a default threshold value based on the numeric type. More... | |
int | compare_to (const LMatrix4f &other, float threshold) const |
Sorts matrices lexicographically, componentwise. More... | |
void | componentwise_mult (const LMatrix4f &other) |
iterator | end () |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. More... | |
const_iterator | end () const |
Returns an iterator that may be used to traverse the elements of the matrix, STL-style. More... | |
void | fill (float fill_value) |
Sets each element of the matrix to the indicated fill_value. More... | |
void | generate_hash (ChecksumHashGenerator &hashgen) const |
Adds the vector to the indicated hash generator. More... | |
void | generate_hash (ChecksumHashGenerator &hashgen, float scale) const |
Adds the vector to the indicated hash generator. More... | |
float | get_cell (int row, int col) const |
Returns a particular element of the matrix. More... | |
LVecBase4f | get_col (int col) const |
Retrieves the indicated column of the matrix as a 4-component vector. More... | |
LVecBase3f | get_col3 (int col) const |
Retrieves the indicated column of the matrix as a 3-component vector, ignoring the last row. More... | |
const float * | get_data () const |
Returns the address of the first of the nine data elements in the matrix. More... | |
size_t | get_hash () const |
Returns a suitable hash for phash_map. More... | |
size_t | get_hash (float threshold) const |
Returns a suitable hash for phash_map. More... | |
int | get_num_components () const |
Returns the number of elements in the matrix, 16. More... | |
LVecBase4f | get_row (int row) const |
Retrieves the indicated row of the matrix as a 4-component vector. More... | |
void | get_row (LVecBase4f &result_vec, int row) const |
Stores the indicated row of the matrix as a 4-component vector. More... | |
LVecBase3f | get_row3 (int row) const |
Retrieves the row column of the matrix as a 3-component vector, ignoring the last column. More... | |
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. More... | |
LMatrix3f | get_upper_3 () const |
Retrieves the upper 3x3 submatrix. More... | |
bool | invert_affine_from (const LMatrix4f &other) |
Performs an invert of the indicated matrix, storing the result in this matrix. More... | |
bool | invert_from (const LMatrix4f &other) |
Computes the inverse of the other matrix, and stores the result in this matrix. More... | |
bool | invert_in_place () |
Inverts the current matrix. More... | |
bool | is_identity () const |
Returns true if this is (close enough to) the identity matrix, false otherwise. More... | |
bool | is_nan () const |
Returns true if any component of the matrix is not-a-number, false otherwise. More... | |
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* (const LMatrix4f &other) const |
LMatrix4f | operator* (float scalar) const |
LMatrix4f & | operator*= (const LMatrix4f &other) |
LMatrix4f & | operator*= (float scalar) |
LMatrix4f & | operator+= (const LMatrix4f &other) |
Performs a memberwise addition between two matrices. More... | |
LMatrix4f & | operator-= (const LMatrix4f &other) |
Performs a memberwise addition between two matrices. More... | |
LMatrix4f | operator/ (float scalar) const |
LMatrix4f & | operator/= (float scalar) |
bool | operator< (const LMatrix4f &other) const |
This performs a lexicographical comparison. More... | |
LMatrix4f & | operator= (const LMatrix4f &other) |
LMatrix4f & | operator= (const UnalignedLMatrix4f &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(). More... | |
void | read_datagram_fixed (DatagramIterator &scan) |
Reads the matrix from the Datagram using get_float32() or get_float64(). More... | |
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. More... | |
void | set_col (int col, const LVecBase4f &v) |
Replaces the indicated column of the matrix. More... | |
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. More... | |
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. More... | |
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. More... | |
void | set_row (int row, const LVecBase4f &v) |
Replaces the indicated row of the matrix. More... | |
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. More... | |
void | set_scale_mat (const LVecBase3f &scale) |
Fills mat with a matrix that applies the indicated scale in each of the three axes. More... | |
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. More... | |
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. More... | |
void | set_translate_mat (const LVecBase3f &trans) |
Fills mat with a matrix that applies the indicated translation. More... | |
void | set_upper_3 (const LMatrix3f &upper3) |
Sets the upper 3x3 submatrix. More... | |
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(). More... | |
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(). More... | |
LVecBase4f | xform (const LVecBase4f &v) const |
4-component vector or point times matrix. More... | |
void | xform_in_place (LVecBase4f &v) const |
4-component vector or point times matrix. More... | |
LVecBase3f | xform_point (const LVecBase3f &v) const |
The matrix transforms a 3-component point (including translation component) and returns the result. More... | |
LVecBase3f | xform_point_general (const LVecBase3f &v) const |
The matrix transforms a 3-component point (including translation component) and returns the result, as a fully general operation. More... | |
void | xform_point_general_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component point (including translation component), as a fully general operation. More... | |
void | xform_point_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component point (including translation component). More... | |
LVecBase3f | xform_vec (const LVecBase3f &v) const |
The matrix transforms a 3-component vector (without translation component) and returns the result. More... | |
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. More... | |
void | xform_vec_general_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component vector (without translation component), as a fully general operation. More... | |
void | xform_vec_in_place (LVecBase3f &v) const |
The matrix transforms a 3-component vector (without translation component). More... | |
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. More... | |
static TypeHandle | get_class_type () |
static const LMatrix4f & | ident_mat () |
Returns an identity matrix. More... | |
static void | init_type () |
static const LMatrix4f & | ones_mat () |
Returns an matrix filled with ones. More... | |
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. More... | |
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. More... | |
static LMatrix4f | scale_mat (const LVecBase3f &scale) |
Returns a matrix that applies the indicated scale in each of the three axes. More... | |
static LMatrix4f | scale_mat (float sx, float sy, float sz) |
Returns a matrix that applies the indicated scale in each of the three axes. More... | |
static LMatrix4f | scale_mat (float scale) |
Returns a matrix that applies the indicated uniform scale. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static int | size () |
Returns 4: the number of rows of a LMatrix4. More... | |
static LMatrix4f | translate_mat (const LVecBase3f &trans) |
Returns a matrix that applies the indicated translation. More... | |
static LMatrix4f | translate_mat (float tx, float ty, float tz) |
Returns a matrix that applies the indicated translation. More... | |
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. More... | |
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. More... | |
static const LMatrix4f & | zeros_mat () |
Returns an matrix filled with zeros. More... | |
Public Attributes | |
EMatrix4 | _m |
|
inline |
Computes (*this) += other * weight.
Definition at line 2300 of file lmatrix.h.
Referenced by VertexTransform::accumulate_matrix(), and JointVertexTransform::accumulate_matrix().
|
inline |
|
inline |
Adds the vector into the running hash.
Definition at line 1607 of file lmatrix.h.
References floating_point_hash< Key >::add_hash().
bool LMatrix4f::almost_equal | ( | const LMatrix4f & | other, |
float | threshold | ||
) | const |
Returns true if two matrices are memberwise equal within a specified tolerance.
This is faster than the equivalence operator as this doesn't have to guarantee that it is transitive.
Definition at line 879 of file lmatrix.cxx.
Referenced by GeomTransformer::apply_texture_colors(), CollisionNode::xform(), PartBundleNode::xform(), and PolylightNode::xform().
|
inline |
|
inline |
|
inline |
|
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 724 of file lmatrix.cxx.
|
static |
Returns a matrix that transforms from the indicated coordinate system to the indicated coordinate system.
Definition at line 656 of file lmatrix.cxx.
Referenced by DXGraphicsStateGuardian9::bind_light(), TextNode::calc_width(), ObjToEggConverter::convert_file(), SpeedTreeNode::cull_callback(), GraphicsStateGuardian::fetch_specified_part(), DXGraphicsStateGuardian9::get_index_type(), GraphicsStateGuardian::get_render_buffer(), Lens::is_orthographic(), CullableObject::munge_geom(), TinyGraphicsStateGuardian::prepare_display_region(), DXGraphicsStateGuardian9::prepare_display_region(), GraphicsStateGuardian::set_coordinate_system(), and StaticTextFont::StaticTextFont().
|
inline |
|
inline |
|
inline |
|
inline |
Adds the vector to the indicated hash generator.
Definition at line 2589 of file lmatrix.h.
References get_data().
void LMatrix4f::generate_hash | ( | ChecksumHashGenerator & | hashgen, |
float | scale | ||
) | const |
Adds the vector to the indicated hash generator.
Definition at line 973 of file lmatrix.cxx.
References ChecksumHashGenerator::add_fp().
|
inline |
Returns a particular element of the matrix.
Definition at line 1444 of file lmatrix.h.
Referenced by TinyGraphicsStateGuardian::bind_light().
|
inline |
Retrieves the indicated column of the matrix as a 4-component vector.
Definition at line 1294 of file lmatrix.h.
Referenced by CubicCurveseg::CubicCurveseg(), CubicCurveseg::get_bezier_seg(), DXGraphicsStateGuardian9::get_index_type(), LQuaternionf::ident_quat(), LQuaterniond::ident_quat(), LQuaternionf::operator*(), LQuaterniond::operator*(), and NurbsCurve::rebuild_curveseg().
|
inline |
|
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 1468 of file lmatrix.h.
Referenced by DXGraphicsStateGuardian9::begin_draw_primitives(), SpeedTreeNode::cull_callback(), DXGraphicsStateGuardian9::end_draw_primitives(), generate_hash(), LMatrix4d::generate_hash(), DXGraphicsStateGuardian9::get_index_type(), Shader::get_language(), DXShaderContext9::issue_parameters(), DXGraphicsStateGuardian9::prepare_lens(), and DXGraphicsStateGuardian9::reset().
|
inline |
|
inline |
|
inline |
Returns the number of elements in the matrix, 16.
Definition at line 1478 of file lmatrix.h.
Referenced by Shader::get_language().
|
inline |
Retrieves the indicated row of the matrix as a 4-component vector.
Definition at line 1258 of file lmatrix.h.
Referenced by GeomVertexWriter::add_matrix4f(), NurbsCurveResult::eval_segment_extended_point(), NurbsCurveResult::eval_segment_extended_points(), LQuaternionf::ident_quat(), LQuaterniond::ident_quat(), LQuaternionf::operator*(), LQuaterniond::operator*(), and GeomVertexWriter::set_matrix4f().
|
inline |
|
inline |
Retrieves the row column of the matrix as a 3-component vector, ignoring the last column.
Definition at line 1312 of file lmatrix.h.
Referenced by NodePath::do_billboard_axis(), NodePath::do_billboard_point_eye(), NodePath::do_billboard_point_world(), GraphicsStateGuardian::fetch_specified_value(), Trackball::get_trans_mat(), PhysxManager::mat4_to_nxMat34(), Lens::set_frustum_from_corners(), LODNode::xform(), and PGFrameStyle::xform().
|
inline |
|
inline |
Retrieves the upper 3x3 submatrix.
Definition at line 1169 of file lmatrix.h.
Referenced by LQuaternionf::almost_same_direction(), LQuaterniond::almost_same_direction(), GeomVertexData::clear_cache_stage(), invert_affine_from(), LMatrix4d::invert_affine_from(), PhysxManager::mat4_to_nxMat34(), LQuaternionf::operator*(), and LQuaterniond::operator*().
|
inlinestatic |
Returns an identity matrix.
This function definition must appear first, since some inline functions below take advantage of it.
Definition at line 903 of file lmatrix.h.
Referenced by GeomTransformer::apply_texture_colors(), ColladaLoader::build_graph(), Geom::calc_tight_bounds(), Lens::clear_custom_film_mat(), RopeNode::clear_matrix(), Lens::clear_view_mat(), GraphicsStateGuardian::fetch_specified_part(), GraphicsStateGuardian::fetch_specified_value(), NurbsBasisVector::get_basis(), PhysicsObject::get_inertial_tensor(), NodePath::get_mat(), GeomVertexReader::get_matrix4f(), TransformBlend::get_modified(), Geom::get_next_modified(), TransformBlend::get_weight(), TextAssembler::get_xpos(), Lens::is_orthographic(), TextAssembler::is_whitespace(), PartBundle::register_with_read_factory(), Trackball::reset(), BulletBodyNode::safe_to_flatten_below(), Lens::set_frustum_from_corners(), UserVertexTransform::set_matrix(), TextNode::TextNode(), Lens::write_datagram(), CollisionNode::xform(), PartBundleNode::xform(), and PolylightNode::xform().
|
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 2249 of file lmatrix.h.
References get_upper_3().
Referenced by Lens::set_frustum_from_corners().
|
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 2173 of file lmatrix.h.
Referenced by PfmFile::calc_tight_bounds(), GeomVertexData::clear_cache_stage(), CollisionPolygon::flush_level(), CollisionTube::get_test_pcollector(), CollisionParabola::get_test_pcollector(), CullableObject::munge_geom(), CollisionBox::rederive_to_3d_mat(), Lens::set_frustum_from_corners(), and CollisionBox::setup_points().
|
inline |
Inverts the current matrix.
Returns true if the inverse is successful, false if the matrix was singular.
Definition at line 2288 of file lmatrix.h.
Referenced by BulletDebugNode::draw_mask_changed(), and CMotionTrail::update_motion_trail().
|
inline |
|
inline |
Returns true if any component of the matrix is not-a-number, false otherwise.
Definition at line 1417 of file lmatrix.h.
Referenced by PhysicsObject::get_lcs(), BulletWheel::get_wheel_axle_cs(), Lens::is_orthographic(), PhysxActor::move_global_mat(), PhysxBox::rotate(), Lens::set_custom_film_mat(), PhysxActor::set_global_mat(), PhysxForceFieldShapeDesc::set_name(), PhysxShapeDesc::set_trigger(), CollisionNode::xform(), OccluderNode::xform(), PortalNode::xform(), and PolylightNode::xform().
|
inlinestatic |
Returns an matrix filled with ones.
Definition at line 913 of file lmatrix.h.
Referenced by GraphicsStateGuardian::fetch_specified_part().
|
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 1162 of file lmatrix.cxx.
References DatagramIterator::get_stdfloat(), and TypeHandle::none().
Referenced by PartGroup::write_datagram(), and CollisionBox::write_datagram().
void LMatrix4f::read_datagram_fixed | ( | DatagramIterator & | scan | ) |
Reads the matrix from the Datagram using get_float32() or get_float64().
Definition at line 1127 of file lmatrix.cxx.
References DatagramIterator::get_float32(), and DatagramIterator::get_float64().
|
inlinestatic |
Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
Definition at line 2425 of file lmatrix.h.
References set_rotate_mat().
Referenced by PfmTrans::add_transform_options(), and ColladaLoader::build_graph().
|
inlinestatic |
Returns a matrix that rotates by the given angle in degrees counterclockwise about the indicated vector.
Assumes axis has been prenormalized.
Definition at line 2440 of file lmatrix.h.
References set_rotate_mat_normaxis().
Referenced by Trackball::get_trans_mat(), and TextAssembler::is_whitespace().
|
inlinestatic |
Returns a matrix that applies the indicated scale in each of the three axes.
Definition at line 2456 of file lmatrix.h.
Referenced by PfmTrans::add_transform_options(), ColladaLoader::build_graph(), TextAssembler::is_whitespace(), WindowFramework::make_camera(), TinyGraphicsStateGuardian::prepare_display_region(), and DXGraphicsStateGuardian9::prepare_display_region().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns a matrix that applies the indicated scale and shear.
Definition at line 2526 of file lmatrix.h.
References set_scale_shear_mat().
Referenced by MovingPartMatrix::get_blend_value().
|
inlinestatic |
Returns a matrix that applies the indicated scale and shear.
Definition at line 2541 of file lmatrix.h.
References set_scale_shear_mat().
|
inline |
|
inline |
Replaces the indicated column of the matrix.
Definition at line 1204 of file lmatrix.h.
Referenced by ColladaLoader::build_graph(), CubicCurveseg::get_bezier_seg(), and NurbsCurve::rebuild_curveseg().
|
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 746 of file lmatrix.cxx.
Referenced by LMatrix3f::rotate_mat(), rotate_mat(), LMatrix3d::rotate_mat(), and LMatrix4d::rotate_mat().
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 817 of file lmatrix.cxx.
Referenced by TextAssembler::is_whitespace(), LMatrix3f::rotate_mat_normaxis(), rotate_mat_normaxis(), LMatrix3d::rotate_mat_normaxis(), and LMatrix4d::rotate_mat_normaxis().
|
inline |
Replaces the indicated row of the matrix.
Definition at line 1187 of file lmatrix.h.
Referenced by CubicCurveseg::bezier_basis(), PfmFile::calc_tight_bounds(), CollisionBox::calc_to_3d_mat(), GraphicsStateGuardian::fetch_specified_part(), GraphicsStateGuardian::fetch_specified_value(), CollisionPolygon::flush_level(), GeomVertexReader::get_matrix4f(), CollisionTube::get_test_pcollector(), CollisionParabola::get_test_pcollector(), Trackball::get_trans_mat(), LQuaternionf::ident_quat(), LQuaterniond::ident_quat(), Lens::is_orthographic(), TextAssembler::is_whitespace(), WindowFramework::make_camera(), NurbsCurveResult::NurbsCurveResult(), BillboardEffect::safe_to_transform(), CollisionSegment::set_from_lens(), Lens::set_frustum_from_corners(), and LODNode::verify_child_bounds().
|
inline |
|
inline |
|
inline |
Fills mat with a matrix that applies the indicated scale and shear.
Definition at line 2373 of file lmatrix.h.
Referenced by LMatrix3f::scale_shear_mat(), scale_shear_mat(), LMatrix3d::scale_shear_mat(), and LMatrix4d::scale_shear_mat().
|
inline |
Fills mat with a matrix that applies the indicated shear in each of the three planes.
Definition at line 2361 of file lmatrix.h.
Referenced by LMatrix3f::shear_mat(), shear_mat(), LMatrix3d::shear_mat(), and LMatrix4d::shear_mat().
|
inline |
|
inline |
|
inlinestatic |
Returns a matrix that applies the indicated shear in each of the three planes.
Definition at line 2499 of file lmatrix.h.
References set_shear_mat().
|
inlinestatic |
Returns a matrix that applies the indicated shear in each of the three planes.
Definition at line 2512 of file lmatrix.h.
References set_shear_mat().
|
inlinestatic |
|
inlinestatic |
Returns a matrix that applies the indicated translation.
Definition at line 2397 of file lmatrix.h.
Referenced by PfmTrans::add_transform_options(), ColladaLoader::build_graph(), GraphicsStateGuardian::fetch_specified_part(), PhysicsObject::get_lcs(), Trackball::get_trans_mat(), TextAssembler::get_xpos(), TextAssembler::is_whitespace(), Trackball::move_origin(), CollisionLevelStateBase::prepare_collider(), and Trackball::set_origin().
|
inlinestatic |
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 1148 of file lmatrix.cxx.
References Datagram::add_stdfloat().
Referenced by CollisionBox::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 1108 of file lmatrix.cxx.
References Datagram::add_float32(), and Datagram::add_float64().
|
inline |
4-component vector or point times matrix.
This is a fully general operation.
Definition at line 1647 of file lmatrix.h.
Referenced by CollisionPlane::get_test_pcollector(), CollisionSphere::get_test_pcollector(), CollisionTube::get_test_pcollector(), CollisionPolygon::get_test_pcollector(), Lens::is_orthographic(), CullableObject::munge_geom(), and CMotionTrail::update_motion_trail().
|
inline |
|
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 1667 of file lmatrix.h.
Referenced by GeomPrimitive::calc_tight_bounds(), BulletDebugNode::draw_mask_changed(), GraphicsStateGuardian::fetch_specified_part(), GraphicsStateGuardian::fetch_specified_value(), Texture::generate_normalization_cube_map(), CollisionSphere::get_test_pcollector(), PfmVizzer::make_displacement(), PNMImage::remix_channels(), and Lens::set_frustum_from_corners().
|
inline |
The matrix transforms a 3-component point (including translation component) and returns the result, as a fully general operation.
Definition at line 1692 of file lmatrix.h.
Referenced by PfmVizzer::extrude(), and Lens::is_orthographic().
|
inline |
The matrix transforms a 3-component point (including translation component), as a fully general operation.
Definition at line 1787 of file lmatrix.h.
Referenced by PfmFile::xform().
|
inline |
|
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 1707 of file lmatrix.h.
Referenced by GraphicsStateGuardian::fetch_specified_part(), GraphicsStateGuardian::fetch_specified_value(), and CullableObject::munge_geom().
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Returns a matrix that transforms from the Y-up coordinate system to the Z-up coordinate system.
Definition at line 2557 of file lmatrix.h.
Referenced by PhysxHeightFieldShapeDesc::set_to_default(), and PhysxWheelShapeDesc::set_to_default().
|
inlinestatic |
|
inlinestatic |
Returns an matrix filled with zeros.
Definition at line 923 of file lmatrix.h.
References UnalignedLMatrix4f::get_data().
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(), PhysxForceFieldShape::get_mat(), and TransformBlend::get_weight().