Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ICmpOverlayRenderer Class Referenceabstract

Interface for rendering 'overlay' objects (typically sprites), automatically positioned relative to the entity. More...

#include <ICmpOverlayRenderer.h>

Inheritance diagram for ICmpOverlayRenderer:
IComponent CCmpOverlayRenderer

Public Member Functions

virtual void Reset ()=0
 Delete all sprites that have been previously added. More...
 
virtual void AddSprite (VfsPath textureName, CFixedVector2D corner0, CFixedVector2D corner1, CFixedVector3D offset)=0
 Add a new textured billboard sprite to be rendered. More...
 
- Public Member Functions inherited from IComponent
virtual ~IComponent ()
 
virtual void Init (const CParamNode &paramNode)=0
 
virtual void Deinit ()=0
 
virtual void HandleMessage (const CMessage &msg, bool global)
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContextGetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual void Serialize (ISerializer &serialize)=0
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)=0
 
virtual JSClass * GetJSClass () const
 
virtual jsval GetJSInstance () const
 

Additional Inherited Members

- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static u8 GetSerializationVersion ()
 

Detailed Description

Interface for rendering 'overlay' objects (typically sprites), automatically positioned relative to the entity.

Usually driven by the StatusBars component.

(TODO: maybe we should add a "category" argument to Reset/AddSprite/etc, so different components can each maintain independent sets of overlays here?)

Definition at line 37 of file ICmpOverlayRenderer.h.

Member Function Documentation

virtual void ICmpOverlayRenderer::AddSprite ( VfsPath  textureName,
CFixedVector2D  corner0,
CFixedVector2D  corner1,
CFixedVector3D  offset 
)
pure virtual

Add a new textured billboard sprite to be rendered.

Parameters
textureNamefilename of texture to render.
corner0,corner1coordinates of sprite's corners, in world-space units oriented with the camera plane, relative to the sprite position.
offsetworld-space offset of sprite position from the entity's base position.

Implemented in CCmpOverlayRenderer.

virtual void ICmpOverlayRenderer::Reset ( )
pure virtual

Delete all sprites that have been previously added.

Implemented in CCmpOverlayRenderer.


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