CrystalSpace

Public API Reference

CS::RenderManager::RenderTree< TreeTraits > Class Template Reference

RenderTree is the main data-structure for the rendermanagers. More...

#include <csplugincommon/rendermanager/rendertree.h>

Inheritance diagram for CS::RenderManager::RenderTree< TreeTraits >:

List of all members.

Classes

struct  ContextNode
 A single context node, Groups meshes which should be rendered from the same view to the same target. More...
struct  MeshNode
 A mesh node is a single list of meshes that can be rendered in one go without any explicit order considerations. More...
struct  PersistentData
 Data used by the render tree that needs to persist over multiple frames. More...

Public Member Functions

ContextNodeCloneContext (ContextNode *context)
 Clone a context.
ContextNodeCreateContext (RenderView *rw, ContextNode *insertAfter=0)
 Create a new context.
MeshNodeCreateMeshNode (ContextNode &context, const typename TreeTraitsType::MeshNodeKeyType &key)
 Create a new mesh node associated with the given context.
void DestroyContext (ContextNode *context)
 Destroy a context and return it to the allocation pool.
void DestroyMeshNode (MeshNode *meshNode)
 Destroy given mesh node.
ContextNodeArrayIteratorType GetContextIterator ()
 Get an iterator for iterating forward over the contexts.
ContextNodeArrayReverseIteratorType GetReverseContextIterator ()
 Get an iterator for iterating backward over the contexts.
bool IsDebugClearEnabled () const
 Debugging helper: whether debug screen clearing is enabled.

Detailed Description

template<typename TreeTraits = RenderTreeStandardTraits>
class CS::RenderManager::RenderTree< TreeTraits >

RenderTree is the main data-structure for the rendermanagers.

It contains the entire setup of meshes and where to render those meshes, as well as basic operations regarding those meshes.

The TreeTraits template argument specifies additional data stored with meshes, contexts and others in the tree. See the subclasses in RenderTreeStandardTraits for a list of what can be customized. To provide custom traits, create a class and either provide a new, custom type for a trait or typedef in the respective type from RenderTreeStandardTraits.

Definition at line 220 of file rendertree.h.


Member Function Documentation

template<typename TreeTraits = RenderTreeStandardTraits>
ContextNode* CS::RenderManager::RenderTree< TreeTraits >::CloneContext ( ContextNode context  )  [inline]

Clone a context.

The new context is added before the context to be cloned.

Definition at line 626 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
ContextNode* CS::RenderManager::RenderTree< TreeTraits >::CreateContext ( RenderView rw,
ContextNode insertAfter = 0 
) [inline]

Create a new context.

Parameters:
rw Render view to associate the new context with. Should be initalized before calling method.
insertAfter Context to insert this one after. Must be a valid context in current render tree.

Definition at line 588 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
MeshNode* CS::RenderManager::RenderTree< TreeTraits >::CreateMeshNode ( ContextNode context,
const typename TreeTraitsType::MeshNodeKeyType &  key 
) [inline]

Create a new mesh node associated with the given context.

Definition at line 668 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
void CS::RenderManager::RenderTree< TreeTraits >::DestroyContext ( ContextNode context  )  [inline]

Destroy a context and return it to the allocation pool.

Definition at line 614 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
void CS::RenderManager::RenderTree< TreeTraits >::DestroyMeshNode ( MeshNode meshNode  )  [inline]

Destroy given mesh node.

Definition at line 681 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
ContextNodeArrayIteratorType CS::RenderManager::RenderTree< TreeTraits >::GetContextIterator (  )  [inline]

Get an iterator for iterating forward over the contexts.

Definition at line 652 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
ContextNodeArrayReverseIteratorType CS::RenderManager::RenderTree< TreeTraits >::GetReverseContextIterator (  )  [inline]

Get an iterator for iterating backward over the contexts.

Definition at line 660 of file rendertree.h.

template<typename TreeTraits = RenderTreeStandardTraits>
bool CS::RenderManager::RenderTree< TreeTraits >::IsDebugClearEnabled (  )  const [inline]

Debugging helper: whether debug screen clearing is enabled.

Definition at line 689 of file rendertree.h.


The documentation for this class was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.6.1