Pyrogenesis  trunk
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CCmpOverlayRenderer Class Referencefinal
Inheritance diagram for CCmpOverlayRenderer:
Inheritance graph
[legend]
Collaboration diagram for CCmpOverlayRenderer:
Collaboration graph
[legend]

Public Member Functions

int GetComponentTypeId () const override
 
void Init (const CParamNode &paramNode) override
 
void Deinit () override
 
void Serialize (ISerializer &serialize) override
 
void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize) override
 
void HandleMessage (const CMessage &msg, bool global) override
 
void UpdateMessageSubscriptions ()
 
void Reset () override
 Delete all sprites that have been previously added. More...
 
void AddSprite (const VfsPath &textureName, const CFixedVector2D &corner0, const CFixedVector2D &corner1, const CFixedVector3D &position, const std::string &color) override
 Add a new textured billboard sprite to be rendered. More...
 
void Interpolate (float frameTime, float frameOffset)
 
void RenderSubmit (SceneCollector &collector)
 
- Public Member Functions inherited from IComponent
virtual ~IComponent ()
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContextGetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual bool NewJSObject (const ScriptInterface &scriptInterface, JS::MutableHandleObject out) const
 Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More...
 
virtual JS::Value GetJSInstance () const
 

Static Public Member Functions

static void ClassInit (CComponentManager &componentManager)
 
static IComponentAllocate (const ScriptInterface &, JS::HandleValue)
 
static void Deallocate (IComponent *cmp)
 
static std::string GetSchema ()
 
- Static Public Member Functions inherited from ICmpOverlayRenderer
static void SetOverrideVisibility (bool visible)
 Enables or disables rendering of all sprites. More...
 
- Static Public Member Functions inherited from IComponent
static std::string GetSchema ()
 
static void RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static void RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static u8 GetSerializationVersion ()
 

Public Attributes

std::vector< SOverlaySpritem_Sprites
 
std::vector< CVector3Dm_SpriteOffsets
 
bool m_Enabled
 

Additional Inherited Members

- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 
- Static Protected Attributes inherited from ICmpOverlayRenderer
static bool m_OverrideVisible = true
 

Member Function Documentation

◆ AddSprite()

void CCmpOverlayRenderer::AddSprite ( const VfsPath textureName,
const CFixedVector2D corner0,
const CFixedVector2D corner1,
const CFixedVector3D offset,
const std::string &  color 
)
inlineoverridevirtual

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.
colormultiply color of texture

Implements ICmpOverlayRenderer.

◆ Allocate()

static IComponent* CCmpOverlayRenderer::Allocate ( const ScriptInterface ,
JS::HandleValue   
)
inlinestatic

◆ ClassInit()

static void CCmpOverlayRenderer::ClassInit ( CComponentManager componentManager)
inlinestatic

◆ Deallocate()

static void CCmpOverlayRenderer::Deallocate ( IComponent cmp)
inlinestatic

◆ Deinit()

void CCmpOverlayRenderer::Deinit ( )
inlineoverridevirtual

Implements IComponent.

◆ Deserialize()

void CCmpOverlayRenderer::Deserialize ( const CParamNode paramNode,
IDeserializer deserialize 
)
inlineoverridevirtual

Implements IComponent.

◆ GetComponentTypeId()

int CCmpOverlayRenderer::GetComponentTypeId ( ) const
inlineoverridevirtual

Implements IComponent.

◆ GetSchema()

static std::string CCmpOverlayRenderer::GetSchema ( )
inlinestatic

◆ HandleMessage()

void CCmpOverlayRenderer::HandleMessage ( const CMessage msg,
bool  global 
)
inlineoverridevirtual

Reimplemented from IComponent.

◆ Init()

void CCmpOverlayRenderer::Init ( const CParamNode paramNode)
inlineoverridevirtual

Implements IComponent.

◆ Interpolate()

void CCmpOverlayRenderer::Interpolate ( float  frameTime,
float  frameOffset 
)
inline

◆ RenderSubmit()

void CCmpOverlayRenderer::RenderSubmit ( SceneCollector collector)
inline

◆ Reset()

void CCmpOverlayRenderer::Reset ( )
inlineoverridevirtual

Delete all sprites that have been previously added.

Implements ICmpOverlayRenderer.

◆ Serialize()

void CCmpOverlayRenderer::Serialize ( ISerializer serialize)
inlineoverridevirtual

Implements IComponent.

◆ UpdateMessageSubscriptions()

void CCmpOverlayRenderer::UpdateMessageSubscriptions ( )
inline

Member Data Documentation

◆ m_Enabled

bool CCmpOverlayRenderer::m_Enabled

◆ m_SpriteOffsets

std::vector<CVector3D> CCmpOverlayRenderer::m_SpriteOffsets

◆ m_Sprites

std::vector<SOverlaySprite> CCmpOverlayRenderer::m_Sprites

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