Castor3D 0.12.0
Multiplatform 3D engine
Public Types | Public Member Functions | Protected Attributes | List of all members
castor3d::Overlay Class Referencefinal

#include <Overlay.hpp>

Inheritance diagram for castor3d::Overlay:
Inheritance graph
[legend]
Collaboration diagram for castor3d::Overlay:
Collaboration graph
[legend]

Public Types

using iterator = OverlayPtrArray::iterator
 
using const_iterator = OverlayPtrArray::const_iterator
 

Public Member Functions

C3D_API Overlay (castor::String const &name, Engine &engine, OverlayType type, Scene *scene, OverlayRPtr parent)
 Constructor. More...
 
C3D_API Overlay (Engine &engine, OverlayType type, Scene *scene, OverlayRPtr parent)
 Constructor. More...
 
C3D_API Overlay (Engine &engine, OverlayType type)
 Constructor. More...
 
C3D_API void addChild (OverlayRPtr overlay)
 adds a child to the overlay. More...
 
C3D_API uint32_t getChildrenCount (int 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...
 
C3D_API uint32_t computeLevel () const
 
OverlayCategorySPtr getCategory () const
 Retrieves the overlay category. More...
 
castor::Position getAbsolutePosition (castor::Size const &size) const
 Retrieves the absolute overlay position, in pixels. More...
 
castor::Size getAbsoluteSize (castor::Size const &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...
 
OverlayType getType () const
 Retrieves the overlay type. More...
 
OverlayRPtr getParent () const
 Retrieves the parent overlay. More...
 
MaterialRPtr 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...
 
SceneRPtr getScene () const
 Retrieves the parent scene. More...
 
int getIndex () const
 Retrieves the index. More...
 
int getLevel () const
 Retrieves the level. More...
 
uint32_t getChildrenCount () 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...
 
void setVisible (bool val)
 Sets the visibility status. More...
 
void setOrder (int index, int level)
 Sets the overlay order. More...
 
void setMaterial (MaterialRPtr material)
 Sets the material. More...
 
void setPosition (castor::Point2d const &position)
 Sets the relative position of the overlay. More...
 
void setSize (castor::Point2d const &size)
 Sets the relative size of the overlay. More...
 
void setPixelPosition (castor::Position const &position)
 Sets the relative position of the overlay. More...
 
void setPixelSize (castor::Size const &size)
 Sets the relative size of the overlay. More...
 
void rename (castor::String const &name)
 Sets the name of the overlay. More...
 

Protected Attributes

castor::String m_name
 
OverlayRPtr m_parent {}
 
OverlayPtrArray m_overlays
 
OverlayCategorySPtr m_category
 
Scenem_scene
 
RenderSystemm_renderSystem
 

Member Typedef Documentation

◆ const_iterator

using castor3d::Overlay::const_iterator = OverlayPtrArray::const_iterator

◆ iterator

using castor3d::Overlay::iterator = OverlayPtrArray::iterator

Constructor & Destructor Documentation

◆ Overlay() [1/3]

C3D_API castor3d::Overlay::Overlay ( castor::String const &  name,
Engine engine,
OverlayType  type,
Scene scene,
OverlayRPtr  parent 
)

Constructor.

Parameters
[in]nameThe overlay name.
[in]engineThe engine.
[in]typeThe overlay type.
[in]sceneThe scene holding the overlay.
[in]parentThe parent overlay (if any).

◆ Overlay() [2/3]

C3D_API castor3d::Overlay::Overlay ( Engine engine,
OverlayType  type,
Scene scene,
OverlayRPtr  parent 
)

Constructor.

Parameters
[in]engineThe engine
[in]typeThe overlay type
[in]sceneThe scene holding the overlay
[in]parentThe parent overlay (if any)

◆ Overlay() [3/3]

C3D_API castor3d::Overlay::Overlay ( Engine engine,
OverlayType  type 
)

Constructor.

Parameters
[in]engineThe engine.
[in]typeThe overlay type.

Member Function Documentation

◆ addChild()

C3D_API void castor3d::Overlay::addChild ( OverlayRPtr  overlay)

adds a child to the overlay.

Parameters
[in]overlayThe overlay to add.

◆ 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.

◆ computeLevel()

C3D_API uint32_t castor3d::Overlay::computeLevel ( ) const
Returns
The hierarchy level for this overlay

◆ 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::Point2d castor3d::Overlay::getAbsolutePosition ( ) const
inline

Retrieves the absolute overlay position.

Returns
The position

References m_category.

◆ getAbsolutePosition() [2/2]

castor::Position castor3d::Overlay::getAbsolutePosition ( castor::Size const &  size) const
inline

Retrieves the absolute overlay position, in pixels.

Parameters
[in]sizeThe screen size
Returns
The position

References m_category.

◆ getAbsoluteSize() [1/2]

castor::Point2d castor3d::Overlay::getAbsoluteSize ( ) const
inline

Retrieves the absolute overlay size.

Returns
The size

References m_category.

◆ getAbsoluteSize() [2/2]

castor::Size castor3d::Overlay::getAbsoluteSize ( castor::Size const &  size) const
inline

Retrieves the absolute overlay size, in pixels.

Parameters
[in]sizeThe screen 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.

◆ getChildrenCount() [1/2]

uint32_t castor3d::Overlay::getChildrenCount ( ) const
inline

Retrieves the childs count.

Returns
The value

References m_overlays.

◆ getChildrenCount() [2/2]

C3D_API uint32_t castor3d::Overlay::getChildrenCount ( int  level) const

Retrieves the childs count at given level.

Parameters
[in]levelThe wanted level
Returns
The count

◆ 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()

MaterialRPtr 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.

◆ getPanelOverlay()

C3D_API PanelOverlaySPtr castor3d::Overlay::getPanelOverlay ( ) const

Retrieves the panel overlay.

Returns
The category.

◆ getParent()

OverlayRPtr castor3d::Overlay::getParent ( ) const
inline

Retrieves the parent overlay.

Returns
The value

References m_parent.

◆ getPixelPosition() [1/2]

castor::Position & castor3d::Overlay::getPixelPosition ( )
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ getPixelPosition() [2/2]

castor::Position const & castor3d::Overlay::getPixelPosition ( ) const
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ getPixelSize() [1/2]

castor::Size & castor3d::Overlay::getPixelSize ( )
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ getPixelSize() [2/2]

castor::Size const & castor3d::Overlay::getPixelSize ( ) const
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ getPosition() [1/2]

castor::Point2d & castor3d::Overlay::getPosition ( )
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ getPosition() [2/2]

castor::Point2d const & castor3d::Overlay::getPosition ( ) const
inline

Retrieves the overlay position.

Returns
The value

References m_category.

◆ getScene()

SceneRPtr castor3d::Overlay::getScene ( ) const
inline

Retrieves the parent scene.

Returns
The value

References m_scene.

◆ getSize() [1/2]

castor::Point2d & castor3d::Overlay::getSize ( )
inline

Retrieves the overlay size.

Returns
The value

References m_category.

◆ getSize() [2/2]

castor::Point2d const & castor3d::Overlay::getSize ( ) const
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()

OverlayType 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

◆ rename()

void castor3d::Overlay::rename ( castor::String const &  name)
inline

Sets the name of the overlay.

Parameters
[in]nameThe new name

References m_name.

◆ setMaterial()

void castor3d::Overlay::setMaterial ( MaterialRPtr  material)
inline

Sets the material.

Parameters
[in]materialThe new value

References m_category.

◆ setOrder()

void castor3d::Overlay::setOrder ( int  index,
int  level 
)
inline

Sets the overlay order.

Parameters
[in]indexThe new index
[in]levelThe new level

References m_category.

◆ setPixelPosition()

void castor3d::Overlay::setPixelPosition ( castor::Position const &  position)
inline

Sets the relative position of the overlay.

Parameters
[in]positionThe new position

References m_category.

◆ setPixelSize()

void castor3d::Overlay::setPixelSize ( castor::Size const &  size)
inline

Sets the relative size of the overlay.

Parameters
[in]sizeThe new size

References m_category.

◆ setPosition()

void castor3d::Overlay::setPosition ( castor::Point2d const &  position)
inline

Sets the relative position of the overlay.

Parameters
[in]positionThe new position

References m_category.

◆ setSize()

void castor3d::Overlay::setSize ( castor::Point2d const &  size)
inline

Sets the relative size of the overlay.

Parameters
[in]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_name

castor::String castor3d::Overlay::m_name
protected

The overlay name.

Referenced by getName(), and rename().

◆ m_overlays

OverlayPtrArray castor3d::Overlay::m_overlays
protected

The children.

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

◆ m_parent

OverlayRPtr castor3d::Overlay::m_parent {}
protected

The parent overlay, if any.

Referenced by getParent().

◆ m_renderSystem

RenderSystem* castor3d::Overlay::m_renderSystem
protected

The render system.

◆ m_scene

Scene* castor3d::Overlay::m_scene
protected

The parent scene.

Referenced by getScene().


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