#include <Node.hpp>
Inheritance diagram for OSCAR::Node:

Public Methods | |
| Node (const Xform &local=Xform(), const String &name=String(), OSCARError &err=DUMMY_ERROR(noError)) | |
| Node (const Node &rhs) | |
| Node & | operator= (const Node &rhs) |
| virtual | ~Node () |
| Node * | GetParent () const |
| const NodeList & | GetChildren () const |
| NodeList & | GetChildren () |
| const PrimitiveList & | GetPrimitives () const |
| PrimitiveList & | GetPrimitives () |
| bool | Add (Node *node) |
| bool | Remove (Node *node) |
| bool | Add (const Primitive *primitive) |
| bool | Remove (Primitive *primitive) |
| bool | Move (Node *from, Node *node) |
| bool | Move (Node &from, Primitive *primitive) |
| const Xform & | GetLocalXform () const |
| Xform | GetLocalXform () |
| const Xform & | GetGlobalXform () const |
| Xform | GetGlobalXform () |
| bool | IsRoot () const |
| unsigned int | NumChildren (bool thisNodeOnly=false) const |
| unsigned int | NumPrimitives (bool thisNodeOnly=false) const |
| bool | Update (const Xform &transform) |
Protected Methods | |
| bool | deallocate () |
| bool | update () |
Protected Attributes | |
| Xform | toParent |
| Xform | toGlobal |
| Node * | parent |
| NodeList | children |
| PrimitiveList | primitives |
|
||||||||||||||||
|
Contructor. Construct a node from the Xform that gives the nodes local transformation from its parent node, w.r.t. the parents local frame. The constructed node, if not meant to be a root node, should then be added to its parent by the Add method called from the parent node.
|
|
|
Copy Constructor. This will copy all the contents (including all the child nodes and primitives) of rhs to the newly-constructed (or this) node. The parent of this node will be the same as the parent of rhs but this node will NOT be added the parent's children node list. The user must explicitly add this node to a parent node and may also have to change the name of this node by calling SetName() because the ModelingObjectMap requires that each node has a unique name.
|
|
|
Destructor.
|
|
|
Add a primitive to this node. This adds a primitive to the end of the primitive list contained within this Node. This function will COPY the primitive and add the copy to this node. Also, the primitive will be updated using the global transformation of this node.
|
|
|
Add a child node to this node. This adds a node to the end of the node list contained within this Node. It does this by swapping the contents of the argument into the calling object. This basically renders the node and primitive lists inside the argument object as empty lists. Also, the newly-added node will be updated using the global transformation of this node.
|
|
|
|
|
|
Get all the child nodes. CAUTION: This method may be removed later when a procedure of accessing specific nodes using maps is implemented.
|
|
|
Get const reference to all the children.
|
|
|
Get the global transformation matrix for this node. The global transformation matrix is a transformation of this node relative to the world frame.
|
|
|
Get the global transformation matrix for this node. The global transformation matrix is a transformation of this node relative to the world frame.
|
|
|
Get the local transformation matrix for this node. The local transformation matrix is a transformation of this node relative to its parent. The transformation is w.r.t. the local frame of the parent node.
|
|
|
Get the local transformation matrix for this node. The local transformation matrix is a transformation of this node relative to its parent. The transformation is w.r.t. the local frame of the parent node.
|
|
|
Get the parent node.
|
|
|
Get all the primitives. CAUTION: This method may be removed later when a procedure of accessing specific primitives using maps is implemented.
|
|
|
Get const reference to all the primitives.
|
|
|
Return whether or not this node is a root node.
|
|
||||||||||||
|
Move a primitive from another node to this node. This will move the argument primitive without any copying. The moved node will point to the same address as before. However, the primitive will be updated using the global transformation of this node.
|
|
||||||||||||
|
Move a child node from another node to this node. This will move the argument node without any copying. The moved node will point to the same address as before. However, its child nodes and primitives will be updated using the global transformation of this node.
|
|
|
The number of child nodes under this node.
|
|
|
The number of primitives under this node.
|
|
|
Assignement operator. This will copy all the contents (including all the child nodes and primitives) of rhs to this node. The parent of this node will be the same as the parent of rhs but this node will NOT be added the parent's children node list. The user must explicitly add this node to a parent node and may also have to change the name of this node by calling SetName() because the ModelingObjectMap requires that each node has a unique name.
|
|
|
Remove a primitive from this node. IMPORTANT: Use with caution. Remove will destroy the primitive in the argument. Do not use Remove and Add methods to move primitive. Use Move method instead.
|
|
|
Remove a child node from this node. IMPORTANT: Use with caution. Remove will destroy the node in the argument. Do not use Remove and Add methods to move node. Use Move method instead.
|
|
|
Update the global transformation of this node, its child nodes, and its primitives.
|
|
|
Update the locations of all the child nodes and primitives.
Reimplemented from OSCAR::ModelingObject. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |