Castor3D  ..
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Castor3D::OverlayCategory Class Referenceabstract

Holds specific members for an overlay category. More...

+ Inheritance diagram for Castor3D::OverlayCategory:
+ Collaboration diagram for Castor3D::OverlayCategory:

Classes

class  BinaryParser
 OverlayCategory loader. More...
 
class  TextLoader
 OverlayCategory loader. More...
 
struct  Vertex
 Holds specific vertex data for an Overlay. More...
 

Public Member Functions

 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
 
virtual C3D_API bool IsChanged () 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...
 

Protected Member Functions

Castor::Point2d DoGetTotalSize () const
 
virtual void DoUpdatePosition ()
 Updates the overlay position, taking care of wanted pixel position. More...
 
virtual void DoUpdateSize ()
 Updates the overlay size, taking care of wanted pixel size. More...
 
virtual void DoRender (OverlayRendererSPtr p_renderer)=0
 Draws the overlay. More...
 
virtual void DoUpdate ()
 Updates the overlay position, size... More...
 
virtual void DoUpdateBuffer (Castor::Size const &p_size)=0
 Updates the vertex buffer. More...
 

Protected Attributes

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

Holds specific members for an overlay category.

Author
Sylvain DOREMUS
Date
09/02/2010
Version
0.1

Constructor & Destructor Documentation

◆ OverlayCategory()

C3D_API Castor3D::OverlayCategory::OverlayCategory ( eOVERLAY_TYPE  p_type)

Constructor.

Parameters
[in]p_typeThe overlay type

◆ ~OverlayCategory()

virtual C3D_API Castor3D::OverlayCategory::~OverlayCategory ( )
virtual

Destructor.

Member Function Documentation

◆ DECLARE_VECTOR()

Castor3D::OverlayCategory::DECLARE_VECTOR ( Vertex  ,
Vertex   
)

◆ DoGetTotalSize()

Castor::Point2d Castor3D::OverlayCategory::DoGetTotalSize ( ) const
protected
Returns
The screen or parent's size.

◆ DoRender()

virtual void Castor3D::OverlayCategory::DoRender ( OverlayRendererSPtr  p_renderer)
protectedpure virtual

Draws the overlay.

Parameters
[in]p_rendererThe renderer used to draw this overlay

Implemented in Castor3D::BorderPanelOverlay, and Castor3D::PanelOverlay.

◆ DoUpdate()

virtual void Castor3D::OverlayCategory::DoUpdate ( )
inlineprotectedvirtual

Updates the overlay position, size...

◆ DoUpdateBuffer()

virtual void Castor3D::OverlayCategory::DoUpdateBuffer ( Castor::Size const &  p_size)
protectedpure virtual

Updates the vertex buffer.

Parameters
[in]p_sizeThe render target size.

Implemented in Castor3D::BorderPanelOverlay, and Castor3D::PanelOverlay.

◆ DoUpdatePosition()

virtual void Castor3D::OverlayCategory::DoUpdatePosition ( )
protectedvirtual

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

◆ DoUpdateSize()

virtual void Castor3D::OverlayCategory::DoUpdateSize ( )
protectedvirtual

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

Reimplemented in Castor3D::BorderPanelOverlay.

◆ GetAbsolutePosition() [1/2]

C3D_API Castor::Position Castor3D::OverlayCategory::GetAbsolutePosition ( Castor::Size const &  p_size) const

Retrieves the absolute overlay position, in pixels.

Parameters
[in]p_sizeThe screen size
Returns
The position

◆ GetAbsolutePosition() [2/2]

C3D_API Castor::Point2d Castor3D::OverlayCategory::GetAbsolutePosition ( ) const

Retrieves the absolute overlay position.

Returns
The position

◆ GetAbsoluteSize() [1/2]

C3D_API Castor::Size Castor3D::OverlayCategory::GetAbsoluteSize ( Castor::Size const &  p_size) const

Retrieves the absolute overlay size, in pixels.

Parameters
[in]p_sizeThe screen size
Returns
The size

◆ GetAbsoluteSize() [2/2]

C3D_API Castor::Point2d Castor3D::OverlayCategory::GetAbsoluteSize ( ) const

