Castor3D  ..
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Castor3D::BorderPanelOverlay Class Reference

A rectangular overlay with a border. More...

+ Inheritance diagram for Castor3D::BorderPanelOverlay:
+ Collaboration diagram for Castor3D::BorderPanelOverlay:

Classes

class  BinaryParser
 BorderPanelOverlay loader. More...
 
class  TextLoader
 BorderPanelOverlay loader. More...
 

Public Member Functions

C3D_API BorderPanelOverlay ()
 Constructor. More...
 
virtual C3D_API ~BorderPanelOverlay ()
 Destructor. More...
 
C3D_API void SetBorderMaterial (MaterialSPtr p_material)
 Sets the border material. More...
 
C3D_API Castor::Rectangle GetAbsoluteBorderSize (Castor::Size const &p_size) const
 Retrieves the absolute overlay borders size, in pixels. More...
 
C3D_API Castor::Point4d GetAbsoluteBorderSize () const
 Retrieves the absolute overlay borders size. More...
 
virtual C3D_API bool IsChanged () const
 
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...
 
MaterialSPtr GetBorderMaterial () const
 Retrieves the border material. More...
 
void SetLeftBorderSize (double p_size)
 Sets the left border thickness. More...
 
void SetTopBorderSize (double p_size)
 Sets the top border thickness. More...
 
void SetRightBorderSize (double p_size)
 Sets the right border thickness. More...
 
void SetBottomBorderSize (double p_size)
 Sets the bottom border thickness. More...
 
void SetBorderSize (Castor::Point4d const &p_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 p_size)
 Sets the left border thickness. More...
 
void SetTopBorderPixelSize (int p_size)
 Sets the top border thickness. More...
 
void SetRightBorderPixelSize (int p_size)
 Sets the right border thickness. More...
 
void SetBottomBorderPixelSize (int p_size)
 Sets the bottom border thickness. More...
 
void SetBorderPixelSize (Castor::Rectangle const &p_size)
 Sets the borders thicknesses. More...
 
eBORDER_POSITION GetBorderPosition () const
 Retrieves the border position. More...
 
void SetBorderPosition (eBORDER_POSITION p_position)
 Sets the border position. More...
 
OverlayCategory::VertexArray const & GetBorderVertex () const
 Retrieves the borders vertex buffer. More...
 
