This component controls the movement of one or more entities and implements the related effects.
More...
|
| ComponentMoverT () |
| The constructor. More...
|
|
| ComponentMoverT (const ComponentMoverT &Comp) |
| The copy constructor. More...
|
|
ComponentMoverT * | Clone () const override |
| The virtual copy constructor. More...
|
|
const char * | GetName () const override |
| Returns the name of this component. More...
|
|
unsigned int | GetEditorColor () const override |
| Returns a color that the Map Editor can use to render the representation of this component's entity. More...
|
|
BoundingBox3fT | GetEditorBB () const override |
| 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...
|
|
const cf::TypeSys::TypeInfoT * | GetType () const override |
|
| 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 void | UpdateDependencies (EntityT *Entity) |
| This method is called whenever something "external" to this component has changed: More...
|
|
virtual BoundingBox3fT | GetCullingBB () const |
| This method returns a bounding-box that encloses the visual representation of this component. More...
|
|
virtual const
cf::ClipSys::ClipModelT * | GetClipModel () |
| This method returns the clip model of this component, if any. 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...
|
|
unsigned int | GetRefCount () const |
|
This component controls the movement of one or more entities and implements the related effects.
The component can handle a single entity, e.g. a moving platform or a lift, or several entities that act together as a team, e.g. the wings of a door.
This component works in concert with a Script component, which must be present in the same entity. The Mover component queries the Script component for the desired spatial transformation of each team member, and notifies it whenever the movement is blocked by another entity (e.g. a player). It also implements the appropriate effects on other entities, e.g. their being pushed by moving parts, or their riding on top of them.
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.
The Map Editor may use the bounding-box of an entity's first component as returned by this method to render the visual representation of the entity.
Note that the returned bounding-box is often smaller than the bounding-box returned by GetCullingBB(), e.g. for light sources (whose radius and thus their indirect effects on other objects it may not cover), for trees (whose trunk it usually covers, but maybe not their crown), or for models (that, when animated, may break the limits of the static bounding-box).
On the other hand, the returned bounding-box may also be larger than the bounding-box returned by GetCullingBB(), e.g. for models that are not initialized. Such models would be "invisible" in the 2D and 3D views of the Map Editor if we didn't return "dummy" bounding-boxes for them so that users can see and work with them.
The returned bounding-box is in local entity space and is always initialized (IsInited() == true
).
Reimplemented from cf::GameSys::ComponentBaseT.