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

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