Castor3D 0.12.0
Multiplatform 3D engine
Classes | Public Member Functions | Static Public Member Functions | List of all members
castor3d::TextOverlay Class Reference

#include <TextOverlay.hpp>

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

Classes

struct  Vertex
 Holds specific vertex data for a TextOverlay. More...
 

Public Member Functions

 CU_DeclareVector (Vertex, Vertex)
 
 CU_DeclareMap (char32_t, castor::Position, GlyphPosition)
 
C3D_API TextOverlay ()
 Constructor. More...
 
C3D_API void accept (OverlayVisitor &visitor) const override
 Draws the overlay. More...
 
C3D_API void setFont (castor::String const &value)
 Sets the text font. More...
 
castor::String const & getFontName () const
 Retrieves the font name. More...
 
bool isChanged () const override
 
FontTextureSPtr getFontTexture () const
 
bool isFontChanged () const
 
VertexArray const & getTextVertex () const
 Retrieves the panel vertex buffer. More...
 
castor::String getCaption () const
 Retrieves the overlay text. More...
 
void setCaption (castor::String const &value)
 Sets the overlay text. More...
 
TextWrappingMode getTextWrappingMode () const
 
void setTextWrappingMode (TextWrappingMode value)
 Sets text wrapping mode. More...
 
HAlign getHAlign () const
 
void setHAlign (HAlign value)
 Defines the horizontal alignment. More...
 
VAlign getVAlign () const
 
void setVAlign (VAlign value)
 Defines the vertical alignment. More...
 
TextTexturingMode getTexturingMode () const
 
void setTexturingMode (TextTexturingMode value)
 Defines the text texture mapping mode. More...
 
TextLineSpacingMode getLineSpacingMode () const
 
void setLineSpacingMode (TextLineSpacingMode value)
 Defines the lines spacing mode. 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...
 

Additional Inherited Members

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

◆ TextOverlay()

C3D_API castor3d::TextOverlay::TextOverlay ( )

Constructor.

Member Function Documentation

◆ accept()

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

Draws the overlay.

Implements castor3d::OverlayCategory.

◆ create()

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

Creation function, used by the factory.

Returns
An overlay

◆ CU_DeclareMap()

castor3d::TextOverlay::CU_DeclareMap ( char32_t  ,
castor::Position  ,
GlyphPosition   
)

◆ CU_DeclareVector()

castor3d::TextOverlay::CU_DeclareVector ( Vertex  ,
Vertex   
)

◆ getCaption()

castor::String castor3d::TextOverlay::getCaption ( ) const
inline

Retrieves the overlay text.

Returns
The value

◆ getFontName()

castor::String const & castor3d::TextOverlay::getFontName ( ) const
inline

Retrieves the font name.

Returns
The value.

References getFontTexture().

Here is the call graph for this function:

◆ getFontTexture()

FontTextureSPtr castor3d::TextOverlay::getFontTexture ( ) const
inline
Returns
The FontTexture.

Referenced by getFontName().

Here is the caller graph for this function:

◆ getHAlign()

HAlign castor3d::TextOverlay::getHAlign ( ) const
inline
Returns
The horizontal alignment.

◆ getLineSpacingMode()

TextLineSpacingMode castor3d::TextOverlay::getLineSpacingMode ( ) const
inline
Returns
The lines spacing mode.

◆ getTexturingMode()

TextTexturingMode castor3d::TextOverlay::getTexturingMode ( ) const
inline
Returns
The text texture mapping mode.

◆ getTextVertex()

VertexArray const & castor3d::TextOverlay::getTextVertex ( ) const
inline

Retrieves the panel vertex buffer.

Returns
The buffer

◆ getTextWrappingMode()

TextWrappingMode castor3d::TextOverlay::getTextWrappingMode ( ) const
inline
Returns
The text wrapping mode.

◆ getVAlign()

VAlign castor3d::TextOverlay::getVAlign ( ) const
inline
Returns
The vertical alignment.

◆ isChanged()

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

Reimplemented from castor3d::OverlayCategory.

◆ isFontChanged()

bool castor3d::TextOverlay::isFontChanged ( ) const
inline
Returns
true if this overlay's font has changed.

◆ setCaption()

void castor3d::TextOverlay::setCaption ( castor::String const &  value)
inline

Sets the overlay text.

Parameters
[in]valueThe new value

◆ setFont()

C3D_API void castor3d::TextOverlay::setFont ( castor::String const &  value)

Sets the text font.

Parameters
[in]valueThe new value

◆ setHAlign()

void castor3d::TextOverlay::setHAlign ( HAlign  value)
inline

Defines the horizontal alignment.

Parameters
[in]valueThe new value

◆ setLineSpacingMode()

void castor3d::TextOverlay::setLineSpacingMode ( TextLineSpacingMode  value)
inline

Defines the lines spacing mode.

Parameters
[in]valueThe new value.

◆ setTexturingMode()

void castor3d::TextOverlay::setTexturingMode ( TextTexturingMode  value)
inline

Defines the text texture mapping mode.

Parameters
[in]valueThe new value.

◆ setTextWrappingMode()

void castor3d::TextOverlay::setTextWrappingMode ( TextWrappingMode  value)
inline

Sets text wrapping mode.

Parameters
[in]valueThe new value

◆ setVAlign()

void castor3d::TextOverlay::setVAlign ( VAlign  value)
inline

Defines the vertical alignment.

Parameters
[in]valueThe new value

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