Castor3D 0.16.0
Multiplatform 3D engine
Public Types | Public Member Functions | Static Public Member Functions | 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 Types

enum class  ComputeBindingIdx { eCamera , eOverlays , eVertex }
 

Public Member Functions

C3D_API BorderPanelOverlay ()
 Constructor.
 
C3D_API void accept (OverlayVisitor &visitor) const override
 Draws the overlay.
 
C3D_API uint32_t getCount (bool borders) const
 
C3D_API void setBorderMaterial (MaterialObs material)
 Sets the border material.
 
C3D_API castor::Point4ui getAbsoluteBorderSize (castor::Size const &size) const
 Retrieves the absolute overlay borders size, in pixels.
 
C3D_API castor::Point4d getAbsoluteBorderSize () const
 Retrieves the absolute overlay borders size.
 
C3D_API castor::Point4ui computePixelBorderSize () const
 Retrieves the absolute overlay borders size.
 

Getters.

bool isChanged () const noexcept override
 
double getRelativeLeftBorderSize () const noexcept
 
double getRelativeTopBorderSize () const noexcept
 
double getRelativeRightBorderSize () const noexcept
 
double getRelativeBottomBorderSize () const noexcept
 
castor::Point4d const & getRelativeBorderSize () const noexcept
 
bool hasPixelBorderSize () const noexcept
 
uint32_t getPixelLeftBorderSize () const noexcept
 
uint32_t getPixelTopBorderSize () const noexcept
 
uint32_t getPixelRightBorderSize () const noexcept
 
uint32_t getPixelBottomBorderSize () const noexcept
 
castor::Point4ui const & getPixelBorderSize () const noexcept
 
MaterialObs getBorderMaterial () const noexcept
 
BorderPosition getBorderPosition () const noexcept
 
castor::Point4d const & getBorderOuterUV () const noexcept
 
castor::Point4d const & getBorderInnerUV () const noexcept
 

Mutators.

void setRelativeLeftBorderSize (double size) noexcept
 
void setRelativeTopBorderSize (double size) noexcept
 
void setRelativeRightBorderSize (double size) noexcept
 
void setRelativeBottomBorderSize (double size) noexcept
 
void setRelativeBorderSize (castor::Point4d const &size) noexcept
 
void setPixelLeftBorderSize (uint32_t size) noexcept
 
void setPixelRightBorderSize (uint32_t size) noexcept
 
void setPixelTopBorderSize (uint32_t size) noexcept
 
void setPixelBottomBorderSize (uint32_t size) noexcept
 
void setPixelBorderSize (castor::Point4ui const &size) noexcept
 
void setBorderPosition (BorderPosition position) noexcept
 
void setBorderOuterUV (castor::Point4d const &value) noexcept
 
void setBorderInnerUV (castor::Point4d const &value) noexcept
 
- Public Member Functions inherited from castor3d::OverlayCategory
 CU_DeclareVector (Vertex, Vertex)
 
C3D_API OverlayCategory (OverlayType type)
 Constructor.
 
virtual C3D_API ~OverlayCategory () noexcept=default
 Destructor.
 
C3D_API void update (OverlayRenderer const &renderer)
 Updates the overlay position, size...
 
C3D_API void reset ()
 Marks this cetegory as clean.
 
virtual C3D_API void setMaterial (MaterialObs material)
 Sets the material.
 
C3D_API castor::String const & getOverlayName () const
 Retrieves the overlay name.
 
C3D_API castor::Position getAbsolutePosition (castor::Size const &size) const
 Retrieves the absolute overlay position, in pixels.
 
C3D_API castor::Size getAbsoluteSize (castor::Size const &size) const
 Retrieves the absolute overlay size, in pixels.
 
C3D_API castor::Point2d getRenderRatio (castor::Size const &size) const
 
C3D_API castor::Point2d getAbsolutePosition () const
 Retrieves the absolute overlay position.
 
C3D_API castor::Point2d getAbsoluteSize () const
 Retrieves the absolute overlay size.
 
C3D_API bool isSizeChanged () const
 
C3D_API bool isPositionChanged () const
 
C3D_API castor::Size computePixelSize () const
 Retrieves the overlay size.
 
C3D_API castor::Position computePixelPosition () const
 Retrieves the overlay position.
 
