Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CCmpRangeOverlayRenderer Class Referencefinal
Inheritance diagram for CCmpRangeOverlayRenderer:
Collaboration diagram for CCmpRangeOverlayRenderer:

Classes

struct  RangeOverlayData
 

Public Member Functions

int GetComponentTypeId () const override
 
 CCmpRangeOverlayRenderer ()
 
 ~CCmpRangeOverlayRenderer ()=default
 
void Init (const CParamNode &paramNode) override
 
void Deinit () override
 
void Serialize (ISerializer &serialize) override
 
void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize) override
 
void ResetRangeOverlays () override
 Delete all range overlays. More...
 
void AddRangeOverlay (float radius, const std::string &texture, const std::string &textureMask, float thickness) override
 Add a range overlay to this entity, for example for an aura or attack. More...
 
void HandleMessage (const CMessage &msg, bool global) override
 
virtual void AddRangeOverlay (float radius, const std::string &texture, const std::string &textureMask, float thickness)=0
 Add a range overlay to this entity, for example for an aura or attack. More...
 
virtual void ResetRangeOverlays ()=0
 Delete all range overlays. More...
 
virtual void UpdateColor ()=0
 Updates the overlay color to match the player color. 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 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
 
virtual int GetComponentTypeId () const =0
 

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

Private Member Functions

void UpdateColor () override
 Updates the overlay color to match the player color. More...
 
void UpdateMessageSubscriptions ()
 
void RenderSubmit (SceneCollector &collector, const CFrustum &frustum, bool culling)
 
void UpdateRangeOverlay (RangeOverlayData &rangeOverlay, const float frameOffset)
 

Private Attributes

bool m_LastEnabledState
 
bool m_Enabled
 
const char * TEXTURE_BASE_PATH = "art/textures/selection/"
 
std::vector< RangeOverlayDatam_RangeOverlayData
 
CColor m_Color
 

Additional Inherited Members

- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 

Constructor & Destructor Documentation

◆ CCmpRangeOverlayRenderer()

CCmpRangeOverlayRenderer::CCmpRangeOverlayRenderer ( )
inline

◆ ~CCmpRangeOverlayRenderer()

CCmpRangeOverlayRenderer::~CCmpRangeOverlayRenderer ( )
default

Member Function Documentation

◆ AddRangeOverlay()

void CCmpRangeOverlayRenderer::AddRangeOverlay ( float  radius,
const std::string &  texture,
const std::string &  textureMask,
float  thickness 
)
inlineoverridevirtual

Add a range overlay to this entity, for example for an aura or attack.

Implements ICmpRangeOverlayRenderer.

◆ Allocate()

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

◆ ClassInit()

static void CCmpRangeOverlayRenderer::ClassInit ( CComponentManager componentManager)
inlinestatic

◆ Deallocate()

static void CCmpRangeOverlayRenderer::Deallocate ( IComponent cmp)
inlinestatic

◆ Deinit()

void CCmpRangeOverlayRenderer::Deinit ( )
inlineoverridevirtual

Implements IComponent.

◆ Deserialize()

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

Implements IComponent.

◆ GetComponentTypeId()

int CCmpRangeOverlayRenderer::GetComponentTypeId ( ) const
inlineoverridevirtual

Implements IComponent.

◆ GetSchema()

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

◆ HandleMessage()

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

Reimplemented from IComponent.

◆ Init()

void CCmpRangeOverlayRenderer::Init ( const CParamNode paramNode)
inlineoverridevirtual

Implements IComponent.

◆ RenderSubmit()

void CCmpRangeOverlayRenderer::RenderSubmit ( SceneCollector collector,
const CFrustum frustum,
bool  culling 
)
inlineprivate

◆ ResetRangeOverlays()

void CCmpRangeOverlayRenderer::ResetRangeOverlays ( )
inlineoverridevirtual

Delete all range overlays.

Implements ICmpRangeOverlayRenderer.

◆ Serialize()

void CCmpRangeOverlayRenderer::Serialize ( ISerializer serialize)
inlineoverridevirtual

Implements IComponent.

◆ UpdateColor()

void CCmpRangeOverlayRenderer::UpdateColor ( )
inlineoverrideprivatevirtual

Updates the overlay color to match the player color.

Implements ICmpRangeOverlayRenderer.

◆ UpdateMessageSubscriptions()

void CCmpRangeOverlayRenderer::UpdateMessageSubscriptions ( )
inlineprivate

◆ UpdateRangeOverlay()

void CCmpRangeOverlayRenderer::UpdateRangeOverlay ( RangeOverlayData rangeOverlay,
const float  frameOffset 
)
inlineprivate

Member Data Documentation

◆ m_Color

CColor CCmpRangeOverlayRenderer::m_Color
private

◆ m_Enabled

bool CCmpRangeOverlayRenderer::m_Enabled
private

◆ m_LastEnabledState

bool CCmpRangeOverlayRenderer::m_LastEnabledState
private

◆ m_RangeOverlayData

std::vector<RangeOverlayData> CCmpRangeOverlayRenderer::m_RangeOverlayData
private

◆ TEXTURE_BASE_PATH

const char* CCmpRangeOverlayRenderer::TEXTURE_BASE_PATH = "art/textures/selection/"
private

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