Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Mezzanine::UI::RenderLayerGroup Class Reference

This class stores a group of render layers that can be set to be rendered. More...

#include <renderlayergroup.h>

+ Collaboration diagram for Mezzanine::UI::RenderLayerGroup:

Public Types

typedef RenderLayerContainer::const_iterator ConstRenderLayerIterator
 Const Iterator type for RenderLayerPair instances stored by this class.
 
typedef std::vector< RenderLayerPairRenderLayerContainer
 Basic container type for RenderLayerPair storage by this class.
 
typedef RenderLayerContainer::iterator RenderLayerIterator
 Iterator type for RenderLayerPair instances stored by this class.
 
typedef std::pair< UInt16, RenderLayer * > RenderLayerPair
 An std::pair type for storing ZOrders in relation to RenderLayer instances.
 

Public Member Functions

 RenderLayerGroup (const UInt16 ID, QuadRenderable *Creator)
 Class constructor. More...
 
 ~RenderLayerGroup ()
 Class destructor.
 
void AddLayer (RenderLayer *RL, const UInt16 ZOrder)
 Adds a layer to this group by it's ZOrder. More...
 
UInt16 GetGroupID () const
 Gets the ID of this RenderLayerGroup. More...
 
RenderLayerGetLayer (const Whole Index) const
 Gets a RenderLayer in this group by it's index. More...
 
RenderLayerGetLayerByZOrder (const UInt16 ZOrder) const
 Gets a RenderLayer in this group by it's ZOrder. More...
 
UInt32 GetNumRenderLayers () const
 Gets the number of RenderLayers assigned to this group. More...
 
void NotifyActive ()
 Notifies this RenderLayerGroup that it has become the active group. More...
 
void NotifyInactive ()
 Notifies this RenderLayerGroup that it is no longer the active group. More...
 
void RemoveAllLayers ()
 Removes every layer in this group, from this group.
 
void RemoveLayer (RenderLayer *RL)
 Removes a layer from this group. More...
 
RenderLayerIterator RenderLayerBegin ()
 Gets an iterator to the first RenderLayer. More...
 
ConstRenderLayerIterator RenderLayerBegin () const
 Gets a const iterator to the first RenderLayer. More...
 
RenderLayerIterator RenderLayerEnd ()
 Gets an iterator to one passed the last RenderLayer. More...
 
ConstRenderLayerIterator RenderLayerEnd () const
 Gets an iterator to one passed the last RenderLayer. More...
 
void SwapLayers (RenderLayerGroup *OtherGroup)
 Swaps the layers contained by this group and another group. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized. More...
 

Protected Attributes

UInt16 GroupID
 The ID of this group. More...
 
QuadRenderableParentQuad
 A pointer to the host QuadRenderable. More...
 
RenderLayerContainer RenderLayers
 Container storing all the layers that belong to this group and their ZOrders. More...
 

Detailed Description

This class stores a group of render layers that can be set to be rendered.

A QuadRenderable can only render one group of layers at a time, but a single layer can be added to as many RenderLayerGroup's as the user see's fit.

Definition at line 56 of file renderlayergroup.h.

Constructor & Destructor Documentation

Mezzanine::UI::RenderLayerGroup::RenderLayerGroup ( const UInt16  ID,
QuadRenderable Creator 
)

Class constructor.

Parameters
IDThe unique ID to give to this RenderLayerGroup.
CreatorThe Quad that owns this RenderLayerGroup.

Definition at line 51 of file renderlayergroup.cpp.

Member Function Documentation

void Mezzanine::UI::RenderLayerGroup::AddLayer ( RenderLayer RL,
const UInt16  ZOrder 
)

Adds a layer to this group by it's ZOrder.

Parameters
RLThe layer to add.
ZOrderThe ZOrder at which to add the layer.

Definition at line 80 of file renderlayergroup.cpp.

UInt16 Mezzanine::UI::RenderLayerGroup::GetGroupID ( ) const

Gets the ID of this RenderLayerGroup.

Returns
Returns a UInt16 representing the ID of this RenderLayerGroup.

Definition at line 62 of file renderlayergroup.cpp.

RenderLayer * Mezzanine::UI::RenderLayerGroup::GetLayer ( const Whole  Index) const

Gets a RenderLayer in this group by it's index.

