Visual Computing Library
Loading...
Searching...
No Matches
vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT > Class Template Reference

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>

Inheritance diagram for vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >:

Public Types

using TransformMatrixType = Matrix44< Scalar >
 Expose the type of the transform matrix.
 

Public Member Functions

 TransformMatrix ()
 Initializes the transform matrix to identity.
 
const TransformMatrixTypetransformMatrix () const
 Returns a const reference to the transform matrix.
 
TransformMatrixTypetransformMatrix ()
 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.
 

Detailed Description

template<typename Scalar, typename ParentElemType = void, bool OPT = false>
class vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >

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:

m.transformMatrix();
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Note
This component can be both used for Elements and Meshes.
Template Parameters
ScalarThe type of the scalar that will be used to represent the matrix.
ParentElemTypeThis 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.
OPTIf true, the component will be optional. This argument is considered only if the component is stored vertically.

Member Function Documentation

◆ init()

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
void vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >::init ( )
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.

◆ transformMatrix() [1/2]

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
TransformMatrixType & vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >::transformMatrix ( )
inline

Returns a reference to the transform matrix.

Returns
A reference to the transform matrix.

◆ transformMatrix() [2/2]

template<typename Scalar , typename ParentElemType = void, bool OPT = false>
const TransformMatrixType & vcl::comp::TransformMatrix< Scalar, ParentElemType, OPT >::transformMatrix ( ) const
inline

Returns a const reference to the transform matrix.

Returns
A const reference to the transform matrix.

The documentation for this class was generated from the following file: