Castor3D  ..
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
Castor3D::Overlay Class Reference

The overlay class. More...

+ Inheritance diagram for Castor3D::Overlay:
+ Collaboration diagram for Castor3D::Overlay:

Classes

class  BinaryParser
 Overlay loader. More...
 
class  TextLoader
 Overlay loader. More...
 

Public Types

typedef OverlayPtrArray::iterator iterator
 
typedef OverlayPtrArray::const_iterator const_iterator
 

Public Member Functions

C3D_API Overlay (Engine &p_engine, eOVERLAY_TYPE p_type)
 Constructor. More...
 
C3D_API Overlay (Engine &p_engine, eOVERLAY_TYPE p_type, SceneSPtr p_scene, OverlaySPtr p_parent)
 Constructor. More...
 
virtual C3D_API ~Overlay ()
 Destructor. More...
 
virtual C3D_API void Render (Castor::Size const &p_size)
 Draws the overlay. More...
 
C3D_API bool AddChild (OverlaySPtr p_overlay)
 Adds a child to the overlay. More...
 
C3D_API int GetChildsCount (int p_level) const
 Retrieves the childs count at given level. More...
 
C3D_API PanelOverlaySPtr GetPanelOverlay () const
 Retrieves the panel overlay. More...
 
C3D_API BorderPanelOverlaySPtr GetBorderPanelOverlay () const
 Retrieves the border panel overlay. More...
 
C3D_API TextOverlaySPtr GetTextOverlay () const
 Retrieves the text overlay. More...
 
C3D_API bool IsVisible () const
 Retrieves the visibility status. More...
 
OverlayCategorySPtr GetCategory () const
 Retrieves the overlay category. More...
 
Castor::Position GetAbsolutePosition (Castor::Size const &p_size) const
 Retrieves the absolute overlay position, in pixels. More...
 
Castor::Size GetAbsoluteSize (Castor::Size const &p_size) const
 Retrieves the absolute overlay size, in pixels. More...
 
Castor::Point2d GetAbsolutePosition () const
 Retrieves the absolute overlay position. More...
 
Castor::Point2d GetAbsoluteSize () const
 Retrieves the absolute overlay size. More...
 
bool IsSizeChanged () const
 
bool IsPositionChanged () const
 
Castor::String const & GetName () const
 Retrieves the overlay name. More...
 
Castor::Point2d const & GetPosition () const
 Retrieves the overlay position. More...
 
Castor::Point2d const & GetSize () const
 Retrieves the overlay size. More...
 
Castor::Position const & GetPixelPosition () const
 Retrieves the overlay position. More...
 
Castor::Size const & GetPixelSize () const
 Retrieves the overlay size. More...
 
eOVERLAY_TYPE GetType () const
 Retrieves the overlay type. More...
 
OverlaySPtr GetParent () const
 Retrieves the parent overlay. More...
 
MaterialSPtr GetMaterial () const
 Retrieves the material. More...
 
Castor::Point2d & GetPosition ()
 Retrieves the overlay position. More...
 
Castor::Point2d & GetSize ()
 Retrieves the overlay size. More...
 
Castor::Position & GetPixelPosition ()
 Retrieves the overlay position. More...
 
Castor::Size & GetPixelSize ()
 Retrieves the overlay size. More...
 
SceneSPtr GetScene () const
 Retrieves the parent scene. More...
 
int GetIndex () const
 Retrieves the index. More...
 
int GetLevel () const
 Retrieves the level. More...
 
uint32_t GetChildsCount () const
 Retrieves the childs count. More...
 
iterator begin ()
 Retrieves an iterator to the first child. More...
 
const_iterator begin () const
 Retrieves an iterator to the first child. More...
 
iterator end ()
 Retrieves an iterator to after the last child. More...
 
const_iterator end () const
 Retrieves an iterator to after the last child. More...
 
OverlayManager const & GetOverlayManager () const
 Retrieves the overlay manager. More...
 
