18 #include "precompiled.h"
53 return "<a:component type='system'/><empty/>";
127 if (!cmpPosition || !cmpPosition->
IsInWorld())
135 CVector3D position(transform.GetTranslation());
138 for (
size_t i = 0; i <
m_Sprites.size(); ++i)
149 for (
size_t i = 0; i <
m_Sprites.size(); ++i)
An entity initialisation parameter node.
void SubscribeToMessageType(MessageTypeId mtid)
Subscribe the current component type to the given message type.
std::vector< SOverlaySprite > m_Sprites
#define REGISTER_COMPONENT_TYPE(cname)
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
virtual void Deserialize(const CParamNode ¶mNode, IDeserializer &deserialize)
Serialization interface; see serialization overview.
Class OverlayRenderer: Render various bits of data that overlay the game world (selection circles...
Represents the filename and GL parameters of a texture, for passing to CTextureManager::CreateTexture...
Add renderable objects to the scene collector.
Billboard sprite overlay, with world-space coordinates, rendered on top of all other objects...
virtual CMatrix3D GetInterpolatedTransform(float frameOffset, bool forceFloating)=0
Get the current interpolated transform matrix, for rendering.
static void ClassInit(CComponentManager &componentManager)
void Interpolate(float frameTime, float frameOffset)
virtual bool IsInWorld()=0
Returns true if the entity currently exists at a defined position in the world.
static std::string GetSchema()
float deltaSimTime
Elapsed simulation time since previous interpolate, in seconds.
virtual void Reset()
Delete all sprites that have been previously added.
This interface accepts renderable objects.
CEntityHandle GetEntityHandle() const
virtual void AddSprite(VfsPath textureName, CFixedVector2D corner0, CFixedVector2D corner1, CFixedVector3D position)
Add a new textured billboard sprite to be rendered.
virtual void HandleMessage(const CMessage &msg, bool global)
virtual int GetType() const =0
void RenderSubmit(SceneCollector &collector)
float ToFloat() const
Convert to float. May be lossy - float can't represent all values.
float offset
Range [0, 1] (inclusive); fractional time of current frame between previous/next simulation turns...
#define DEFAULT_COMPONENT_ALLOCATOR(cname)
A simplified syntax for accessing entity components.
SceneCollector & collector
Prepare for rendering a new frame (set up model positions etc).
virtual void Serialize(ISerializer &serialize)
virtual void Submit(CPatch *patch)=0
Submit a terrain patch that is part of the scene.
Interface for rendering 'overlay' objects (typically sprites), automatically positioned relative to t...
Deserialization interface; see serialization overview.
virtual void Init(const CParamNode ¶mNode)
std::vector< CVector3D > m_SpriteOffsets