Castor3D 0.12.0
Multiplatform 3D engine
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
castor3d::BorderPanelOverlay Class Reference

#include <BorderPanelOverlay.hpp>

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

Public Member Functions

C3D_API BorderPanelOverlay ()
 Constructor. More...
 
C3D_API void accept (OverlayVisitor &visitor) const override
 Draws the overlay. More...
 
C3D_API void setBorderMaterial (MaterialRPtr material)
 Sets the border material. More...
 
C3D_API castor::Rectangle getAbsoluteBorderSize (castor::Size const &size) const
 Retrieves the absolute overlay borders size, in pixels. More...
 
C3D_API castor::Point4d getAbsoluteBorderSize () const
 Retrieves the absolute overlay borders size. More...
 
C3D_API bool isChanged () const override
 
OverlayCategory::VertexArray const & getPanelVertex () const
 Retrieves the panel vertex buffer. More...
 
double getLeftBorderSize () const
 Retrieves the left border thickness. More...
 
double getTopBorderSize () const
 Retrieves the top border thickness. More...
 
double getRightBorderSize () const
 Retrieves the right border thickness. More...
 
double getBottomBorderSize () const
 Retrieves the bottom border thickness. More...
 
castor::Point4d const & getBorderSize () const
 Retrieves the borders thicknesses. More...
 
castor::Point4d & getBorderSize ()
 Retrieves the borders thicknesses. More...
 
MaterialRPtr getBorderMaterial () const
 Retrieves the border material. More...
 
void setLeftBorderSize (double size)
 Sets the left border thickness. More...
 
void setTopBorderSize (double size)
 Sets the top border thickness. More...
 
void setRightBorderSize (double size)
 Sets the right border thickness. More...
 
void setBottomBorderSize (double size)
 Sets the bottom border thickness. More...
 
void setBorderSize (castor::Point4d const &size)
 Sets the borders thicknesses. More...
 
int getLeftBorderPixelSize () const
 Retrieves the left border thickness. More...
 
int getTopBorderPixelSize () const
 Retrieves the top border thickness. More...
 
int getRightBorderPixelSize () const
 Retrieves the right border thickness. More...
 
int getBottomBorderPixelSize () const
 Retrieves the bottom border thickness. More...
 
castor::Rectangle const & getBorderPixelSize () const
 Retrieves the borders thicknesses. More...
 
castor::Rectangle & getBorderPixelSize ()
 Retrieves the borders thicknesses. More...
 
void setLeftBorderPixelSize (int size)
 Sets the left border thickness. More...
 
void setTopBorderPixelSize (int size)
 Sets the top border thickness. More...
 
void setRightBorderPixelSize (int size)
 Sets the right border thickness. More...
 
void setBottomBorderPixelSize (int size)
 Sets the bottom border thickness. More...
 
void setBorderPixelSize (castor::Rectangle const &size)
 Sets the borders thicknesses. More...
 
BorderPosition getBorderPosition () const
 Retrieves the border position. More...
 
void setBorderPosition (BorderPosition position)
 Sets the border position. More...
 
OverlayCategory::VertexArray const & getBorderVertex () const
 Retrieves the borders vertex buffer. More...
 
void setBorderOuterUV (castor::Point4d const &value)
 Sets the borders outer part UV. More...
 
castor::Point4d const & getBorderOuterUV () const
 Retrieves the borders outer part UV. More...
 
void setBorderInnerUV (castor::Point4d const &value)
 Sets the borders inner part UV. More...
 
castor::Point4d const & getBorderInnerUV () const
 Retrieves the borders inner part UV. More...
 
- Public Member Functions inherited from castor3d::OverlayCategory
 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...
 
OverlaygetOverlay ()
 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...
 

Static Public Member Functions

static C3D_API OverlayCategorySPtr create ()
 Creation function, used by the factory. More...
 

Protected Member Functions

C3D_API void doUpdateBuffer (castor::Size const &size) override
 Updates the vertex buffer. More...
 
C3D_API void doUpdateSize (OverlayRenderer const &renderer) override
 Updates the overlay size, taking care of wanted pixel size. More...
 
- Protected Member Functions inherited from castor3d::OverlayCategory
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

MaterialRPtr m_pBorderMaterial
 
castor::Point4d m_ptBorderSize
 
castor::Rectangle m_borderSize
 
castor::String m_strBorderMatName
 
BorderPosition m_borderPosition { BorderPosition::eInternal }
 
VertexArray m_arrayVtx
 
OverlayCategory::VertexArray m_arrayVtxBorder
 
castor::Point4d m_borderOuterUv
 
castor::Point4d m_borderInnerUv
 
bool m_borderChanged
 
- Protected Attributes inherited from castor3d::OverlayCategory
Overlaym_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 }
 

Constructor & Destructor Documentation

◆ BorderPanelOverlay()

C3D_API castor3d::BorderPanelOverlay::BorderPanelOverlay ( )

Constructor.

Member Function Documentation

◆ accept()

C3D_API void castor3d::BorderPanelOverlay::accept ( OverlayVisitor visitor) const
overridevirtual