OverlayManagerGetOverlayManager ()
 Retrieves the overlay manager. More...
 
void SetVisible (bool val)
 Sets the visibility status. More...
 
void SetOrder (int p_index, int p_level)
 Sets the overlay order. More...
 
void SetMaterial (MaterialSPtr p_pMaterial)
 Sets the material. More...
 
void SetPosition (Castor::Point2d const &p_position)
 Sets the relative position of the overlay. More...
 
void SetSize (Castor::Point2d const &p_size)
 Sets the relative size of the overlay. More...
 
void SetPixelPosition (Castor::Position const &p_position)
 Sets the relative position of the overlay. More...
 
void SetPixelSize (Castor::Size const &p_size)
 Sets the relative size of the overlay. More...
 
void SetName (Castor::String const &p_name)
 Sets the name of the overlay. More...
 

Protected Attributes

OverlayManagerm_manager
 The overlay manager. More...
 
Castor::String m_name
 The overlay name. More...
 
OverlayWPtr m_parent
 The parent overlay, if any. More...
 
OverlayPtrArray m_overlays
 The childs. More...
 
OverlayCategorySPtr m_category
 The overlay category. More...
 
SceneWPtr m_pScene
 The parent scene. More...
 
RenderSystemm_renderSystem
 The render system. More...
 

Detailed Description

The overlay class.

Author
Sylvain DOREMUS
Date
25/08/2010
Remarks
An overlay is a 2D element which is displayed at foreground

Member Typedef Documentation

◆ const_iterator

typedef OverlayPtrArray::const_iterator Castor3D::Overlay::const_iterator

◆ iterator

typedef OverlayPtrArray::iterator Castor3D::Overlay::iterator

Constructor & Destructor Documentation

◆ Overlay() [1/2]

C3D_API Castor3D::Overlay::Overlay ( Engine p_engine,
eOVERLAY_TYPE  p_type 
)

Constructor.

Parameters
[in]p_engineThe engine
[in]p_typeThe overlay type

◆ Overlay() [2/2]

C3D_API Castor3D::Overlay::Overlay ( Engine p_engine,
eOVERLAY_TYPE  p_type,
SceneSPtr  p_scene,
OverlaySPtr  p_parent 
)

Constructor.

Parameters
[in]p_engineThe engine
[in]p_typeThe overlay type
[in]p_sceneThe scene holding the overlay
[in]p_parentThe parent overlay (if any)

Constructeur

Parameters
[in]p_engineLe moteur
[in]p_typeLe type de l'incrustation
[in]p_sceneLa scène parent
[in]p_parentL'incrustation parente

◆ ~Overlay()

virtual C3D_API Castor3D::Overlay::~Overlay ( )
virtual

Destructor.

Member Function Documentation

◆ AddChild()

C3D_API bool Castor3D::Overlay::AddChild ( OverlaySPtr  p_overlay)

Adds a child to the overlay.

Parameters
[in]p_overlayThe overlay to add
Returns
true if successful, false if not

◆ begin() [1/2]

iterator Castor3D::Overlay::begin ( )
inline

Retrieves an iterator to the first child.

Returns
The value

References m_overlays.

◆ begin() [2/2]

const_iterator Castor3D::Overlay::begin ( ) const
inline

Retrieves an iterator to the first child.

Returns
The value

References m_overlays.

◆ end() [1/2]

iterator Castor3D::Overlay::end ( )
inline

Retrieves an iterator to after the last child.

Returns
The value

References m_overlays.

◆ end() [2/2]

const_iterator Castor3D::Overlay::end ( ) const
inline

Retrieves an iterator to after the last child.

Returns
The value

References m_overlays.

◆ GetAbsolutePosition() [1/2]

Castor::Position Castor3D::Overlay::GetAbsolutePosition ( Castor::Size const &  p_size) const
inline

Retrieves the absolute overlay position, in pixels.

