4#ifndef TRAM_SDK_FRAMEWORK_ENTITY_H
5#define TRAM_SDK_FRAMEWORK_ENTITY_H
16struct SharedEntityData;
virtual void Serialize()=0
virtual void UpdateParameters()=0
quat rotation
Definition: entity.h:107
id_t id
Definition: entity.h:91
void CheckTransition()
Definition: entity.cpp:81
virtual void Update()
Definition: entity.h:46
void Register()
Definition: entity.cpp:111
bool is_persistent
Definition: entity.h:96
bool IsPersistent() const
Definition: entity.h:40
bool is_serializable
Definition: entity.h:102
SignalTable * signals
Definition: entity.h:105
void UpdateTransform(const vec3 &loc, const quat &rot)
Definition: entity.h:54
bool in_interior
Definition: entity.h:99
static Entity * Make(name_t type, File *file)
Loads an Entity from a File.
Definition: entity.cpp:151
Entity()
Definition: entity.cpp:38
id_t GetID() const
Definition: entity.h:35
bool IsAutoLoad() const
Definition: entity.h:38
bool auto_load
Definition: entity.h:98
void SetPersistent(bool persistent)
Definition: entity.h:49
static void RegisterType(name_t name, Entity *(*constr_func)(const SharedEntityData &, const ValueArray &), void(*destr_func)(Entity *), const uint32_t *fields, size_t fieldcount)
Definition: entity.cpp:97
void SetLocation(vec3 loc)
Definition: entity.h:51
virtual ~Entity()
Definition: entity.cpp:64
const vec3 & GetLocation()
Definition: entity.h:61
SignalTable * GetSignalTable()
Definition: entity.h:84
static void UpdateFromList()
Updates all of the entities in the update list.
Definition: entity.cpp:144
@ FIELD_SERIALIZE
Definition: entity.h:78
bool IsLoaded() const
Definition: entity.h:37
virtual void EventHandler(Event &event)
Definition: entity.h:65
virtual name_t GetType()=0
virtual void MessageHandler(Message &msg)=0
void SetRotation(quat rot)
Definition: entity.h:52
WorldCell * GetCell()
Definition: entity.h:36
vec3 location
Definition: entity.h:108
virtual void SetParameters()=0
void FireSignal(signal_t type)
Definition: entity.h:111
bool IsChanged() const
Definition: entity.h:41
name_t name
Definition: entity.h:92
void SetAutoLoad(bool auto_load)
Definition: entity.h:48
bool is_loaded
Definition: entity.h:97
bool changed
Definition: entity.h:101
WorldCell * cell
Definition: entity.h:104
void AddUpdate()
Adds entity to update list.
Definition: entity.cpp:134
const quat & GetRotation()
Definition: entity.h:62
bool IsInInterior() const
Definition: entity.h:39
void RemoveUpdate()
Remove entity from the update list.
Definition: entity.cpp:139
uint32_t flags
Definition: entity.h:94
static Entity * Find(id_t entity_id)
Definition: entity.cpp:121
void FireSignal(signal_t type, Value value)
Definition: entity.h:112
name_t GetName() const
Definition: entity.h:34
void Fire(signal_t signal, id_t sender)
Definition: signal.cpp:63
Generic, type-safe union.
Definition: value.h:18
Definition: worldcell.h:18
uint32_t id_t
Definition: core.h:11
uint32_t signal_t
Definition: signal.h:13
glm::vec3 vec3
Definition: math.h:12
glm::quat quat
Definition: math.h:13
uint32_t field_type
Definition: entity.h:73
uint32_t field_flags
Definition: entity.h:74
uint32_t field_id
Definition: entity.h:72
Definition: entity.cpp:26