Retrieves the absolute overlay size.

Returns
The size

◆ GetIndex()

int Castor3D::OverlayCategory::GetIndex ( ) const
inline

Retrieves the index.

Returns
The value

References m_index.

◆ GetLevel()

int Castor3D::OverlayCategory::GetLevel ( ) const
inline

Retrieves the level.

Returns
The value

References m_level.

◆ GetMaterial()

MaterialSPtr Castor3D::OverlayCategory::GetMaterial ( ) const
inline

Retrieves the material.

Returns
The value

References m_pMaterial.

◆ GetOverlay() [1/2]

Overlay const& Castor3D::OverlayCategory::GetOverlay ( ) const
inline

Retrieves the overlay.

Returns
The value

References m_pOverlay.

◆ GetOverlay() [2/2]

Overlay& Castor3D::OverlayCategory::GetOverlay ( )
inline

Retrieves the overlay.

Returns
The value

References m_pOverlay.

◆ GetOverlayName()

C3D_API Castor::String const& Castor3D::OverlayCategory::GetOverlayName ( ) const

Retrieves the overlay name.

Returns
The value

◆ GetPixelPosition() [1/2]

Castor::Position const& Castor3D::OverlayCategory::GetPixelPosition ( ) const
inline

Retrieves the overlay position.

Returns
The value

References m_pxPosition.

◆ GetPixelPosition() [2/2]

Castor::Position& Castor3D::OverlayCategory::GetPixelPosition ( )
inline

Retrieves the overlay position.

Returns
The value

References m_pxPosition.

◆ GetPixelSize() [1/2]

Castor::Size const& Castor3D::OverlayCategory::GetPixelSize ( ) const
inline

Retrieves the overlay size.

Returns
The value

References m_size.

◆ GetPixelSize() [2/2]

Castor::Size& Castor3D::OverlayCategory::GetPixelSize ( )
inline

Retrieves the overlay size.

Returns
The value

References m_size.

◆ GetPosition() [1/2]

Castor::Point2d const& Castor3D::OverlayCategory::GetPosition ( ) const
inline

Retrieves the overlay position.

Returns
The value

References m_position.

◆ GetPosition() [2/2]

Castor::Point2d& Castor3D::OverlayCategory::GetPosition ( )
inline

Retrieves the overlay position.

Returns
The value

References m_position.

◆ GetSize() [1/2]

Castor::Point2d const& Castor3D::OverlayCategory::GetSize ( ) const
inline

Retrieves the overlay size.

Returns
The value

References m_ptSize.

◆ GetSize() [2/2]

Castor::Point2d& Castor3D::OverlayCategory::GetSize ( )
inline

Retrieves the overlay size.

Returns
The value

References m_ptSize.

◆ GetType()

eOVERLAY_TYPE Castor3D::OverlayCategory::GetType ( ) const
inline

Retrieves the overlay type.

Returns
The value

References m_type.

◆ GetUV()

Castor::Point4d const& Castor3D::OverlayCategory::GetUV ( ) const
inline

Retrieves the overlay UV.

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

References m_uv.

◆ IsChanged()

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

Reimplemented in Castor3D::TextOverlay, and Castor3D::BorderPanelOverlay.

◆ IsPositionChanged()

C3D_API bool Castor3D::OverlayCategory::IsPositionChanged ( ) const
Returns
true if this overlay's or one of its parents' position has changed.

◆ IsSizeChanged()

C3D_API bool Castor3D::OverlayCategory::IsSizeChanged ( ) const
Returns
true if this overlay's or one of its parents' size has changed.

◆ IsVisible()

bool Castor3D::OverlayCategory::IsVisible ( ) const
inline

Retrieves the visibility status.

Returns
The value

References m_visible.

◆ Render()

C3D_API void Castor3D::OverlayCategory::Render ( )

Draws the overlay.

◆ SetMaterial()

virtual C3D_API void Castor3D::OverlayCategory::SetMaterial ( MaterialSPtr  p_pMaterial)
virtual

Sets the material.

Parameters
[in]p_pMaterialThe new value

◆ SetOrder()

