Class to handle operations with rigid motions.
More...
#include <RigidMotionEngine.h>
|
template<typename Archive > |
void | serialize (Archive &ar, const unsigned int version) |
| Serialize a rigid motion engine to a stream of bytes. More...
|
|
|
class | boost::serialization::access |
|
Class to handle operations with rigid motions.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
- See also
- rigidmotion::RigidMotion
◆ apply() [1/2]
arma::mat rigidmotion::RigidMotionEngine::apply |
( |
RigidMotion const & |
f, |
|
|
arma::mat const & |
X |
|
) |
| |
Apply rigid motion \(f\) to a matrix of points \(X\).
Let \(f(X) = C + AX\) be a rigid motion defined for points in \(\mathbb{R}^{n}\). Now let \(X_{n \times m}\) be a matrix with as many rows as the space dimensionality and as many columns as points to be transformed. Thus, the output of this function is a matrix \(Y_{n \times m} = f(X)\) containing all transformed points.
Notice the transposition as column vector \(C\) will be applied to each column of \(AX\).
- Parameters
-
f | The rigid motion to be applied |
X | The matrix of points to be transformed |
- Returns
- Result of applying the rigid motion to the matrix of points
◆ apply() [2/2]
colvec RigidMotionEngine::apply |
( |
RigidMotion const & |
f, |
|
|
colvec const & |
X |
|
) |
| |
Apply rigid motion \(f\) to a point \(X\).
Let \(f(X) = C + AX\) be a rigid motion defined for points in \(\mathbb{R}^{n}\). Now let \(X\) be a column vector representing a point in a \(n\)-dimensional space. Therefore, the output of this function is a column vector \(Y = f(X)\) corresponding to the transformed point.
- Parameters
-
f | The rigid motion to be applied |
X | The point as column vector to be transformed |
- Returns
- Result of applying the rigid motion to the point
◆ compose()
Compose given rigid motions: \(f \circ g = f(g(X))\).
- Parameters
-
f | The rigid motion in second place of composition |
g | The rigid motion in first place of composition |
- Returns
- Composition of given rigid motions \(f \circ g = f(g(X))\)
◆ computeAssociatedInvariant()
mat RigidMotionEngine::computeAssociatedInvariant |
( |
RigidMotion const & |
f, |
|
|
size_t & |
dim, |
|
|
bool |
safe = true |
|
) |
| |
Compute the associated invariant of given rigid motion.
Computing the associated invariant for a given rigid motion means solving \((A-I)^2X+(I-A)C=0\)
- Parameters
-
| f | Rigid motion which associated invariant must be computed |
[out] | dim | Where the dimensionality of associated invariant will be stored. If it is \(0\), then the associated invariant is a point (which should never happen for \(\mathbb{R}^{2}\) and \(\mathbb{R}^{3}\)). If it is \(1\) then the associated invariant is a line, if it is \(2\) then the associated invariant is a plane. Generalizing, dim is the dimensionality of the associated invariant hyperplane. |
| safe | Specify if use safe mode or not. When safe mode is enabled, existence of associated invariant will be checked. Please, disable safe mode only if you are sure the rigid motion has an associated invariant. |
- Returns
- When dimensionality is \(0\), it returns the exact coordinates of the only associated invariant (this should never happen neither in \(\mathbb{R}^{2}\) nor in \(\mathbb{R}^{3}\)). When dimensionality is \(n\) (matches the full space dimensionality), then the matrix containing basis vectors will be returned. When dimensionality is \(0<d<n\) a unitary vector defining the lineal variety will be returned. When the lineal variety is a line, then the normalized director vector of the line will be returned. If the lineal variety is a plane, then the orthonormal vector of the plane will be returned.
◆ computeFixedPoints()
mat RigidMotionEngine::computeFixedPoints |
( |
RigidMotion const & |
f, |
|
|
size_t & |
dim, |
|
|
bool |
safe = true |
|
) |
| |
Compute the set of fixed points of given rigid motion.
Computing the set of fixed points for a given rigid motion means solving \((I-A)X = C\)
- Parameters
-
| f | Rigid motion which set of fixed points must be computed |
[out] | dim | Where the dimensionality of the fixed points variety will be stored. If it is \(0\), then the lineal variety is a point, if it is \(1\) then the lineal variety is a line, if it is \(2\) then the lineal variety is a plane. Generalizing, dim is the dimensionality of the hyperplane of fixed points. |
| safe | Specify if use safe mode or not. When safe mode is enabled, existence of fixed points will be checked. Please, disable safe mode only if you are sure the rigid motion has a set of fixed points. Otherwise, unexpected behaviors might occur. It is enabled by default. |
- Returns
- When dimensionality is \(0\), it returns the exact coordinates of the only fixed point. When dimensionality is \(n\) (matches the full space dimensionality), then the matrix containing basis vectors will be returned. When dimensionality is \(0<d<n\) a unitary vector defining the lineal variety will be returned. When the lineal variety is a line, then the normalized director vector of the line will be returned. If the lineal variety is a plane, then the orthonormal vector of the plane will be returned.
◆ serialize()
template<typename Archive >
void rigidmotion::RigidMotionEngine::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
inlineprivate |
Serialize a rigid motion engine to a stream of bytes.
- Template Parameters
-
- Parameters
-
ar | Specific rendering for the stream of bytes |
version | Version number for the rigid motion engine |
The documentation for this class was generated from the following files: