#include <scenenode.h>
Public Member Functions | |
SceneNode (const char *id) | |
virtual | ~SceneNode () |
virtual bool | LoadResources () |
virtual void | UnloadResources () |
bool | PreloadResources () |
bool | IsResourcesValid () |
virtual void | Render () |
virtual void | CreateAnimators () |
Protected Attributes | |
bool | resources_valid |
SceneNode::SceneNode | ( | const char * | id | ) |
Constructor.
SceneNode::~SceneNode | ( | ) | [virtual] |
Destructor.
bool SceneNode::LoadResources | ( | ) | [virtual] |
This method makes sure that all resources needed by this object are loaded. The method does NOT recurse into its children.
Subclasses should expect that the LoadResources() method can be called on them although some or all of their resources are valid. Thus, a check should exist, whether the resource really needs to be reloaded.
True
, if resource loading was successful. Reimplemented in ShapeNode.
void SceneNode::UnloadResources | ( | ) | [virtual] |
This method makes sure that all resources used by this object are unloaded. The method does NOT recurse into its children.
If you ovverride this method, be sure to call the overridden version in your destructor.
Reimplemented in ShapeNode.
bool SceneNode::PreloadResources | ( | ) |
Recursively preloads required resources. Call this method after loading or creation and before the first rendering. It will load all required resources (textures, meshes, animations, ...) from disk and thus prevent stuttering during rendering.
True
, if all resources have been loaded. bool SceneNode::IsResourcesValid | ( | ) | [inline] |
void SceneNode::Render | ( | ) | [virtual] |
Performs per-instance rendering of geometry. This method will be called once for each instance of the node.
Reimplemented in ShapeNode, and TransformNode.
void SceneNode::CreateAnimators | ( | ) | [virtual] |
Creates per-instance animators.
Reimplemented in ShapeNode.
bool SceneNode::resources_valid [protected] |