MIRA
|
A full features transformer class based on GenericTransformer. More...
#include <transform/Transformer.h>
Public Types | |
typedef TransformerNode< TTransform< T, D > > | Node |
the node type, which is a TransformerNode More... | |
typedef Node * | NodePtr |
pointer type to that node More... | |
typedef TransformerBase::AbstractNodePtr | AbstractNodePtr |
The type of a pointer to the AbstractTransformerNode base class. More... | |
Public Member Functions | |
NodePtr | newNode (const std::string &nodeID) |
Creates and adds a new node with the specified id to this transformer. More... | |
TransformDesc | prepareTransform (NodePtr target, NodePtr source) |
Prepares the computation of a transformation by computing the path between the target and source node. More... | |
TransformDesc | prepareTransform (NodePtr target, NodePtr source, NodePtr fixed) |
Prepares the computation of a transformation by computing the path between the 'target' and 'source' node via the 'fixed' node, i.e. More... | |
Transform | getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) |
Computes and returns a certain transformation that is specified via the TransformDesc. More... | |
Transform | getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) |
same as above, but using NearestNeighborInterpolator as filter. More... | |
Transform | getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) |
same as above, but with the same time for source and target transform. More... | |
Transform | getTransform (const TransformDesc &desc, const Time &time) |
same as above, but using NearestNeighborInterpolator as filter. More... | |
Transform | getTransform (NodePtr target, NodePtr source, const Time &time, Filter &&filter) |
Computes and returns a certain transformation between the specified target and source node. More... | |
Transform | getTransform (NodePtr target, NodePtr source, const Time &time) |
same as above, but using NearestNeighborInterpolator as filter More... | |
Transform | getTransform (NodePtr target, const Time &targetTime, NodePtr source, const Time &sourceTime, NodePtr fixed, Filter &&filter) |
Computes and returns a certain transformation between the specified target and source node via the 'fixed' node, i.e. More... | |
Transform | getTransform (NodePtr target, const Time &targetTime, NodePtr source, const Time &sourceTime, NodePtr fixed) |
same as above, but using NearestNeighborInterpolator as filter More... | |
Transform | inferTransform (NodePtr node, NodePtr target, NodePtr source, const Transform &transform, const Time &time, Filter &&filter) |
Infers a transform by specifying a direct transform between two nodes, which are connected indirectly over the transformation, that shall be infered. More... | |
Transform | inferTransform (NodePtr node, NodePtr target, NodePtr source, const Transform &transform, const Time &time) |
same as above, but using NearestNeighborInterpolator as filter More... | |
NodePtr | getNode (const std::string &nodeID) |
Returns a pointer to the node with the given ID or nullptr if it does not exist. More... | |
bool | addLink (AbstractNodePtr child, AbstractNodePtr parent) |
Adds a link between the specified child and its parent. More... | |
void | removeLink (AbstractNodePtr child, AbstractNodePtr parent) |
Removes an existing link between the specified child node and the given parent node. More... | |
std::list< AbstractNodePtr > | getNodes () |
Returns all nodes that are known by this transformer. More... | |
std::list< std::pair< AbstractNodePtr, AbstractNodePtr > > | getLinks () |
Returns all links (as parent,child-pairs) that are known by this transformer. More... | |
const std::list< AbstractNodePtr > | getRootNodes () |
Returns a list of all nodes, that have no ancestor, e.g. More... | |
void | getTransformChain (AbstractNodePtr target, AbstractNodePtr source, Chain &oChain) |
bool | isTransformAvailable (AbstractNodePtr target, AbstractNodePtr source) |
Checks if a transformation between 'target' and 'source' node is available: More... | |
Static Public Attributes | |
static const int | MAX_TREE_DEPTH = 1000 |
The max. More... | |
Protected Types | |
typedef std::map< std::string, AbstractNodePtr > | IDToNodeMap |
Protected Member Functions | |
Transform | getTransform (const Chain &chain, const Time &time, Filter &&filter) |
Computes the resulting transform by applying all transforms according to the specified transform chain. More... | |
void | addNode (AbstractNodePtr node) |
An exception that is thrown when errors related to transformations occur. More... | |
Static Protected Member Functions | |
static NodePtr | castNode (AbstractNodePtr node) |
Casts an abstract node pointer to the actual used Node. This is safe. More... | |
Protected Attributes | |
IDToNodeMap | mNodes |
maps from ids to nodes that were added to us More... | |
boost::mutex | mMutex |
protects the above node map More... | |
A full features transformer class based on GenericTransformer.
This implementation uses instances of TransformerNode as nodes. These nodes have their own data storage for storing the transformation data over time. Hence, this Transformer class can be used separate from the global and central application wide transform framework to generate "private" transform trees and computations.
typedef TransformerNode<TTransform<T, D> > Node |
the node type, which is a TransformerNode
|
inherited |
The type of a pointer to the AbstractTransformerNode base class.
|
protectedinherited |
|
inline |
Creates and adds a new node with the specified id to this transformer.
|
inlineinherited |
Prepares the computation of a transformation by computing the path between the target and source node.
The returned TransformDesc can be used in a call to the getTransform() method.
|
inlineinherited |
Prepares the computation of a transformation by computing the path between the 'target' and 'source' node via the 'fixed' node, i.e.
target->fixed->source. The returned TransformDesc can be used in a call to the getTransform() method.
|
inlineinherited |
Computes and returns a certain transformation that is specified via the TransformDesc.
Moreover, the timestamps of the transformations is taken into account, therefore the timestamps of the target and source transforms must be specified. Additionally, a filter can be specified that can be used to interpolate or filter the transforms according to the specified timestamps.
|
inlineinherited |
same as above, but using NearestNeighborInterpolator as filter.
|
inlineinherited |
same as above, but with the same time for source and target transform.
|
inlineinherited |
same as above, but using NearestNeighborInterpolator as filter.
|
inlineinherited |
Computes and returns a certain transformation between the specified target and source node.
Moreover, the timestamps of the transformations is taken into account. Additionally, a filter can be specified that can be used to interpolate or filter the transforms according to the specified timestamps.
same as above, but using NearestNeighborInterpolator as filter
|
inlineinherited |
Computes and returns a certain transformation between the specified target and source node via the 'fixed' node, i.e.
target->fixed->source. Moreover, the timestamps of the transformations is taken into account, therefore the timestamps of the target and source transforms must be specified. Additionally, a filter can be specified that can be used to interpolate or filter the transforms according to the specified timestamps.
|
inlineinherited |
same as above, but using NearestNeighborInterpolator as filter
|
inlineprotectedinherited |
Computes the resulting transform by applying all transforms according to the specified transform chain.
|
inlineinherited |
Infers a transform by specifying a direct transform between two nodes, which are connected indirectly over the transformation, that shall be infered.
Imagine the following example, were the transformation node 'p' is directly connected to the transformation node 'node'. Additionally, both nodes are connected via certain paths with the nodes 'source' and 'target', respectively:
p ---- x ---- source | | | v node --- y --- target
Now imagine, you want to compute the transformation between 'p' and 'node', but all you know is the direct transformation between the nodes 'source' and 'target' which are however not directly connected:
p ---- x ---- source | . | ??? . this 'transform' | . is known v v node --- y --- target
In this case you can use this method. It computes and returns the desired transform on the link towards 'node' given the 'transform' between the nodes 'target' and 'source' at the specified 'time' and using the specified 'filter' for interpolation.
|
inlineinherited |
same as above, but using NearestNeighborInterpolator as filter
|
inlineinherited |
Returns a pointer to the node with the given ID or nullptr if it does not exist.
|
inlinestaticprotectedinherited |
Casts an abstract node pointer to the actual used Node. This is safe.
|
inherited |
Adds a link between the specified child and its parent.
Both nodes must have been added to this Transformer. If both nodes are connected to each other already this method has no effect. If the child was connected to another parent before it is unlinked from its current parent first and then linked to the new one. Returns true, if the link was new. If the link was already known, false is returned.
|
inherited |
Removes an existing link between the specified child node and the given parent node.
If both nodes are not connected, this method does nothing.
|
inherited |
Returns all nodes that are known by this transformer.
|
inherited |
Returns all links (as parent,child-pairs) that are known by this transformer.
|
inherited |
Returns a list of all nodes, that have no ancestor, e.g.
that are root nodes of a transform tree.
|
inherited |
Throws | XTransform, if source and target are not connected or if there is a loop in the transform tree. |
|
inherited |
Checks if a transformation between 'target' and 'source' node is available:
|
protectedinherited |
An exception that is thrown when errors related to transformations occur.
Adds the specified node to the internal node map
|
staticinherited |
The max.
allowed number of levels within a transformation tree. It is used by collectNodesUpwardsToRoot() that is applied to find the "lowest common ancestor" in getTransformChain() to detect loops within the transformation tree.
|
protectedinherited |
maps from ids to nodes that were added to us
|
protectedinherited |
protects the above node map