Public Member Functions |
| FrameTreeNode (Frame frame) |
| Create a new FrameTreeNode with null parent and assigned frame.
|
| FrameTreeNode (String frameName) |
| Create a new FrameTreeNode with null parent and a new Frame with name frameName.
|
| FrameTreeNode (String frameName, Matrix4d xfm) |
| Create a new FrameTreeNode with null parent and a new Frame with name frameName.
|
FrameTreeNode | set (FrameTreeNode toCopy) |
| Set the Frame data to toCopy Only payload data is copied, not children or parent.
|
FrameTreeNode | clone (FrameTreeNode parent) |
| Clone node and its offsprings.
|
Frame | getData () |
| for compatibility with c++ api
|
Frame | getFrame () |
FrameTreeNode | attachChild (FrameTreeNode node) |
| Attach a child node.
|
FrameTreeNode | mergeChild (FrameTreeNode node) |
| Merge a child.
|
FrameTreeNode | findChild (String name) |
| Find a child with matching name.
|
boolean | removeChild (FrameTreeNode node) |
| Remove node from list of children and set it's parent to null.
|
void | detachFromParent () |
void | setParent (FrameTreeNode newParent) |
| Set the parent of the node.
|
FrameTreeNode | getParent () |
boolean | isRoot () |
boolean | isLeaf () |
FrameTreeNode | getRoot () |
| Search upward in tree to find root.
|
boolean | isAncestorOf (FrameTreeNode node) |
List< FrameTreeNode > | getAncestry () |
| Get an ordered list of ancestors which begins at root and ends at (and includes) this node.
|
List< FrameTreeNode > | getAncestry (List< FrameTreeNode > store) |
FrameTreeNode | getLastCommonAncestor (FrameTreeNode that) |
| Calculate the last common ancestor.
|
FrameTreeNode | getLastCommonAncestor (FrameTreeNode that, List< FrameTreeNode > thisAncestors, List< FrameTreeNode > thatAncestors) |
List< FrameTreeNode > | getChildren () |
List< FrameTreeNode > | getChildren (boolean sortByName) |
int | getNumChildren () |
| get the number of direct decendants of this node
|
int | getNumOffspring () |
| Recursively count number of nodes underneath this node.
|
boolean | traverseBreadthFirst (IFrameVisitor visitor) |
| Breadth first traversal.
|
boolean | traversePreOrder (IFrameVisitor visitor) |
| Depth first, pre-order traversal.
|
boolean | traversePreOrder (IFrameVisitor visitor, boolean sortByName) |
boolean | traversePostOrder (IFrameVisitor visitor) |
| Depth first, post-order traversal.
|
boolean | equals (Object o) |
| If the contained Frame name matches this one, return equal.
|
Protected Member Functions |
| FrameTreeNode (FrameTreeNode parent, String frameName) |
| Create a new node with the given name and assigned it a parent.
|
| FrameTreeNode (FrameTreeNode parent, String frameName, Matrix4d xfm) |
| Create a new node with the given name, parent and transform.
|
Protected Attributes |
Frame | m_data |
FrameTreeNode | m_parent |
final ArrayList< FrameTreeNode > | m_children = new ArrayList<FrameTreeNode>() |
* Frame names do not contain the character '/'. * Frames are not named ".", "..", nor "...". * The transform has an invertible matrix.
These requirements are not checked explicitly in the FrameTreeNode interface. Only the FrameStore interface explicitly checks these requirements and flags errors if frames are added to the frame-store, that do not meet these assumptions.