SharedRuns Class Reference

Base abstract class for a collection of shared resources (RenderingRuns). More...

Inheritance diagram for SharedRuns:

OgreSharedRuns List of all members.

Public Member Functions

 SharedRuns (void)
virtual RenderingRungetRun (RenderingRunType runType)=0
virtual void addRun (RenderingRunType runType, RenderingRun *run)=0
virtual void updateRun (RenderingRunType runType, unsigned long frameNum)=0
virtual SharedRunsjoinRuns (SharedRuns *otherRuns)
virtual void runChanged (RenderingRunType runType, RenderingRun *run)
 Called after one of he shared runs changes.
virtual void runUpdated (RenderingRunType runType, RenderingRun *run)
 Called after one of he shared runs updates.
void setTechniqueGroup (TechniqueGroup *group)
 Sets child TechniqueGroup.
virtual void setVisible (bool visible)
 Shows or hides this SharedRuns (and also all childnodes).
virtual void hide ()
 Hides this SharedRuns (and also all childs).
virtual void restoreVisibility ()
 Restores the visibility of this SharedRuns (and also all childs).
virtual SharedRunsgetRoot ()
 Retrieves the root node of this SharedRuns node.
virtual SharedRunsgetRoot (RenderingRunType runType)
 Retrieves the topmost parent node of this SharedRuns node, which have a specified RenderingRun type.
virtual void updateBounds ()=0
 Updates the boundary of this SharedRuns (and also it's parent).
virtual void validate ()=0
 Validate this SharedRuns (and also all childs).
virtual void destroy ()=0
 Destroys the node (and all parents recursively).
virtual void unbindParent ()
 Unbinds the parent of the node, called at splitting.
virtual void unbindAndKillParent ()
 Unbinds the deletes the parent of the node, called at splitting.

Protected Member Functions

virtual void gatherRuns ()=0
 Collects RenderingRuns references from the child nodes, used when joining.
virtual void fireRunChanges ()=0
 Sends runChanged events for each RenderingRun type, used after join and split.
virtual SharedRunscreateInstance ()=0
 Creates a new SharedRuns instance. All derivatives should implement this.
virtual void setRenderablesVisible (bool visible)=0
 Set visibility of connected renderables, only used if this is a leaf.
virtual void hideRenderables ()=0
 Hides all the connected renderables, only used if this is a leaf.
virtual void restoreRenderableVisibility ()=0
 Restires visibility of all the connected renderables, only used if this is a leaf.

Protected Attributes

SharedRunsparent
 parent SharedRuns instance
SharedRunschild1
 child SharedRuns instance
SharedRunschild2
 child SharedRuns instance
TechniqueGroupchildTechniques
 child TechniqueGroup instance.

Detailed Description

Base abstract class for a collection of shared resources (RenderingRuns).

Technique resources which can be shared between several techniques or objects are managed by SharedRuns. These SharedRuns store the shared resources. They also act like nodes of a binary tree, as separate SharedRuns can also be joined if for example the objects for witch they store resources are close enough so even one shared resources is enough for the given objects.


Constructor & Destructor Documentation

SharedRuns::SharedRuns void   ) 
 

&brief Constructor.


Member Function Documentation

virtual void SharedRuns::addRun RenderingRunType  runType,
RenderingRun run
[pure virtual]
 

&brief Adds a RenderingRun instance to the shared resources.

Parameters:
runType enum, type of the RenderingRun to add
run pointer to the RenderingRun instance to add

Implemented in OgreSharedRuns.

virtual SharedRuns* SharedRuns::createInstance  )  [protected, pure virtual]
 

Creates a new SharedRuns instance. All derivatives should implement this.

Returns:
a new SharedRuns instance

Implemented in OgreSharedRuns.

SharedRuns * SharedRuns::getRoot RenderingRunType  runType  )  [virtual]
 

Retrieves the topmost parent node of this SharedRuns node, which have a specified RenderingRun type.

Parameters:
runType the RenderingRun type
Returns:
pointer to the parent SharedRuns instance

SharedRuns * SharedRuns::getRoot  )  [virtual]
 

Retrieves the root node of this SharedRuns node.

Returns:
pointer to the root SharedRuns instance

virtual RenderingRun* SharedRuns::getRun RenderingRunType  runType  )  [pure virtual]
 

&brief Retrieves a shared resource.

Parameters:
runType enum, type of the RenderingRun to be retrieved
Returns:
pointer to the RenderingRun of type "runType", null if this type does not exists

Implemented in OgreSharedRuns.

void SharedRuns::hide  )  [virtual]
 

Hides this SharedRuns (and also all childs).

The previous visibility is saved.

SharedRuns * SharedRuns::joinRuns SharedRuns otherRuns  )  [virtual]
 

&brief Joines two SharedRuns.

The resulting SharedRuns become the parent of the two SharedRuns.

Parameters:
otherRuns pointer to the SharedRuns instance to join with
Returns:
the new parent SharedRuns instance

void SharedRuns::runChanged RenderingRunType  runType,
RenderingRun run
[virtual]
 

Called after one of he shared runs changes.

This message will be forwarded to each child.

Parameters:
runType enum describing the type of the changed run
run pointer to the changed RenderingRun

void SharedRuns::runUpdated RenderingRunType  runType,
RenderingRun run
[virtual]
 

Called after one of he shared runs updates.

This message will be forwarded to each child.

Parameters:
runType enum describing the type of the updated run
run pointer to the updated RenderingRun

virtual void SharedRuns::setRenderablesVisible bool  visible  )  [protected, pure virtual]
 

Set visibility of connected renderables, only used if this is a leaf.

Parameters:
visible visibility

Implemented in OgreSharedRuns.

void SharedRuns::setTechniqueGroup TechniqueGroup group  )  [inline]
 

Sets child TechniqueGroup.

Parameters:
group pointer to the TechniqueGroup instance to add.

void SharedRuns::setVisible bool  visible  )  [virtual]
 

Shows or hides this SharedRuns (and also all childnodes).

Parameters:
visible visibility

virtual void SharedRuns::updateRun RenderingRunType  runType,
unsigned long  frameNum
[pure virtual]
 

&brief Updates a shared RenderingRun.

Parameters:
runType enum, type of the RenderingRun to update
frameNum current framenumber

Implemented in OgreSharedRuns.

virtual void SharedRuns::validate  )  [pure virtual]
 

Validate this SharedRuns (and also all childs).

Validation meens that all the SharedRuns that are joined will be examined if the sharing is still valid. If it finds out that two SharedRuns can't be joined anymore (eg.: they moved far from each other), their parent will be split and destroyed (all parent of this node also should be deleted recursively).

Implemented in OgreSharedRuns.


Member Data Documentation

TechniqueGroup* SharedRuns::childTechniques [protected]
 

child TechniqueGroup instance.

If this SharedRuns node is a leaf, it containes a reference to a TechniqueGroup instance. All messages will be transfered to this object, and bounding information will be retrieved from this TechniqueGroup


The documentation for this class was generated from the following files:
Generated on Thu Apr 27 17:29:43 2006 for GameTools Illumination Module by  doxygen 1.4.6-NO