C3D_API castor::Point4d computeScissorRect () const
 Updates the scissor for this overlay.
 
bool hasAnyChange () const noexcept
 
castor::Point4d const & getDisplayRect () const noexcept
 
castor::Point2d const & getRelativeSize () const noexcept
 
castor::Point2d const & getRelativePosition () const noexcept
 
OverlayType getType () const noexcept
 
bool isVisible () const noexcept
 
bool isDisplayable () const noexcept
 
MaterialObs getMaterial () const noexcept
 
uint32_t getIndex () const noexcept
 
uint32_t getLevel () const noexcept
 
Overlay const & getOverlay () const noexcept
 
OverlaygetOverlay () noexcept
 
castor::Point4d const & getUV () const noexcept
 
bool hasPixelPosition () const noexcept
 
bool hasPixelSize () const noexcept
 
castor::Position const & getPixelPosition () const noexcept
 
castor::Size const & getPixelSize () const noexcept
 
void setRelativePosition (castor::Point2d const &value) noexcept
 
void setRelativeSize (castor::Point2d const &value) noexcept
 
void setPixelPosition (castor::Position const &value) noexcept
 
void setPixelSize (castor::Size const &value) noexcept
 
void setOverlay (Overlay *value) noexcept
 
void setVisible (bool value) noexcept
 
void setOrder (uint32_t level, uint32_t index) noexcept
 
void setUV (castor::Point4d const &value) noexcept
 

Static Public Member Functions

static C3D_API OverlayCategoryUPtr create ()
 Creation function, used by the factory.
 
static C3D_API ashes::PipelineShaderStageCreateInfo createProgram (RenderDevice const &device)
 Creates the shader program used to compute the overlay's vertices.
 

Additional Inherited Members

- Protected Member Functions inherited from castor3d::OverlayCategory
C3D_API void updatePosition (OverlayRenderer const &renderer)
 Updates the overlay position, taking care of wanted pixel position.
 
C3D_API void updateSize (OverlayRenderer const &renderer)
 Updates the overlay size, taking care of wanted pixel size.
 
C3D_API void updateClientArea ()
 Updates the overlay size, taking care of wanted pixel size.
 
C3D_API castor::Point2d getParentSize () const
 
C3D_API bool isFullyCropped () const
 
- Protected Attributes inherited from castor3d::OverlayCategory
Overlaym_overlay { nullptr }
 
castor::Point2d m_relPosition
 
castor::Point2d m_relSize
 
std::optional< castor::Positionm_pxPosition
 
std::optional< castor::Sizem_pxSize
 
castor::Size m_computeSize
 
bool m_visible { true }
 
bool m_displayable { false }
 
MaterialObs m_material {}
 
uint32_t m_index { 0 }
 
uint32_t m_level { 0 }
 
OverlayType m_type
 
bool m_sizeChanged { true }
 
bool m_positionChanged { true }
 
castor::Point4d m_uv { 0.0, 0.0, 1.0, 1.0 }
 
castor::Point4d m_displayRect {}
 

Member Enumeration Documentation

◆ ComputeBindingIdx

Enumerator
eCamera 
eOverlays 
eVertex 

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.

◆ computePixelBorderSize()

C3D_API castor::Point4ui castor3d::BorderPanelOverlay::computePixelBorderSize ( ) const

Retrieves the absolute overlay borders size.

Returns
The size

◆ create()

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

Creation function, used by the factory.

Returns
An overlay

◆ createProgram()

static C3D_API ashes::PipelineShaderStageCreateInfo castor3d::BorderPanelOverlay::createProgram ( RenderDevice const & device)
static

Creates the shader program used to compute the overlay's vertices.

Returns
The program.

◆ 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::Point4ui 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
inlinenoexcept

◆ getBorderMaterial()

MaterialObs castor3d::BorderPanelOverlay::getBorderMaterial ( ) const
inlinenoexcept

◆ getBorderOuterUV()

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

◆ getBorderPosition()

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

◆ getCount()

C3D_API uint32_t castor3d::BorderPanelOverlay::getCount ( bool borders) const
Parameters
[in]borderstrue for borders, false for center.
Returns
The vertex count needed for this overlay.

◆ getPixelBorderSize()

