A generic transformer base class that can be used with different types of actual transformation nodes.
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...
|
|
template<typename Transform , typename Filter > |
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...
|
|
template<typename Transform > |
Transform | getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) |
| same as above, but using NearestNeighborInterpolator as filter. More...
|
|
template<typename Transform , typename Filter > |
Transform | getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) |
| same as above, but with the same time for source and target transform. More...
|
|
template<typename Transform > |
Transform | getTransform (const TransformDesc &desc, const Time &time) |
| same as above, but using NearestNeighborInterpolator as filter. More...
|
|
template<typename Transform , typename Filter > |
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...
|
|
template<typename Transform > |
Transform | getTransform (NodePtr target, NodePtr source, const Time &time) |
| same as above, but using NearestNeighborInterpolator as filter More...
|
|
template<typename Transform , typename Filter > |
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...
|
|
template<typename Transform > |
Transform | getTransform (NodePtr target, const Time &targetTime, NodePtr source, const Time &sourceTime, NodePtr fixed) |
| same as above, but using NearestNeighborInterpolator as filter More...
|
|
template<typename Transform , typename Filter > |
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...
|
|
template<typename Transform > |
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...
|
|
template<typename TNode>
class mira::GenericTransformer< TNode >
A generic transformer base class that can be used with different types of actual transformation nodes.
The used transformation node class must be derived from AbstractTransformerNode. The type of the transformation nodes is passed as template parameter.
Transform inferTransform |
( |
NodePtr |
node, |
|
|
NodePtr |
target, |
|
|
NodePtr |
source, |
|
|
const Transform & |
transform, |
|
|
const Time & |
time, |
|
|
Filter && |
filter |
|
) |
| |
|
inline |
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.