![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <Overlay.hpp>
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 |
Scene * | m_scene |
RenderSystem * | m_renderSystem |
using castor3d::Overlay::const_iterator = OverlayPtrArray::const_iterator |
using castor3d::Overlay::iterator = OverlayPtrArray::iterator |
C3D_API castor3d::Overlay::Overlay | ( | castor::String const & | name, |
Engine & | engine, | ||
OverlayType | type, | ||
Scene * | scene, | ||
OverlayRPtr | parent | ||
) |
Constructor.
[in] | name | The overlay name. |
[in] | engine | The engine. |
[in] | type | The overlay type. |
[in] | scene | The scene holding the overlay. |
[in] | parent | The parent overlay (if any). |
C3D_API castor3d::Overlay::Overlay | ( | Engine & | engine, |
OverlayType | type, | ||
Scene * | scene, | ||
OverlayRPtr | parent | ||
) |
Constructor.
[in] | engine | The engine |
[in] | type | The overlay type |
[in] | scene | The scene holding the overlay |
[in] | parent | The parent overlay (if any) |
C3D_API castor3d::Overlay::Overlay | ( | Engine & | engine, |
OverlayType | type | ||
) |
Constructor.
[in] | engine | The engine. |
[in] | type | The overlay type. |
C3D_API void castor3d::Overlay::addChild | ( | OverlayRPtr | overlay | ) |
adds a child to the overlay.
[in] | overlay | The overlay to add. |
|
inline |
|
inline |
C3D_API uint32_t castor3d::Overlay::computeLevel | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieves the absolute overlay position, in pixels.
[in] | size | The screen size |
References m_category.
|
inline |
|
inline |
Retrieves the absolute overlay size, in pixels.
[in] | size | The screen size |
References m_category.
C3D_API BorderPanelOverlaySPtr castor3d::Overlay::getBorderPanelOverlay | ( | ) | const |
Retrieves the border panel overlay.
|
inline |
|
inline |
C3D_API uint32_t castor3d::Overlay::getChildrenCount | ( | int | level | ) | const |
Retrieves the childs count at given level.
[in] | level | The wanted level |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API PanelOverlaySPtr castor3d::Overlay::getPanelOverlay | ( | ) | const |
Retrieves the panel overlay.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
C3D_API TextOverlaySPtr castor3d::Overlay::getTextOverlay | ( | ) | const |
Retrieves the text overlay.
|
inline |
|
inline |
true
if this overlay's or one of its parents' position has changed. References m_category.
|
inline |
true
if this overlay's or one of its parents' size has changed. References m_category.
C3D_API bool castor3d::Overlay::isVisible | ( | ) | const |
Retrieves the visibility status.
|
inline |
|
inline |
|
inline |
Sets the overlay order.
[in] | index | The new index |
[in] | level | The new level |
References m_category.
|
inline |
Sets the relative position of the overlay.
[in] | position | The new position |
References m_category.
|
inline |
|
inline |
Sets the relative position of the overlay.
[in] | position | The new position |
References m_category.
|
inline |
|
inline |
|
protected |
The overlay category.
Referenced by getAbsolutePosition(), getAbsoluteSize(), getCategory(), getIndex(), getLevel(), getMaterial(), getPixelPosition(), getPixelSize(), getPosition(), getSize(), getType(), isPositionChanged(), isSizeChanged(), setMaterial(), setOrder(), setPixelPosition(), setPixelSize(), setPosition(), setSize(), and setVisible().
|
protected |
|
protected |
The children.
Referenced by begin(), end(), and getChildrenCount().
|
protected |
The parent overlay, if any.
Referenced by getParent().
|
protected |
The render system.
|
protected |
The parent scene.
Referenced by getScene().