void SetBorderOuterUV (Castor::Point4d const &p_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 &p_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
 DECLARE_VECTOR (Vertex, Vertex)
 
C3D_API OverlayCategory (eOVERLAY_TYPE p_type)
 Constructor. More...
 
virtual C3D_API ~OverlayCategory ()
 Destructor. More...
 
C3D_API void Update ()
 Updates the overlay position, size... More...
 
C3D_API void Render ()
 Draws the overlay. More...
 
virtual C3D_API void SetMaterial (MaterialSPtr p_pMaterial)
 Sets the material. More...
 
C3D_API Castor::String const & GetOverlayName () const
 Retrieves the overlay name. More...
 
C3D_API Castor::Position GetAbsolutePosition (Castor::Size const &p_size) const
 Retrieves the absolute overlay position, in pixels. More...
 
C3D_API Castor::Size GetAbsoluteSize (Castor::Size const &p_size) const
 Retrieves the absolute overlay size, in pixels. More...
 
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
 
void SetPosition (Castor::Point2d const &p_position)
 Sets the overlay position. More...
 
void SetSize (Castor::Point2d const &p_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...
 
eOVERLAY_TYPE GetType () const
 Retrieves the overlay type. More...
 
bool IsVisible () const
 Retrieves the visibility status. More...
 
MaterialSPtr 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 *val)
 Sets the overlay. More...
 
void SetVisible (bool val)
 Sets the visibility status. More...
 
void SetPixelPosition (Castor::Position const &val)
 Sets the overlay position. More...
 
void SetPixelSize (Castor::Size const &val)
 Sets the overlay size. More...
 
void SetOrder (int p_index, int p_level)
 Sets the overlay order. More...
 
void SetUV (Castor::Point4d const &val)
 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

virtual C3D_API void DoRender (OverlayRendererSPtr p_renderer)
 Draws the overlay. More...
 
virtual C3D_API void DoUpdateBuffer (Castor::Size const &p_size)
 Updates the vertex buffer. More...
 
virtual C3D_API void DoUpdateSize ()
 Updates the overlay size, taking care of wanted pixel size. More...
 
- Protected Member Functions inherited from Castor3D::OverlayCategory
Castor::Point2d DoGetTotalSize () const
 
virtual void DoUpdatePosition ()
 Updates the overlay position, taking care of wanted pixel position. More...
 
virtual void DoUpdate ()
 Updates the overlay position, size... More...
 

Protected Attributes

MaterialWPtr m_pBorderMaterial
 The border material. More...
 
Castor::Point4d m_ptBorderSize
 The border size. More...
 
Castor::Rectangle m_borderSize
 The absolute size in pixels. More...
 
Castor::String m_strBorderMatName
 The border material name. More...
 
eBORDER_POSITION m_borderPosition
 The border material name. More...
 
VertexArray m_arrayVtx
 The vertex buffer data. More...
 
OverlayCategory::VertexArray m_arrayVtxBorder
 The borders vertex buffer data. More...
 
Castor::Point4d m_borderOuterUv
 The UV for the outer part of the border. More...
 
Castor::Point4d m_borderInnerUv
 The UV for the inner part of the border. More...
 
bool m_borderChanged
 Tells if the border has changed, in any way. More...
 
- Protected Attributes inherited from Castor3D::OverlayCategory
Overlaym_pOverlay
 The overlay. More...
 
Castor::Point2d m_position
 The relative position (to parent or screen) More...
 
Castor::Point2d m_ptSize
 The relative size (to parent or screen) More...
 
Castor::Position m_pxPosition
 The relative position (to parent or screen), in pixels. More...
 
Castor::Size m_size
 The absolute size in pixels. More...
 
bool m_visible
 The visibility. More...
 
MaterialWPtr m_pMaterial
 The material used by the overlay. More...
 
int m_index
 The overlay index. More...
 
int m_level
 The overlay level. More...
 
Castor::String m_strMatName
 The material name. More...
 
eOVERLAY_TYPE m_type
 The overlay type. More...
 
bool m_sizeChanged
 Tells if this overlay's size has changed. More...
 
bool m_positionChanged
 Tells if this overlay's position has changed. More...
 
Castor::Point4d m_uv
 The UV for the panel. More...
 

Detailed Description

A rectangular overlay with a border.

Author
Sylvain DOREMUS
Date
25/08/2010
Remarks
Uses a spceific material for the border

Constructor & Destructor Documentation

◆ BorderPanelOverlay()

C3D_API Castor3D::BorderPanelOverlay::BorderPanelOverlay ( )

Constructor.

◆ ~BorderPanelOverlay()

virtual C3D_API Castor3D::BorderPanelOverlay::~BorderPanelOverlay ( )
virtual

Destructor.

Member Function Documentation

◆ Create()

static C3D_API OverlayCategorySPtr Castor3D::BorderPanelOverlay::Create ( )
static

Creation function, used by the factory.

Returns
An overlay

◆ DoRender()

virtual C3D_API void Castor3D::BorderPanelOverlay::DoRender ( OverlayRendererSPtr  p_renderer)
protectedvirtual

Draws the overlay.

Parameters
[in]p_rendererThe renderer used to draw this overlay

Implements Castor3D::OverlayCategory.

◆ DoUpdateBuffer()

virtual C3D_API void Castor3D::BorderPanelOverlay::DoUpdateBuffer ( Castor::Size const &  p_size)
protectedvirtual

Updates the vertex buffer.

Parameters
[in]p_sizeThe render target size.

Implements Castor3D::OverlayCategory.

◆ DoUpdateSize()

virtual C3D_API void Castor3D::BorderPanelOverlay::DoUpdateSize ( )
protectedvirtual

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

Reimplemented from Castor3D::OverlayCategory.

◆ GetAbsoluteBorderSize() [1/2]

C3D_API Castor::Rectangle Castor3D::BorderPanelOverlay::GetAbsoluteBorderSize ( Castor::Size const &  p_size) const

Retrieves the absolute overlay borders size, in pixels.

Parameters
[in]p_sizeThe screen size
Returns
The size

◆ GetAbsoluteBorderSize() [2/2]

C3D_API Castor::Point4d Castor3D::BorderPanelOverlay::GetAbsoluteBorderSize ( ) const

Retrieves the absolute overlay borders 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()

MaterialSPtr 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 const& Castor3D::BorderPanelOverlay::GetBorderPixelSize ( ) const
inline

Retrieves the borders thicknesses.

Returns
The value

References m_borderSize.

◆ GetBorderPixelSize() [2/2]

Castor::Rectangle& Castor3D::BorderPanelOverlay::GetBorderPixelSize ( )
inline

Retrieves the borders thicknesses.

Returns
The value

References m_borderChanged, and m_borderSize.

◆ GetBorderPosition()

eBORDER_POSITION Castor3D::BorderPanelOverlay::GetBorderPosition ( ) const
inline

Retrieves the border position.

Returns
The value

References m_borderPosition.

◆ GetBorderSize() [1/2]

Castor::Point4d const& Castor3D::BorderPanelOverlay::GetBorderSize ( ) const
inline

Retrieves the borders thicknesses.

Returns
The value

References m_ptBorderSize.

◆ GetBorderSize() [2/2]

Castor::Point4d& Castor3D::BorderPanelOverlay::GetBorderSize ( )
inline

Retrieves the borders thicknesses.

Returns
The value

References m_borderChanged, and 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()

virtual C3D_API bool Castor3D::BorderPanelOverlay::IsChanged ( ) const
inlinevirtual
Returns
true if this overlay's has changed.

Reimplemented from Castor3D::OverlayCategory.

References m_borderChanged.

◆ SetBorderInnerUV()

void Castor3D::BorderPanelOverlay::SetBorderInnerUV ( Castor::Point4d const &  p_value)
inline

Sets the borders inner part UV.

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

References m_borderInnerUv.

◆ SetBorderMaterial()

C3D_API void Castor3D::BorderPanelOverlay::SetBorderMaterial ( MaterialSPtr  p_material)

Sets the border material.

Parameters
[in]p_materialThe new value

◆ SetBorderOuterUV()

void Castor3D::BorderPanelOverlay::SetBorderOuterUV ( Castor::Point4d const &  p_value)
inline

Sets the borders outer part UV.

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

References m_borderOuterUv.

◆ SetBorderPixelSize()

void Castor3D::BorderPanelOverlay::SetBorderPixelSize ( Castor::Rectangle const &  p_size)
inline

Sets the borders thicknesses.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_borderSize.

◆ SetBorderPosition()

void Castor3D::BorderPanelOverlay::SetBorderPosition ( eBORDER_POSITION  p_position)
inline

Sets the border position.

Parameters
[in]p_positionThe new value

References m_borderPosition.

◆ SetBorderSize()

void Castor3D::BorderPanelOverlay::SetBorderSize ( Castor::Point4d const &  p_size)
inline

Sets the borders thicknesses.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ SetBottomBorderPixelSize()

void Castor3D::BorderPanelOverlay::SetBottomBorderPixelSize ( int  p_size)
inline

Sets the bottom border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_borderSize.

◆ SetBottomBorderSize()

void Castor3D::BorderPanelOverlay::SetBottomBorderSize ( double  p_size)
inline

Sets the bottom border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ SetLeftBorderPixelSize()

void Castor3D::BorderPanelOverlay::SetLeftBorderPixelSize ( int  p_size)
inline

Sets the left border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_borderSize.

◆ SetLeftBorderSize()

void Castor3D::BorderPanelOverlay::SetLeftBorderSize ( double  p_size)
inline

Sets the left border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ SetRightBorderPixelSize()

void Castor3D::BorderPanelOverlay::SetRightBorderPixelSize ( int  p_size)
inline

Sets the right border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_borderSize.

◆ SetRightBorderSize()

void Castor3D::BorderPanelOverlay::SetRightBorderSize ( double  p_size)
inline

Sets the right border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_ptBorderSize.

◆ SetTopBorderPixelSize()

void Castor3D::BorderPanelOverlay::SetTopBorderPixelSize ( int  p_size)
inline

Sets the top border thickness.

Parameters
[in]p_sizeThe new value

References m_borderChanged, and m_borderSize.

◆ SetTopBorderSize()

void Castor3D::BorderPanelOverlay::SetTopBorderSize ( double  p_size)
inline

Sets the top border thickness.

Parameters
[in]p_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

eBORDER_POSITION Castor3D::BorderPanelOverlay::m_borderPosition
protected

The border material name.

Referenced by GetBorderPosition(), and SetBorderPosition().

◆ m_borderSize

Castor::Rectangle Castor3D::BorderPanelOverlay::m_borderSize
protected

◆ m_pBorderMaterial

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