Visual Computing Library
|
The TransformMatrix class represents a component that stores a 4x4 matrix that can be used for a transformation. This class is usually used as a component of a Mesh. More...
#include <vclib/mesh/components/transform_matrix.h>
Public Types | |
using | TransformMatrixType = Matrix44< Scalar > |
Expose the type of the transform matrix. | |
Public Member Functions | |
TransformMatrix () | |
Initializes the transform matrix to identity. | |
const TransformMatrixType & | transformMatrix () const |
Returns a const reference to the transform matrix. | |
TransformMatrixType & | transformMatrix () |
Returns a reference to the transform matrix. | |
Protected Member Functions | |
template<typename Element > | |
void | importFrom (const Element &e, bool=true) |
void | serialize (std::ostream &os) const |
void | deserialize (std::istream &is) |
Private Types | |
using | Base = Component< TransformMatrix< Scalar, ParentElemType, OPT >, CompId::TRANSFORM_MATRIX, Matrix44< Scalar >, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT > |
Private Member Functions | |
void | init () |
Initializes transform matrix to identity. | |
The TransformMatrix class represents a component that stores a 4x4 matrix that can be used for a transformation. This class is usually used as a component of a Mesh.
The member functions of this class will be available in the instance of any Element or Mesh that will contain this component.
For example, if you have a Mesh m
with the TransformMatrix component, you'll be able to access to this component member functions from m
:
Scalar | The type of the scalar that will be used to represent the matrix. |
ParentElemType | This template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically. |
OPT | If true, the component will be optional. This argument is considered only if the component is stored vertically. |
|
inlineprivate |
Initializes transform matrix to identity.
It is made in the init function since the component could be not available during construction (e.g. if the component is optional and not enabled).
This member function is hidden by the element that inherits this class.
|
inline |
Returns a reference to the transform matrix.
|
inline |
Returns a const reference to the transform matrix.