void Castor3D::OverlayCategory::SetOrder ( int  p_index,
int  p_level 
)
inline

Sets the overlay order.

Parameters
[in]p_indexThe new index
[in]p_levelThe new level

References m_index, and m_level.

◆ SetOverlay()

void Castor3D::OverlayCategory::SetOverlay ( Overlay val)
inline

Sets the overlay.

Parameters
[in]valThe new value

References m_pOverlay.

◆ SetPixelPosition()

void Castor3D::OverlayCategory::SetPixelPosition ( Castor::Position const &  val)
inline

Sets the overlay position.

Parameters
[in]valThe new value

References m_positionChanged, and m_pxPosition.

◆ SetPixelSize()

void Castor3D::OverlayCategory::SetPixelSize ( Castor::Size const &  val)
inline

Sets the overlay size.

Parameters
[in]valThe new value

References m_size, and m_sizeChanged.

◆ SetPosition()

void Castor3D::OverlayCategory::SetPosition ( Castor::Point2d const &  p_position)
inline

Sets the overlay position.

Parameters
[in]p_positionThe new value

References m_position, and m_positionChanged.

◆ SetSize()

void Castor3D::OverlayCategory::SetSize ( Castor::Point2d const &  p_size)
inline

Sets the overlay size.

Parameters
[in]p_sizeThe new value

References m_ptSize, and m_sizeChanged.

◆ SetUV()

void Castor3D::OverlayCategory::SetUV ( Castor::Point4d const &  val)
inline

Sets the overlay UV.

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

References m_uv.

◆ SetVisible()

void Castor3D::OverlayCategory::SetVisible ( bool  val)
inline

Sets the visibility status.

Parameters
[in]valThe new value

References m_visible.

◆ Update()

C3D_API void Castor3D::OverlayCategory::Update ( )

Updates the overlay position, size...

Member Data Documentation

◆ m_index

int Castor3D::OverlayCategory::m_index
protected

The overlay index.

Referenced by GetIndex(), and SetOrder().

◆ m_level

int Castor3D::OverlayCategory::m_level
protected

The overlay level.

Referenced by GetLevel(), and SetOrder().

◆ m_pMaterial

MaterialWPtr Castor3D::OverlayCategory::m_pMaterial
protected

The material used by the overlay.

Referenced by GetMaterial().

◆ m_position

Castor::Point2d Castor3D::OverlayCategory::m_position
protected

The relative position (to parent or screen)

Referenced by GetPosition(), and SetPosition().

◆ m_positionChanged

bool Castor3D::OverlayCategory::m_positionChanged
protected

Tells if this overlay's position has changed.

Referenced by SetPixelPosition(), and SetPosition().

◆ m_pOverlay

Overlay* Castor3D::OverlayCategory::m_pOverlay
protected

The overlay.

Referenced by GetOverlay(), and SetOverlay().

◆ m_ptSize

Castor::Point2d Castor3D::OverlayCategory::m_ptSize
protected

The relative size (to parent or screen)

Referenced by GetSize(), and SetSize().

◆ m_pxPosition

Castor::Position Castor3D::OverlayCategory::m_pxPosition
protected

The relative position (to parent or screen), in pixels.

Referenced by GetPixelPosition(), and SetPixelPosition().

◆ m_size

Castor::Size Castor3D::OverlayCategory::m_size
protected

The absolute size in pixels.

Referenced by GetPixelSize(), and SetPixelSize().

◆ m_sizeChanged

bool Castor3D::OverlayCategory::m_sizeChanged
protected

Tells if this overlay's size has changed.

Referenced by SetPixelSize(), and SetSize().

◆ m_strMatName

Castor::String Castor3D::OverlayCategory::m_strMatName
protected

The material name.

◆ m_type

eOVERLAY_TYPE Castor3D::OverlayCategory::m_type
protected

The overlay type.

Referenced by GetType().

◆ m_uv

Castor::Point4d Castor3D::OverlayCategory::m_uv
protected

The UV for the panel.

Referenced by GetUV(), and SetUV().

◆ m_visible

bool Castor3D::OverlayCategory::m_visible
protected

The visibility.

Referenced by IsVisible(), and SetVisible().


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