Parameters
[in]p_sizeThe screen size
Returns
The position

References m_category.

◆ GetAbsolutePosition() [2/2]

Castor::Point2d Castor3D::Overlay::GetAbsolutePosition ( ) const
inline

Retrieves the absolute overlay position.

Returns
The position

References m_category.

◆ GetAbsoluteSize() [1/2]

Castor::Size Castor3D::Overlay::GetAbsoluteSize ( Castor::Size const &  p_size) const
inline

Retrieves the absolute overlay size, in pixels.

Parameters
[in]p_sizeThe screen size
Returns
The size

References m_category.

◆ GetAbsoluteSize() [2/2]

Castor::Point2d Castor3D::Overlay::GetAbsoluteSize ( ) const
inline

Retrieves the absolute overlay size.

Returns
The size

References m_category.

◆ GetBorderPanelOverlay()

C3D_API BorderPanelOverlaySPtr Castor3D::Overlay::GetBorderPanelOverlay ( ) const

Retrieves the border panel overlay.

Returns
The category.

◆ GetCategory()

OverlayCategorySPtr Castor3D::Overlay::GetCategory ( ) const
inline

Retrieves the overlay category.

Returns
The category.

References m_category.

◆ GetChildsCount() [1/2]

C3D_API int Castor3D::Overlay::GetChildsCount ( int  p_level) const

Retrieves the childs count at given level.

Parameters
[in]p_levelThe wanted level
Returns
The count

◆ GetChildsCount() [2/2]

uint32_t Castor3D::Overlay::GetChildsCount ( ) const
inline

Retrieves the childs count.

Returns
The value

References m_overlays.

◆ GetIndex()

int Castor3D::Overlay::GetIndex ( ) const
inline

Retrieves the index.

Returns
The value

References m_category.

◆ GetLevel()

int Castor3D::Overlay::GetLevel ( ) const
inline

Retrieves the level.

Returns
The value

References m_category.

◆ GetMaterial()

MaterialSPtr Castor3D::Overlay::GetMaterial ( ) const
inline

Retrieves the material.

Returns
The value

References m_category.

◆ GetName()

Castor::String const& Castor3D::Overlay::GetName ( ) const
inline

Retrieves the overlay name.

Returns
The value

References m_name.

◆ GetOverlayManager() [1/2]

OverlayManager const& Castor3D::Overlay::GetOverlayManager ( ) const
inline

Retrieves the overlay manager.

Returns
The value

References m_manager.

◆ GetOverlayManager() [2/2]

OverlayManager& Castor3D::Overlay::GetOverlayManager ( )
inline

Retrieves the overlay manager.

Returns
The value

References m_manager.

◆ GetPanelOverlay()

C3D_API PanelOverlaySPtr Castor3D::Overlay::GetPanelOverlay ( ) const

Retrieves the panel overlay.

Returns
The category.

◆ GetParent()

OverlaySPtr Castor3D::Overlay::GetParent ( ) const
inline

Retrieves the parent overlay.

Returns
The value

References m_parent.

◆ GetPixelPosition() [1/2]

Castor::Position const& Castor3D::Overlay::GetPixelPosition ( ) const
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ GetPixelPosition() [2/2]

Castor::Position& Castor3D::Overlay::GetPixelPosition ( )
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ GetPixelSize() [1/2]

Castor::Size const& Castor3D::Overlay::GetPixelSize ( ) const
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ GetPixelSize() [2/2]

Castor::Size& Castor3D::Overlay::GetPixelSize ( )
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ GetPosition() [1/2]

Castor::Point2d const& Castor3D::Overlay::GetPosition ( ) const
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ GetPosition() [2/2]

Castor::Point2d& Castor3D::Overlay::GetPosition ( )
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ GetScene()

SceneSPtr Castor3D::Overlay::GetScene ( ) const
inline

Retrieves the parent scene.

Returns
The value

References m_pScene.