Draws the overlay.

Implements castor3d::OverlayCategory.

◆ create()

static C3D_API OverlayCategorySPtr castor3d::BorderPanelOverlay::create ( )
static

Creation function, used by the factory.

Returns
An overlay

◆ doUpdateBuffer()

C3D_API void castor3d::BorderPanelOverlay::doUpdateBuffer ( castor::Size const &  size)
overrideprotectedvirtual

Updates the vertex buffer.

Parameters
[in]sizeThe render target size.

Implements castor3d::OverlayCategory.

◆ doUpdateSize()

C3D_API void castor3d::BorderPanelOverlay::doUpdateSize ( OverlayRenderer const &  renderer)
overrideprotectedvirtual

Updates the overlay size, taking care of wanted pixel size.

Reimplemented from castor3d::OverlayCategory.

◆ getAbsoluteBorderSize() [1/2]

C3D_API castor::Point4d castor3d::BorderPanelOverlay::getAbsoluteBorderSize ( ) const

Retrieves the absolute overlay borders size.

Returns
The size

◆ getAbsoluteBorderSize() [2/2]

C3D_API castor::Rectangle castor3d::BorderPanelOverlay::getAbsoluteBorderSize ( castor::Size const &  size) const

Retrieves the absolute overlay borders size, in pixels.

Parameters
[in]sizeThe screen size
Returns
The size

◆ getBorderInnerUV()

castor::Point4d const & castor3d::BorderPanelOverlay::getBorderInnerUV ( ) const
inline

Retrieves the borders inner part UV.

Returns
The value (left, top, right and bottom)

References m_borderInnerUv.

◆ getBorderMaterial()

MaterialRPtr castor3d::BorderPanelOverlay::getBorderMaterial ( ) const
inline

Retrieves the border material.

Returns
The value

References m_pBorderMaterial.

◆ getBorderOuterUV()

castor::Point4d const & castor3d::BorderPanelOverlay::getBorderOuterUV ( ) const
inline

Retrieves the borders outer part UV.

Returns
The value (left, top, right and bottom)

References m_borderOuterUv.

◆ getBorderPixelSize() [1/2]

castor::Rectangle & castor3d::BorderPanelOverlay::getBorderPixelSize ( )
inline

Retrieves the borders thicknesses.

Returns
The value

References m_borderChanged, and m_borderSize.

◆ getBorderPixelSize() [2/2]

castor::Rectangle const & castor3d::BorderPanelOverlay::getBorderPixelSize ( ) const
inline

Retrieves the borders thicknesses.

Returns
The value

References m_borderSize.

◆ getBorderPosition()

BorderPosition castor3d::BorderPanelOverlay::getBorderPosition ( ) const
inline

Retrieves the border position.

Returns
The value

References m_borderPosition.

◆ getBorderSize() [1/2]

castor::Point4d & castor3d::BorderPanelOverlay::getBorderSize ( )
inline

Retrieves the borders thicknesses.

Returns
The value

References m_borderChanged, and m_ptBorderSize.

◆ getBorderSize() [2/2]

castor::Point4d const & castor3d::BorderPanelOverlay::getBorderSize ( ) const
inline

Retrieves the borders thicknesses.

Returns
The value

References m_ptBorderSize.

◆ getBorderVertex()

OverlayCategory::VertexArray const & castor3d::BorderPanelOverlay::getBorderVertex ( ) const
inline

Retrieves the borders vertex buffer.

Returns
The buffer

References m_arrayVtxBorder.

◆ getBottomBorderPixelSize()

int castor3d::BorderPanelOverlay::getBottomBorderPixelSize ( ) const
inline

Retrieves the bottom border thickness.

Returns
The value

References m_borderSize.

◆ getBottomBorderSize()

double castor3d::BorderPanelOverlay::getBottomBorderSize ( ) const
inline

Retrieves the bottom border thickness.

Returns
The value

References m_ptBorderSize.

◆ getLeftBorderPixelSize()

int castor3d::BorderPanelOverlay::getLeftBorderPixelSize ( ) const
inline

Retrieves the left border thickness.

Returns
The value

References m_borderSize.

◆ getLeftBorderSize()

double castor3d::BorderPanelOverlay::getLeftBorderSize ( ) const
inline

Retrieves the left border thickness.

Returns
The value

References m_ptBorderSize.

◆ getPanelVertex()

OverlayCategory::VertexArray const & castor3d::BorderPanelOverlay::getPanelVertex ( ) const
inline

Retrieves the panel vertex buffer.

Returns
The buffer

References m_arrayVtx.

◆ getRightBorderPixelSize()

int castor3d::BorderPanelOverlay::getRightBorderPixelSize ( ) const
inline

Retrieves the right border thickness.

Returns
The value

References m_borderSize.

◆ getRightBorderSize()

double castor3d::BorderPanelOverlay::getRightBorderSize ( ) const
inline

Retrieves the right border thickness.

Returns
The value

References m_ptBorderSize.

◆ getTopBorderPixelSize()

