Transformations define the relation between frames.
If a transformation is added, the inverse will be added automatically. If one or both of the frames are not part of the graph, they will be added.
The inverse will be removed as well.
Transformations can be replaced using updateTransform
.
The inverse will be updated automatically.
getTransform()
can be used to calculate the transformation between two
frames if a path connecting the two exists in the graph. Breadth first search is
used to find the path connecting the two frames. I.e. getTransform()
Calculating the transformation between two frames might be expensive depending
on the complexity of the graph structure. A TreeView
can be used to speed
up the calculation:
Since creating the TreeView
walks the whole graph once, using this methods
only makes sense when multiple transformations need to be calculated.
If you need to calculate the same transformation multiple times, you can
use getPath()
to retrieve a list of all frames that need to be traversed
to calculate the transformation. The path can be used to speed up the calculation
of the transform even further.
disconnectFrame()
can be used to remove all transformations coming from
or leading to a certain frame.