![]() |
Castor3D 0.12.0
Multiplatform 3D engine
|
#include <OverlayCategory.hpp>


Classes | |
| struct | Vertex |
| Holds specific vertex data for an Overlay. More... | |
Public Member Functions | |
| CU_DeclareVector (Vertex, Vertex) | |
| C3D_API | OverlayCategory (OverlayType type) |
| Constructor. More... | |
| virtual C3D_API | ~OverlayCategory () |
| Destructor. More... | |
| C3D_API void | update (OverlayRenderer const &renderer) |
| Updates the overlay position, size... More... | |
| virtual C3D_API void | accept (OverlayVisitor &renderer) const =0 |
| Draws the overlay. More... | |
| virtual C3D_API void | setMaterial (MaterialRPtr material) |
| Sets the material. More... | |
| C3D_API castor::String const & | getOverlayName () const |
| Retrieves the overlay name. More... | |
| C3D_API castor::Position | getAbsolutePosition (castor::Size const &size) const |
| Retrieves the absolute overlay position, in pixels. More... | |
| C3D_API castor::Size | getAbsoluteSize (castor::Size const &size) const |
| Retrieves the absolute overlay size, in pixels. More... | |
| C3D_API castor::Point2f | getRenderRatio (castor::Size const &size) const |
| C3D_API castor::Point2d | getAbsolutePosition () const |
| Retrieves the absolute overlay position. More... | |
| C3D_API castor::Point2d | getAbsoluteSize () const |
| Retrieves the absolute overlay size. More... | |
| C3D_API bool | isSizeChanged () const |
| C3D_API bool | isPositionChanged () const |
| virtual C3D_API bool | isChanged () const |
| void | setPosition (castor::Point2d const &position) |
| Sets the overlay position. More... | |
| void | setSize (castor::Point2d const &size) |
| Sets the overlay size. More... | |
| castor::Point2d const & | getSize () const |
| Retrieves the overlay size. More... | |
| castor::Point2d const & | getPosition () const |
| Retrieves the overlay position. More... | |
| castor::Size const & | getPixelSize () const |
| Retrieves the overlay size. More... | |
| castor::Position const & | getPixelPosition () const |
| Retrieves the overlay position. More... | |
| castor::Point2d & | getSize () |
| Retrieves the overlay size. More... | |
| castor::Point2d & | getPosition () |
| Retrieves the overlay position. More... | |
| castor::Size & | getPixelSize () |
| Retrieves the overlay size. More... | |
| castor::Position & | getPixelPosition () |
| Retrieves the overlay position. More... | |
| OverlayType | getType () const |
| Retrieves the overlay type. More... | |
| bool | isVisible () const |
| Retrieves the visibility status. More... | |
| MaterialRPtr | getMaterial () const |
| Retrieves the material. More... | |
| int | getIndex () const |
| Retrieves the index. More... | |
| int | getLevel () const |
| Retrieves the level. More... | |
| Overlay const & | getOverlay () const |
| Retrieves the overlay. More... | |
| Overlay & | getOverlay () |
| Retrieves the overlay. More... | |
| void | setOverlay (Overlay *value) |
| Sets the overlay. More... | |
| void | setVisible (bool value) |
| Sets the visibility status. More... | |
| void | setPixelPosition (castor::Position const &value) |
| Sets the overlay position. More... | |
| void | setPixelSize (castor::Size const &value) |
| Sets the overlay size. More... | |
| void | setOrder (int index, int level) |
| Sets the overlay order. More... | |
| void | setUV (castor::Point4d const &value) |
| Sets the overlay UV. More... | |
| castor::Point4d const & | getUV () const |
| Retrieves the overlay UV. More... | |
Protected Member Functions | |
| castor::Point2d | doGetTotalSize (OverlayRenderer const &renderer) const |
| virtual void | doUpdatePosition (OverlayRenderer const &renderer) |
| Updates the overlay position, taking care of wanted pixel position. More... | |
| virtual void | doUpdateSize (OverlayRenderer const &renderer) |
| Updates the overlay size, taking care of wanted pixel size. More... | |
| virtual void | doUpdate (OverlayRenderer const &renderer) |
| Updates the overlay position, size... More... | |
| virtual void | doUpdateBuffer (castor::Size const &size)=0 |
| Updates the vertex buffer. More... | |
Protected Attributes | |
| Overlay * | m_pOverlay { nullptr } |
| castor::Point2d | m_position |
| castor::Point2d | m_ptSize |
| castor::Position | m_pxPosition |
| castor::Size | m_size |
| castor::Size | m_computeSize |
| bool | m_visible { true } |
| MaterialRPtr | m_pMaterial |
| int | m_index { 0 } |
| int | m_level { 0 } |
| castor::String | m_strMatName |
| OverlayType | m_type |
| bool | m_sizeChanged { true } |
| bool | m_positionChanged { true } |
| castor::Point4d | m_uv { 0.0, 0.0, 1.0, 1.0 } |
|
explicit |
Constructor.
| [in] | type | The overlay type |
|
virtual |
Destructor.
|
pure virtual |
Draws the overlay.
Implemented in castor3d::BorderPanelOverlay, castor3d::PanelOverlay, and castor3d::TextOverlay.
|
protected |
|
inlineprotectedvirtual |
Updates the overlay position, size...
|
protectedpure virtual |
Updates the vertex buffer.
| [in] | size | The render target size. |
Implemented in castor3d::BorderPanelOverlay, and castor3d::PanelOverlay.
|
protectedvirtual |
Updates the overlay position, taking care of wanted pixel position.
|
protectedvirtual |
Updates the overlay size, taking care of wanted pixel size.
Reimplemented in castor3d::BorderPanelOverlay.
| C3D_API castor::Point2d castor3d::OverlayCategory::getAbsolutePosition | ( | ) | const |
Retrieves the absolute overlay position.
| C3D_API castor::Position castor3d::OverlayCategory::getAbsolutePosition | ( | castor::Size const & | size | ) | const |
Retrieves the absolute overlay position, in pixels.
| [in] | size | The screen size |
| C3D_API castor::Point2d castor3d::OverlayCategory::getAbsoluteSize | ( | ) | const |
Retrieves the absolute overlay size.
| C3D_API castor::Size castor3d::OverlayCategory::getAbsoluteSize | ( | castor::Size const & | size | ) | const |
Retrieves the absolute overlay size, in pixels.
| [in] | size | The screen size |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| C3D_API castor::String const & castor3d::OverlayCategory::getOverlayName | ( | ) | const |
Retrieves the overlay name.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| C3D_API castor::Point2f castor3d::OverlayCategory::getRenderRatio | ( | castor::Size const & | size | ) | const |
| [in] | size | The render size |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
true if this overlay's has changed. Reimplemented in castor3d::BorderPanelOverlay, and castor3d::TextOverlay.
| C3D_API bool castor3d::OverlayCategory::isPositionChanged | ( | ) | const |
true if this overlay's or one of its parents' position has changed. | C3D_API bool castor3d::OverlayCategory::isSizeChanged | ( | ) | const |
true if this overlay's or one of its parents' size has changed.
|
inline |
|
virtual |
Sets the material.
| [in] | material | The new value |
|
inline |
|
inline |
|
inline |
Sets the overlay position.
| [in] | value | The new value |
References m_positionChanged, and m_pxPosition.
|
inline |
|
inline |
Sets the overlay position.
| [in] | position | The new value |
References m_position, and m_positionChanged.
|
inline |
|
inline |
Sets the overlay UV.
| [in] | value | The new value (left, top, right and bottom) |
References m_uv.
|
inline |
| C3D_API void castor3d::OverlayCategory::update | ( | OverlayRenderer const & | renderer | ) |
Updates the overlay position, size...
|
protected |
The size used to compute relative position from pixel position.
|
protected |
The overlay index.
Referenced by getIndex(), and setOrder().
|
protected |
The overlay level.
Referenced by getLevel(), and setOrder().
|
protected |
The material used by the overlay.
Referenced by getMaterial().
|
protected |
The relative position (to parent or screen).
Referenced by getPosition(), and setPosition().
|
protected |
Tells if this overlay's position has changed.
Referenced by setPixelPosition(), and setPosition().
|
protected |
The overlay.
Referenced by getOverlay(), and setOverlay().
|
protected |
|
protected |
The relative position (to parent or screen), in pixels.
Referenced by getPixelPosition(), and setPixelPosition().
|
protected |
The absolute size in pixels.
Referenced by getPixelSize(), and setPixelSize().
|
protected |
Tells if this overlay's size has changed..
Referenced by setPixelSize(), and setSize().
|
protected |
The material name.
|
protected |
The overlay type.
Referenced by getType().
|
protected |
|
protected |
The visibility.
Referenced by isVisible(), and setVisible().