int castor3d::BorderPanelOverlay::getTopBorderPixelSize ( ) const
inline

Retrieves the top border thickness.

Returns
The value

References m_borderSize.

◆ getTopBorderSize()

double castor3d::BorderPanelOverlay::getTopBorderSize ( ) const
inline

Retrieves the top border thickness.

Returns
The value

References m_ptBorderSize.

◆ isChanged()

C3D_API bool castor3d::BorderPanelOverlay::isChanged ( ) const
inlineoverridevirtual
Returns
true if this overlay's has changed.

Reimplemented from castor3d::OverlayCategory.

References m_borderChanged.

◆ setBorderInnerUV()

void castor3d::BorderPanelOverlay::setBorderInnerUV ( castor::Point4d const &  value)
inline

Sets the borders inner part UV.

Parameters
[in]valueThe new value (left, top, right and bottom)

References m_borderInnerUv.

◆ setBorderMaterial()

C3D_API void castor3d::BorderPanelOverlay::setBorderMaterial ( MaterialRPtr  material)

Sets the border material.

Parameters
[in]materialThe new value

◆ setBorderOuterUV()

void castor3d::BorderPanelOverlay::setBorderOuterUV ( castor::Point4d const &  value)
inline

Sets the borders outer part UV.

Parameters
[in]valueThe new value (left, top, right and bottom)

References m_borderOuterUv.

◆ setBorderPixelSize()

void castor3d::BorderPanelOverlay::setBorderPixelSize ( castor::Rectangle const &  size)
inline

Sets the borders thicknesses.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_borderSize.

◆ setBorderPosition()

void castor3d::BorderPanelOverlay::setBorderPosition ( BorderPosition  position)
inline

Sets the border position.

Parameters
[in]positionThe new value

References m_borderPosition.

◆ setBorderSize()

void castor3d::BorderPanelOverlay::setBorderSize ( castor::Point4d const &  size)
inline

Sets the borders thicknesses.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ setBottomBorderPixelSize()

void castor3d::BorderPanelOverlay::setBottomBorderPixelSize ( int  size)
inline

Sets the bottom border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_borderSize.

◆ setBottomBorderSize()

void castor3d::BorderPanelOverlay::setBottomBorderSize ( double  size)
inline

Sets the bottom border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ setLeftBorderPixelSize()

void castor3d::BorderPanelOverlay::setLeftBorderPixelSize ( int  size)
inline

Sets the left border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_borderSize.

◆ setLeftBorderSize()

void castor3d::BorderPanelOverlay::setLeftBorderSize ( double  size)
inline

Sets the left border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ setRightBorderPixelSize()

void castor3d::BorderPanelOverlay::setRightBorderPixelSize ( int  size)
inline

Sets the right border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_borderSize.

◆ setRightBorderSize()

void castor3d::BorderPanelOverlay::setRightBorderSize ( double  size)
inline

Sets the right border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ setTopBorderPixelSize()

void castor3d::BorderPanelOverlay::setTopBorderPixelSize ( int  size)
inline

Sets the top border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_borderSize.

◆ setTopBorderSize()

void castor3d::BorderPanelOverlay::setTopBorderSize ( double  size)
inline

Sets the top border thickness.

Parameters
[in]sizeThe new value

References m_borderChanged, and m_ptBorderSize.

Member Data Documentation

◆ m_arrayVtx

VertexArray castor3d::BorderPanelOverlay::m_arrayVtx
protected

The vertex buffer data.

Referenced by getPanelVertex().

◆ m_arrayVtxBorder

OverlayCategory::VertexArray castor3d::BorderPanelOverlay::m_arrayVtxBorder
protected

The borders vertex buffer data.

Referenced by getBorderVertex().

◆ m_borderChanged

bool castor3d::BorderPanelOverlay::m_borderChanged
protected

◆ m_borderInnerUv

castor::Point4d castor3d::BorderPanelOverlay::m_borderInnerUv
protected

The UV for the inner part of the border.

Referenced by getBorderInnerUV(), and setBorderInnerUV().

◆ m_borderOuterUv

castor::Point4d castor3d::BorderPanelOverlay::m_borderOuterUv
protected

The UV for the outer part of the border.

Referenced by getBorderOuterUV(), and setBorderOuterUV().

◆ m_borderPosition

BorderPosition castor3d::BorderPanelOverlay::m_borderPosition { BorderPosition::eInternal }
protected

The border material name.

Referenced by getBorderPosition(), and setBorderPosition().

◆ m_borderSize

castor::Rectangle castor3d::BorderPanelOverlay::m_borderSize
protected

◆ m_pBorderMaterial

MaterialRPtr castor3d::BorderPanelOverlay::m_pBorderMaterial
protected

The border material.

Referenced by getBorderMaterial().

◆ m_ptBorderSize

castor::Point4d castor3d::BorderPanelOverlay::m_ptBorderSize
protected

◆ m_strBorderMatName

castor::String castor3d::BorderPanelOverlay::m_strBorderMatName
protected

The border material name.


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