castor::Point4ui const & castor3d::BorderPanelOverlay::getPixelBorderSize ( ) const
inlinenoexcept

References CU_Require, and hasPixelBorderSize().

Referenced by getPixelBottomBorderSize(), getPixelLeftBorderSize(), getPixelRightBorderSize(), and getPixelTopBorderSize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPixelBottomBorderSize()

uint32_t castor3d::BorderPanelOverlay::getPixelBottomBorderSize ( ) const
inlinenoexcept

References CU_Require, getPixelBorderSize(), and hasPixelBorderSize().

Here is the call graph for this function:

◆ getPixelLeftBorderSize()

uint32_t castor3d::BorderPanelOverlay::getPixelLeftBorderSize ( ) const
inlinenoexcept

References CU_Require, getPixelBorderSize(), and hasPixelBorderSize().

Here is the call graph for this function:

◆ getPixelRightBorderSize()

uint32_t castor3d::BorderPanelOverlay::getPixelRightBorderSize ( ) const
inlinenoexcept

References CU_Require, getPixelBorderSize(), and hasPixelBorderSize().

Here is the call graph for this function:

◆ getPixelTopBorderSize()

uint32_t castor3d::BorderPanelOverlay::getPixelTopBorderSize ( ) const
inlinenoexcept

References CU_Require, getPixelBorderSize(), and hasPixelBorderSize().

Here is the call graph for this function:

◆ getRelativeBorderSize()

castor::Point4d const & castor3d::BorderPanelOverlay::getRelativeBorderSize ( ) const
inlinenoexcept

◆ getRelativeBottomBorderSize()

double castor3d::BorderPanelOverlay::getRelativeBottomBorderSize ( ) const
inlinenoexcept

◆ getRelativeLeftBorderSize()

double castor3d::BorderPanelOverlay::getRelativeLeftBorderSize ( ) const
inlinenoexcept

◆ getRelativeRightBorderSize()

double castor3d::BorderPanelOverlay::getRelativeRightBorderSize ( ) const
inlinenoexcept

◆ getRelativeTopBorderSize()

double castor3d::BorderPanelOverlay::getRelativeTopBorderSize ( ) const
inlinenoexcept

◆ hasPixelBorderSize()

bool castor3d::BorderPanelOverlay::hasPixelBorderSize ( ) const
inlinenoexcept

◆ isChanged()

bool castor3d::BorderPanelOverlay::isChanged ( ) const
inlineoverridevirtualnoexcept

Reimplemented from castor3d::OverlayCategory.

◆ setBorderInnerUV()

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

◆ setBorderMaterial()

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

Sets the border material.

Parameters
[in]materialThe new value

◆ setBorderOuterUV()

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

◆ setBorderPosition()

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

◆ setPixelBorderSize()

void castor3d::BorderPanelOverlay::setPixelBorderSize ( castor::Point4ui const & size)
inlinenoexcept

◆ setPixelBottomBorderSize()

void castor3d::BorderPanelOverlay::setPixelBottomBorderSize ( uint32_t size)
inlinenoexcept

◆ setPixelLeftBorderSize()

void castor3d::BorderPanelOverlay::setPixelLeftBorderSize ( uint32_t size)
inlinenoexcept

◆ setPixelRightBorderSize()

void castor3d::BorderPanelOverlay::setPixelRightBorderSize ( uint32_t size)
inlinenoexcept

◆ setPixelTopBorderSize()

void castor3d::BorderPanelOverlay::setPixelTopBorderSize ( uint32_t size)
inlinenoexcept

◆ setRelativeBorderSize()

void castor3d::BorderPanelOverlay::setRelativeBorderSize ( castor::Point4d const & size)
inlinenoexcept

◆ setRelativeBottomBorderSize()

void castor3d::BorderPanelOverlay::setRelativeBottomBorderSize ( double size)
inlinenoexcept

◆ setRelativeLeftBorderSize()

void castor3d::BorderPanelOverlay::setRelativeLeftBorderSize ( double size)
inlinenoexcept

◆ setRelativeRightBorderSize()

void castor3d::BorderPanelOverlay::setRelativeRightBorderSize ( double size)
inlinenoexcept

◆ setRelativeTopBorderSize()

void castor3d::BorderPanelOverlay::setRelativeTopBorderSize ( double size)
inlinenoexcept

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