|
Couch
|
#include <Node.h>

Public Member Functions | |
| Node (bool isPrefab) | |
| virtual Name | GetType () const |
| bool | IsPrefab () |
| NodeList | GetChildren () |
| void | AddChild (Node *child) |
| Node * | GetParent () |
| void | QueueFree () |
| void | DoFree () |
| virtual Node * | Create () |
| virtual Node * | Duplicate () |
| virtual Node * | Instance () |
Static Public Member Functions | |
| static Node * | GetRoot () |
Friends | |
| class | NodeList |
The parent class for any object that will go into the scene tree
| void Node::AddChild | ( | Node * | child | ) |
Adds a node to this nodes list of children
| child | The node to add |
|
virtual |
Allocates a new "default" version of this node.
Reimplemented in Spatial, Skybox, Rigidbody, Mesh, PointLight, DirectionalLight, and Light.
| void Node::DoFree | ( | ) |
Actually frees the memory Should only be called from root
|
virtual |
Copies the properties of this node to a newly allocated node, created via Create. Subclasses should override this to copy additional class attributes
Reimplemented in Spatial, Skybox, Rigidbody, Mesh, PointLight, DirectionalLight, and Light.
| NodeList Node::GetChildren | ( | ) |
Returns the children of this node
| Node * Node::GetParent | ( | ) |
|
static |
Gets the root of the game scene tree
|
virtual |
Creates an instanced version of this node, by calling Duplicate. Subclasses should override this to perform neccesary tasks for instantiation, i.e. adding a physic object to the physics world. Any children of this node will also be instanced.
Reimplemented in Spatial, Skybox, Rigidbody, Mesh, PointLight, DirectionalLight, and Light.
| bool Node::IsPrefab | ( | ) |
Whether or not this object is a prefab, that is, if it is an object being set up to be instanced one or more times. The alternative to being a prefab is being instanced, in which case it will be drawn, added to the physics system, etc.
| void Node::QueueFree | ( | ) |
Remove this node and it's children from the tree and queue their memory for freeing