Inheritance diagram for OgreSharedRuns:
Public Member Functions | |
OgreSharedRuns () | |
Constructor. | |
std::map< RenderingRunType, RenderingRun * > & | getSharedRuns () |
Retrieves the contaied RenderingRuns with their type information. | |
void | setBoundingSphere (Sphere &sphere) |
Sets the bounding sphere of the node. | |
void | setBoundingBox (AxisAlignedBox &box) |
Sets the axis-aligned bounding box of the node. | |
Sphere & | getBoundingSphere () |
Returns the bounding sphere of the node. | |
AxisAlignedBox & | getBoundingBox () |
Returns the axis-aligned bounding box of the node. | |
Sphere & | getRootBoundingSphere () |
Returns the bounding sphere of the root parent node. | |
Sphere & | getRootBoundingSphere (RenderingRunType runType) |
Retrieves the bounding sphere of the topmost parent node of this SharedRuns node, which have a specified RenderingRun type. | |
AxisAlignedBox & | getRootBoundingBox () |
Returns the axis-aligned bounding box of the root parent node. | |
AxisAlignedBox & | getRootBoundingBox (RenderingRunType runType) |
Retrieves the axis-aligned bounding box of the topmost parent node of this SharedRuns node, which have a specified RenderingRun type. | |
const Vector3 & | getRootPosition () |
Returns the world space center position of the root parent node. | |
const Vector3 & | getRootPosition (RenderingRunType runType) |
Retrieves the world space center position of the topmost parent node of this SharedRuns node, which have a specified RenderingRun type. | |
bool | hasOwnRun (RenderingRunType runType) |
Checks if this node has a resource with the given type. | |
void | addRenderablesToQueue (RenderQueue *rq) |
Adds all the Renderables connected to this node to a given RenderQueue. | |
void | notifyCamera (Camera *cam) |
Calls notifyCamera() to all the Renderables connected to this node. | |
void | findSharedRootsForType (RenderingRunType runType, std::vector< OgreSharedRuns * > &roots) |
Finds all the topmost nodes which have resources of the given type. | |
RenderingRun * | getRun (RenderingRunType runType) |
void | addRun (RenderingRunType runType, RenderingRun *run) |
void | updateRun (RenderingRunType runType, unsigned long frameNum) |
void | updateBounds () |
Updates the boundary of this SharedRuns (and also it's parent). | |
void | validate () |
Validate this SharedRuns (and also all childs). | |
void | destroy () |
Destroys the node (and all parents recursively). | |
Static Public Member Functions | |
static bool | canJoin (SharedRuns *r1, SharedRuns *r2) |
Checks if two SharedRuns node can be joined. | |
static bool | haveCommonRuns (SharedRuns *r1, SharedRuns *r2) |
Checks if two SharedRuns have common resources so that they can be joined. | |
Protected Member Functions | |
void | gatherRuns () |
Collects RenderingRuns references from the child nodes, used when joining. | |
void | fireRunChanges () |
Sends runChanged events for each RenderingRun type, used after join and split. | |
SharedRuns * | createInstance () |
Creates a new SharedRuns instance. All derivatives should implement this. | |
void | hideRenderables () |
Hides all the connected renderables, only used if this is a leaf. | |
void | restoreRenderableVisibility () |
Restires visibility of all the connected renderables, only used if this is a leaf. | |
void | setRenderablesVisible (bool visible) |
Set visibility of connected renderables, only used if this is a leaf. | |
Protected Attributes | |
std::map< RenderingRunType, RenderingRun * > | sharedRuns |
map of contained RenderingRuns | |
std::map< OgreRenderable *, bool > | renderables |
map of connected renderablis with visibility information | |
Sphere | boundingSphere |
the bounding sphere of all the objects connected to this node. | |
AxisAlignedBox | boundingBox |
the axis aligned bounding box of all the objects connected to this node. |
|
Adds all the Renderables connected to this node to a given RenderQueue. The function is called recoursively for all child nodes.
|
|
&brief Adds a RenderingRun instance to the shared resources.
Implements SharedRuns. |
|
Checks if two SharedRuns node can be joined.
|
|
Creates a new SharedRuns instance. All derivatives should implement this.
Implements SharedRuns. |
|
Finds all the topmost nodes which have resources of the given type. This function is called for the root node, and will be called recoursively downwards in the tree for all childs. If a node with with the given resource is found, the node can be added and it's childs don't need to be checked anymore. From a given group of objects (root node) a new set of groups will be created (they will be the members of the given vector). Each new group will be a subtree of the original tree. They will form groups that contain the maximum number of objects that can be joined by the the given resource type.
|
|
Returns the axis-aligned bounding box of the node.
|
|
Returns the bounding sphere of the node.
|
|
Retrieves the axis-aligned bounding box of the topmost parent node of this SharedRuns node, which have a specified RenderingRun type.
|
|
Returns the axis-aligned bounding box of the root parent node.
|
|
Retrieves the bounding sphere of the topmost parent node of this SharedRuns node, which have a specified RenderingRun type.
|
|
Returns the bounding sphere of the root parent node.
|
|
Retrieves the world space center position of the topmost parent node of this SharedRuns node, which have a specified RenderingRun type.
|
|
Returns the world space center position of the root parent node.
|
|
&brief Retrieves a shared resource.
Implements SharedRuns. |
|
Retrieves the contaied RenderingRuns with their type information.
|
|
Checks if this node has a resource with the given type. Only this node none of the child nodes are checked.
Implements SharedRuns. |
|
Checks if two SharedRuns have common resources so that they can be joined.
|
|
Calls notifyCamera() to all the Renderables connected to this node. The function is called recoursively for all child nodes.
|
|
Sets the axis-aligned bounding box of the node.
|
|
Sets the bounding sphere of the node.
|
|
Set visibility of connected renderables, only used if this is a leaf.
Implements SharedRuns. |
|
&brief Updates a shared RenderingRun.
Implements SharedRuns. |
|
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). Implements SharedRuns. |
|
map of connected renderablis with visibility information Used to show or hide the renderables connected to a leaf OgreSharedRuns node. |