◆ GetSize() [1/2]

Castor::Point2d const& Castor3D::Overlay::GetSize ( ) const
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ GetSize() [2/2]

Castor::Point2d& Castor3D::Overlay::GetSize ( )
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ GetTextOverlay()

C3D_API TextOverlaySPtr Castor3D::Overlay::GetTextOverlay ( ) const

Retrieves the text overlay.

Returns
The category.

◆ GetType()

eOVERLAY_TYPE Castor3D::Overlay::GetType ( ) const
inline

Retrieves the overlay type.

Returns
The value

References m_category.

◆ IsPositionChanged()

bool Castor3D::Overlay::IsPositionChanged ( ) const
inline
Returns
true if this overlay's or one of its parents' position has changed.

References m_category.

◆ IsSizeChanged()

bool Castor3D::Overlay::IsSizeChanged ( ) const
inline
Returns
true if this overlay's or one of its parents' size has changed.

References m_category.

◆ IsVisible()

C3D_API bool Castor3D::Overlay::IsVisible ( ) const

Retrieves the visibility status.

Returns
The value

◆ Render()

virtual C3D_API void Castor3D::Overlay::Render ( Castor::Size const &  p_size)
virtual

Draws the overlay.

Parameters
[in]p_sizeThe render target size

◆ SetMaterial()

void Castor3D::Overlay::SetMaterial ( MaterialSPtr  p_pMaterial)
inline

Sets the material.

Parameters
[in]p_pMaterialThe new value

References m_category.

◆ SetName()

void Castor3D::Overlay::SetName ( Castor::String const &  p_name)
inline

Sets the name of the overlay.

Parameters
[in]p_nameThe new name

References m_name.

◆ SetOrder()

void Castor3D::Overlay::SetOrder ( int  p_index,
int  p_level 
)
inline

Sets the overlay order.

Parameters
[in]p_indexThe new index
[in]p_levelThe new level

References m_category.

◆ SetPixelPosition()

void Castor3D::Overlay::SetPixelPosition ( Castor::Position const &  p_position)
inline

Sets the relative position of the overlay.

Parameters
[in]p_positionThe new position

References m_category.

◆ SetPixelSize()

void Castor3D::Overlay::SetPixelSize ( Castor::Size const &  p_size)
inline

Sets the relative size of the overlay.

Parameters
[in]p_sizeThe new size

References m_category.

◆ SetPosition()

void Castor3D::Overlay::SetPosition ( Castor::Point2d const &  p_position)
inline

Sets the relative position of the overlay.

Parameters
[in]p_positionThe new position

References m_category.

◆ SetSize()

void Castor3D::Overlay::SetSize ( Castor::Point2d const &  p_size)
inline

Sets the relative size of the overlay.

Parameters
[in]p_sizeThe new size

References m_category.

◆ SetVisible()

void Castor3D::Overlay::SetVisible ( bool  val)
inline

Sets the visibility status.

Parameters
[in]valThe new value

References m_category.

Member Data Documentation

◆ m_category

OverlayCategorySPtr Castor3D::Overlay::m_category
protected

◆ m_manager

OverlayManager& Castor3D::Overlay::m_manager
protected

The overlay manager.

Referenced by GetOverlayManager().

◆ m_name

Castor::String Castor3D::Overlay::m_name
protected

The overlay name.

Referenced by GetName(), and SetName().

◆ m_overlays

OverlayPtrArray Castor3D::Overlay::m_overlays
protected

The childs.

Referenced by begin(), end(), and GetChildsCount().

◆ m_parent

OverlayWPtr Castor3D::Overlay::m_parent
protected

The parent overlay, if any.

Referenced by GetParent().

◆ m_pScene

SceneWPtr Castor3D::Overlay::m_pScene
protected

The parent scene.

Referenced by GetScene().

◆ m_renderSystem

RenderSystem* Castor3D::Overlay::m_renderSystem
protected

The render system.


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