22 #ifndef CAFU_GAME_ENTITY_HPP_INCLUDED
23 #define CAFU_GAME_ENTITY_HPP_INCLUDED
25 #include "Math3D/BoundingBox.hpp"
26 #include "Templates/Pointer.hpp"
29 namespace cf {
namespace GameSys {
class GameWorldI; } }
30 namespace cf {
namespace Network {
class InStreamT; } }
31 namespace cf {
namespace Network {
class OutStreamT; } }
32 namespace cf {
namespace TypeSys {
class TypeInfoT; } }
62 virtual void GetBodyOrientation(
unsigned short& h,
unsigned short& p,
unsigned short& b)
const=0;
105 virtual bool GetLightSourceInfo(
unsigned long& DiffuseColor,
unsigned long& SpecularColor,
VectorT& Position,
float& Radius,
bool& CastsShadows)
const=0;
125 virtual void Draw(
bool FirstPersonView,
float LodDist)
const=0;
146 virtual void PostDraw(
float FrameTime,
bool FirstPersonView)=0;
virtual void Serialize(cf::Network::OutStreamT &Stream) const =0
Writes the current state of this entity into the given stream.
virtual void Draw(bool FirstPersonView, float LodDist) const =0
This CLIENT-SIDE function is called by the client in order to get this entity drawn.
This is the interface that the client and server use to access and work with game entities...
Definition: GameEntity.hpp:40
virtual void GetBodyOrientation(unsigned short &h, unsigned short &p, unsigned short &b) const =0
Returns the orientation angles of the entity itself.
virtual void Interpolate(float FrameTime)=0
This CLIENT-SIDE function is called by the client in order to advance all values of this entity that ...
virtual ~GameEntityI()
The virtual destructor.
Definition: GameEntity.hpp:45
virtual bool GetLightSourceInfo(unsigned long &DiffuseColor, unsigned long &SpecularColor, VectorT &Position, float &Radius, bool &CastsShadows) const =0
This CLIENT-SIDE function is called in order to retrieve light source information about this entity...
This class is used for reading data from a StateT instance (deserialization).
Definition: State.hpp:222
virtual const cf::TypeSys::TypeInfoT * GetType() const =0
Returns the proper type info for this entity.
virtual void NotifyLeaveMap()=0
Let the entity know that it is about to be removed from the map.
This class is used for writing data into a StateT instance (serialization).
Definition: State.hpp:96
virtual void Deserialize(cf::Network::InStreamT &Stream, bool IsIniting)=0
Reads the state of this entity from the given stream, and updates the entity accordingly.
virtual void PostDraw(float FrameTime, bool FirstPersonView)=0
This CLIENT-SIDE function is called once per frame, for each entity, after the regular rendering (cal...
virtual const BoundingBox3dT & GetDimensions() const =0
Returns the dimensions of this entity.
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:94
A base class for objects that are reference-counted with IntrusivePtrTs.
Definition: Pointer.hpp:28