Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
ICmpUnitRenderer Class Referenceabstract

#include <ICmpUnitRenderer.h>

Inheritance diagram for ICmpUnitRenderer:
Collaboration diagram for ICmpUnitRenderer:

Classes

struct  tag_t
 External identifiers for models. More...
 

Public Types

enum  { ACTOR_ONLY = 1 << 0 , VISIBLE_IN_ATLAS_ONLY = 1 << 1 }
 
- Public Types inherited from IComponent
using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 

Public Member Functions

virtual tag_t AddUnit (CEntityHandle entity, CUnit *unit, const CBoundingSphere &boundsApprox, int flags)=0
 
virtual void RemoveUnit (tag_t tag)=0
 
virtual void UpdateUnit (tag_t tag, CUnit *unit, const CBoundingSphere &boundsApprox)=0
 
virtual void UpdateUnitPos (tag_t tag, bool inWorld, const CVector3D &pos0, const CVector3D &pos1)=0
 
virtual void PickAllEntitiesAtPoint (std::vector< std::pair< CEntityHandle, CVector3D > > &outEntities, const CVector3D &origin, const CVector3D &dir, bool allowEditorSelectables) const =0
 Return a list of visual entities along with their center point. More...
 
virtual float GetFrameOffset () const =0
 Returns the frame offset from the last Interpolate message. More...
 
virtual void SetDebugOverlay (bool enabled)=0
 Toggle the rendering of debug info. 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
 

Additional Inherited Members

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

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ACTOR_ONLY 
VISIBLE_IN_ATLAS_ONLY 

Member Function Documentation

◆ AddUnit()

virtual tag_t ICmpUnitRenderer::AddUnit ( CEntityHandle  entity,
CUnit unit,
const CBoundingSphere boundsApprox,
int  flags 
)
pure virtual

Implemented in CCmpUnitRenderer.

◆ GetFrameOffset()

virtual float ICmpUnitRenderer::GetFrameOffset ( ) const
pure virtual

Returns the frame offset from the last Interpolate message.

Implemented in CCmpUnitRenderer.

◆ PickAllEntitiesAtPoint()

virtual void ICmpUnitRenderer::PickAllEntitiesAtPoint ( std::vector< std::pair< CEntityHandle, CVector3D > > &  outEntities,
const CVector3D origin,
const CVector3D dir,
bool  allowEditorSelectables 
) const
pure virtual

Return a list of visual entities along with their center point.

Visual means they have an associated actor and a visual component, but they could still be hiden in the fog of war for a specific player, for example. NOTE: It's generally faster to do a lot of ray intersection tests than querying a lot of entities for component interfaces and doing these types of tests first.

Implemented in CCmpUnitRenderer.

◆ RemoveUnit()

virtual void ICmpUnitRenderer::RemoveUnit ( tag_t  tag)
pure virtual

Implemented in CCmpUnitRenderer.

◆ SetDebugOverlay()

virtual void ICmpUnitRenderer::SetDebugOverlay ( bool  enabled)
pure virtual

Toggle the rendering of debug info.

Implemented in CCmpUnitRenderer.

◆ UpdateUnit()

virtual void ICmpUnitRenderer::UpdateUnit ( tag_t  tag,
CUnit unit,
const CBoundingSphere boundsApprox 
)
pure virtual

Implemented in CCmpUnitRenderer.

◆ UpdateUnitPos()

virtual void ICmpUnitRenderer::UpdateUnitPos ( tag_t  tag,
bool  inWorld,
const CVector3D pos0,
const CVector3D pos1 
)
pure virtual

Implemented in CCmpUnitRenderer.


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