Helios++
Helios software for LiDAR simulations
|
Class which wraps the RigidMotion class to implement extra features such as the self mode control mechanism and computation of normal counterparts. More...
#include <DynMotion.h>
Public Member Functions | |
DynMotion (RigidMotion const &rm, bool selfMode=false) | |
Dynamic motion construction from a rigid motion as basis. More... | |
DynMotion (colvec const &C, arma::mat const &A) | |
Dynamic motion construction from given translation column vector and fixed origin transformation matrix. More... | |
virtual bool | checkModifiesNormal () const |
Check whether dynamic motion modifies normals when applied (true) or not (false). More... | |
virtual DynMotion | makeNormalCounterpart () const |
Make the normal counterpart for the dynamic motion. More... | |
virtual shared_ptr< DynMotion > | makeNormalCounterpartPtr () const |
Like makeNormalCounterpart method but returning a shared pointer instead of the raw object. More... | |
bool | isSelfMode () const |
Check if self mode is enabled for the dynamic motion (true) or not (false) More... | |
void | setSelfMode (bool const selfMode) |
Enable or disable self mode. More... | |
bool | isNormalMode () const |
Check if normal mode is enabled for the dynamic motion (true) or not (false) More... | |
void | setNormalMode (bool const normalMode) |
Enable or disable normal mode. More... | |
![]() | |
RigidMotion ()=default | |
RigidMotion default constructor. Notice rigid motions should be instantiated through corresponding factories. More... | |
RigidMotion (colvec const &C, arma::mat const &A) | |
Build a rigid motion with given translation vector and fixed origin transformation matrix. More... | |
virtual RigidMotion | compose (RigidMotion const rm) const |
Compose this rigid motion \(f\) with given rigid motion \(g\) so \(f \circ g = f(g(x))\) is obtained. More... | |
virtual void | composeInPlace (RigidMotion const rm) |
Like compose method but updating this rigid motion instead of returning a new one. More... | |
virtual SuperType | findSuperType () const |
Obtain the supertype of the rigid motion. More... | |
virtual bool | hasFixedPoints () const |
Check if rigid motion has fixed points. More... | |
virtual Type | findType () const |
Obtain the type of the rigid motion. More... | |
virtual size_t | findInvariantDimensionality () const |
Obtain the dimensionality of the associated invariant which can be either the set of fixed points or the associated invariant variety if there are no fixed points. More... | |
colvec | getC () const |
Get the translation column vector. More... | |
void | setC (colvec const C) |
Set the translation column vector. More... | |
arma::mat | getA () const |
Get the fixed origin transformation matrix. More... | |
void | setA (arma::mat const A) |
Set the fixed origin transformation matrix. More... | |
size_t | getDimensionality () const |
Get the dimensionality of the rigid motion. More... | |
Protected Attributes | |
bool | selfMode = false |
Specify if the self mode is enabled for this dynamic motion (true) or not (false). More... | |
bool | normalMode = false |
Specify if the normal mode is enabled for thid dynamic motion (true) or not (false). More... | |
![]() | |
colvec | C |
The column vector representing the translation. | |
arma::mat | A |
The matrix representing the fixed origin transformation. | |
Private Member Functions | |
template<typename Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Serialize a dynamic motion to a stream of bytes. More... | |
Friends | |
class | boost::serialization::access |
Additional Inherited Members | |
![]() | |
enum | SuperType { R2_BASE , R2_REFLECTION , R2_ROTATION , R3_BASE , R3_REFLECTION , R3_ROTATION , R3_ROTATIONAL_SYMMETRY } |
Rigid motions supertypes. It is, the classification of a rigid motion attending to its fixed origin transformation matrix \(A\) only. More... | |
enum | Type { IDENTITY_R2 , TRANSLATION_R2 , REFLECTION_R2 , GLIDE_REFLECTION_R2 , ROTATION_R2 , IDENTITY_R3 , TRANSLATION_R3 , REFLECTION_R3 , GLIDE_REFLECTION_R3 , ROTATION_R3 , HELICAL_R3 , ROTATIONAL_SYMMETRY_R3 } |
Rigid motions types. It is, the classification of a rigid motion attending to its associated isometry and fixed points. More... | |
Class which wraps the RigidMotion class to implement extra features such as the self mode control mechanism and computation of normal counterparts.
|
inline |
Dynamic motion construction from a rigid motion as basis.
rm | Rigid motion as basis for the dynamic motion |
selfMode | Specify the initial value for self mode |
|
inline |
Dynamic motion construction from given translation column vector and fixed origin transformation matrix.
C | Column vector representing the translation |
A | Matrix representing the fixed origin transformation |
|
virtual |
Check whether dynamic motion modifies normals when applied (true) or not (false).
|
inline |
Check if normal mode is enabled for the dynamic motion (true) or not (false)
|
inline |
Check if self mode is enabled for the dynamic motion (true) or not (false)
|
virtual |
Make the normal counterpart for the dynamic motion.
It is, a version which preserves the fixed origin transformation but that does not change the position. It is mean to be used mainly to transform normals which must not change its position since they are normal unitary vectors defining direction only. Thus, when applying for instance a helical motion, the position of the dynamic object should be fully transformed but its normals must only be rotated with no transposition. Applying the normal counterpart of the helical motion with object normals guarantees this.
More formally, let \(f(X)\) be the affine application defining the base rigid motion at the core of the dynamic motion:
\[ f(X) = C + AX \]
Its normal counterpart namely \(g(X)\) would be:
\[ g(X) = \vec{0} + AX \]
Also, dynamic motions which are normal counterparts have normal mode enabled by default and self mode inherited from source dynamic motion.
|
inlinevirtual |
Like makeNormalCounterpart method but returning a shared pointer instead of the raw object.
|
inlineprivate |
Serialize a dynamic motion to a stream of bytes.
Archive | Type of rendering |
ar | Specific rendering for the stream of bytes |
version | Version number for the dynamic motion |
|
inline |
Enable or disable normal mode.
normalMode | True to enable normal mode, false to disable it |
|
inline |
Enable or disable self mode.
selfMode | True to enable self mode, false to disable it |
|
protected |
Specify if the normal mode is enabled for thid dynamic motion (true) or not (false).
The normal mode specifies that a dynamic motion is mean to be applied to normals and not points. Generally speaking, enabling normal mode implies ignoring self mode for most cases, even if it is enabled.
|
protected |
Specify if the self mode is enabled for this dynamic motion (true) or not (false).
The self mode flag specifies that a dynamic motion should be applied to an object centered in the origin