Parameters
IndexThe index of the RenderLayer to retrieve. Note: RenderLayers are sorted via ZOrder.
Returns
Returns a pointer to the RenderLayer at the specified index.

Definition at line 99 of file renderlayergroup.cpp.

RenderLayer * Mezzanine::UI::RenderLayerGroup::GetLayerByZOrder ( const UInt16  ZOrder) const

Gets a RenderLayer in this group by it's ZOrder.

Parameters
ZOrderThe ZOrder of the RenderLayer to retrieve.
Returns
Returns a pointer to the layer at the specified ZOrder, or NULL if no layers exist at that ZOrder.

Definition at line 104 of file renderlayergroup.cpp.

UInt32 Mezzanine::UI::RenderLayerGroup::GetNumRenderLayers ( ) const

Gets the number of RenderLayers assigned to this group.

Returns
Returns a UInt32 containing the number of RenderLayers in this group.

Definition at line 114 of file renderlayergroup.cpp.

String Mezzanine::UI::RenderLayerGroup::GetSerializableName ( )
static

Get the name of the the XML tag the Renderable class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 162 of file renderlayergroup.cpp.

void Mezzanine::UI::RenderLayerGroup::NotifyActive ( )

Notifies this RenderLayerGroup that it has become the active group.

Remarks
This shouldn't need to ever be called manually and is automatically called when a QuadRenderable sets it as the active RenderLayerGroup. This method exists to reset the state of a layer (or group of layers) if necessary to achieve the visual effect desired.

Definition at line 65 of file renderlayergroup.cpp.

void Mezzanine::UI::RenderLayerGroup::NotifyInactive ( )

Notifies this RenderLayerGroup that it is no longer the active group.

Remarks
This is a straightforward counterpart to the "NotifyActive" method also on this class, and also shouldn't ever need to be called manually.

Definition at line 71 of file renderlayergroup.cpp.

void Mezzanine::UI::RenderLayerGroup::RemoveLayer ( RenderLayer RL)

Removes a layer from this group.

Parameters
RLThe RenderLayer to be removed.

Definition at line 127 of file renderlayergroup.cpp.

RenderLayerGroup::RenderLayerIterator Mezzanine::UI::RenderLayerGroup::RenderLayerBegin ( )

Gets an iterator to the first RenderLayer.

Returns
Returns an iterator to the first RenderLayer being stored by this group.

Definition at line 147 of file renderlayergroup.cpp.

RenderLayerGroup::ConstRenderLayerIterator Mezzanine::UI::RenderLayerGroup::RenderLayerBegin ( ) const

Gets a const iterator to the first RenderLayer.

Returns
Returns a const iterator to the first RenderLayer being stored by this group.

Definition at line 153 of file renderlayergroup.cpp.

RenderLayerGroup::RenderLayerIterator Mezzanine::UI::RenderLayerGroup::RenderLayerEnd ( )

Gets an iterator to one passed the last RenderLayer.

Returns
Returns an iterator to one passed the last RenderLayer being stored by this group.

Definition at line 150 of file renderlayergroup.cpp.

RenderLayerGroup::ConstRenderLayerIterator Mezzanine::UI::RenderLayerGroup::RenderLayerEnd ( ) const

Gets an iterator to one passed the last RenderLayer.

Returns
Returns an iterator to one passed the last RenderLayer being stored by this group.

Definition at line 156 of file renderlayergroup.cpp.

void Mezzanine::UI::RenderLayerGroup::SwapLayers ( RenderLayerGroup OtherGroup)

Swaps the layers contained by this group and another group.

Parameters
OtherGroupThe other RenderLayerGroup to swap layers with.

Definition at line 119 of file renderlayergroup.cpp.

Member Data Documentation

UInt16 Mezzanine::UI::RenderLayerGroup::GroupID
protected

The ID of this group.

Definition at line 76 of file renderlayergroup.h.

QuadRenderable* Mezzanine::UI::RenderLayerGroup::ParentQuad
protected

A pointer to the host QuadRenderable.

Definition at line 73 of file renderlayergroup.h.

RenderLayerContainer Mezzanine::UI::RenderLayerGroup::RenderLayers
protected

Container storing all the layers that belong to this group and their ZOrders.

Definition at line 70 of file renderlayergroup.h.


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