This component houses the "engine-specific" parts of its entity. More...
#include "CompGameEntity.hpp"
Public Member Functions | |
CompGameEntityT (StaticEntityDataT *SED=NULL) | |
The constructor. More... | |
CompGameEntityT (const CompGameEntityT &Comp) | |
The copy constructor. More... | |
~CompGameEntityT () | |
The destructor. More... | |
const StaticEntityDataT * | GetStaticEntityData () const |
StaticEntityDataT * | GetStaticEntityData () |
CompGameEntityT * | Clone () const |
The virtual copy constructor. More... | |
const char * | GetName () const |
Returns the name of this component. More... | |
void | UpdateDependencies (cf::GameSys::EntityT *Entity) |
This method is called whenever something "external" to this component has changed: More... | |
BoundingBox3fT | GetCullingBB () const |
This method returns a bounding-box that encloses the visual representation of this component. More... | |
const cf::ClipSys::ClipModelT * | GetClipModel () override |
This method returns the clip model of this component, if any. More... | |
![]() | |
ComponentBaseT () | |
The constructor. More... | |
ComponentBaseT (const ComponentBaseT &Comp) | |
The copy constructor. More... | |
virtual | ~ComponentBaseT () |
The virtual destructor. More... | |
EntityT * | GetEntity () const |
Returns the parent entity that contains this component, or NULL if this component is currently not a part of any entity. More... | |
TypeSys::VarManT & | GetMemberVars () |
Returns the variable manager that keeps generic references to our member variables, providing a simple kind of "reflection" or "type introspection" feature. More... | |
template<class T > | |
void | SetMember (const char *Name, const T &Value) |
Sets the member variable with the given name to the given value. More... | |
ArrayT< ApproxBaseT * > & | GetInterpolators () |
Returns the interpolators that have been registered with this component. More... | |
bool | InitClientApprox (const char *VarName) |
Registers the member variable with the given name for interpolation over client frames in order to bridge the larger intervals between server frames. More... | |
void | Serialize (cf::Network::OutStreamT &Stream) const |
Writes the current state of this component into the given stream. More... | |
void | Deserialize (cf::Network::InStreamT &Stream, bool IsIniting) |
Reads the state of this component from the given stream, and updates the component accordingly. More... | |
bool | CallLuaMethod (const char *MethodName, int NumExtraArgs, const char *Signature="",...) |
Calls the given Lua method of this component. More... | |
virtual unsigned int | GetEditorColor () const |
Returns a color that the Map Editor can use to render the representation of this component's entity. More... | |
virtual BoundingBox3fT | GetEditorBB () const |
Returns a bounding-box that the Map Editor can use to render the representation of this component's entity and for related hit tests in the 2D and 3D views after mouse clicks. More... | |
virtual void | PreCache () |
Initializes any resources that may be needed on the client or server ahead of time. More... | |
virtual bool | Render (bool FirstPersonView, float LodDist) const |
This method implements the graphical output of this component. More... | |
virtual void | PostRender (bool FirstPersonView) |
This method provides an opportunity for another render pass. More... | |
virtual void | OnPostLoad (bool OnlyStatic) |
This method is called after all entities and their components have been loaded. More... | |
virtual bool | OnInputEvent (const CaKeyboardEventT &KE) |
This method handles keyboard input events. More... | |
virtual bool | OnInputEvent (const CaMouseEventT &ME, float PosX, float PosY) |
This method handles mouse input events. More... | |
void | OnServerFrame (float t) |
Advances the component one frame (one "clock-tick") on the server. More... | |
void | OnClientFrame (float t) |
Advances the component one frame (one "clock-tick") on the client. More... | |
virtual const cf::TypeSys::TypeInfoT * | GetType () const |
![]() | |
unsigned int | GetRefCount () const |
Additional Inherited Members | |
![]() | |
static void * | CreateInstance (const cf::TypeSys::CreateParamsT &Params) |
![]() | |
static const cf::TypeSys::TypeInfoT | TypeInfo |
![]() | |
RefCountedT (const RefCountedT &) | |
RefCountedT & | operator= (const RefCountedT &) |
![]() | |
static int | Get (lua_State *LuaState) |
static int | Set (lua_State *LuaState) |
static int | GetExtraMessage (lua_State *LuaState) |
static int | Interpolate (lua_State *LuaState) |
static int | GetEntity (lua_State *LuaState) |
static int | InitClientApprox (lua_State *LuaState) |
static int | toString (lua_State *LuaState) |
![]() | |
static const luaL_Reg | MethodsList [] |
The list of Lua methods for this class. More... | |
static const char * | DocClass |
static const cf::TypeSys::MethsDocT | DocMethods [] |
static const cf::TypeSys::MethsDocT | DocCallbacks [] |
This component houses the "engine-specific" parts of its entity.
It is intended for use by the implementing applications only (map compilers, engine), that is, as the "App" component of cf::GameSys::EntityT
s. It is not intended for use in game scripts. As such, it doesn't integrate with the TypeSys, and thus isn't available for scripting and whereever else we need the related meta-data.
CompGameEntityT::CompGameEntityT | ( | StaticEntityDataT * | SED = NULL | ) |
The constructor.
CompGameEntityT::CompGameEntityT | ( | const CompGameEntityT & | Comp | ) |
The copy constructor.
It creates a new component as a copy of another component.
Comp | The component to copy-construct this component from. |
CompGameEntityT::~CompGameEntityT | ( | ) |
The destructor.
|
virtual |
The virtual copy constructor.
Callers can use this method to create a copy of this component without knowing its concrete type. Overrides in derived classes use a covariant return type to facilitate use when the concrete type is known. The newly cloned component is initially not a part of any entity, even if the source component was.
Reimplemented from cf::GameSys::ComponentBaseT.
|
inlineoverridevirtual |
This method returns the clip model of this component, if any.
Reimplemented from cf::GameSys::ComponentBaseT.
|
virtual |
This method returns a bounding-box that encloses the visual representation of this component.
It is used to determine if the entity is in the view-frustum of a camera, how large a region must be updated in the 2D views of a Map Editor, if the entity is in the potentially-visibility-set (PVS) of another entity, and similar purposes.
The returned bounding-box is in local space, i.e. typically centered around the origin (0, 0, 0). If the component doesn't have a visual representation, the returned bounding-box may be uninitialized (!IsInited()
). Also see EntityT::GetCullingBB() for additional details.
Reimplemented from cf::GameSys::ComponentBaseT.
|
inlinevirtual |
Returns the name of this component.
Reimplemented from cf::GameSys::ComponentBaseT.
|
virtual |
This method is called whenever something "external" to this component has changed:
Entity | The parent entity that contains this component, or NULL to indicate that this component is removed from the entity that it used to be a part of. |
Reimplemented from cf::GameSys::ComponentBaseT.