MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Mezzanine::UI::RenderLayerGroup Struct Reference

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

+ 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::list
< RenderLayerPair
RenderLayerContainer
 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 String &Name, 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...
 
const StringGetName () const
 Gets the name of this RenderLayerGroup. 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

String GroupName
 The name 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 70 of file quadrenderable.h.

Constructor & Destructor Documentation

Mezzanine::UI::RenderLayerGroup::RenderLayerGroup ( const String Name,
QuadRenderable Creator 
)

Class constructor.

Parameters
NameThe name to give to this RenderLayerGroup.
CreatorThe Quad that owns this RenderLayerGroup.

Definition at line 67 of file quadrenderable.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 98 of file quadrenderable.cpp.

const String & Mezzanine::UI::RenderLayerGroup::GetName ( ) const

Gets the name of this RenderLayerGroup.

Returns
Returns a const reference to the name of this RenderLayerGroup.

Definition at line 78 of file quadrenderable.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 117 of file quadrenderable.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 165 of file quadrenderable.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 83 of file quadrenderable.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 89 of file quadrenderable.cpp.

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

Removes a layer from this group.

Parameters
RLThe RenderLayer to be removed.

Definition at line 130 of file quadrenderable.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 150 of file quadrenderable.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 156 of file quadrenderable.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 153 of file quadrenderable.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 159 of file quadrenderable.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 122 of file quadrenderable.cpp.

Member Data Documentation

String Mezzanine::UI::RenderLayerGroup::GroupName
protected

The name of this group.

Definition at line 87 of file quadrenderable.h.

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

A pointer to the host QuadRenderable.

Definition at line 90 of file quadrenderable.h.

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

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

Definition at line 84 of file quadrenderable.h.


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