Tramway SDK
light.h
Go to the documentation of this file.
1// Tramway Drifting and Dungeon Exploration Simulator SDK Runtime
2
3#ifndef TRAM_SDK_ENTITIES_LIGHT_H
4#define TRAM_SDK_ENTITIES_LIGHT_H
5
6#include <framework/entity.h>
9
10namespace tram {
11
12class LightComponent;
13
14class Light : public Entity {
15public:
16 Light(const SharedEntityData&, const ValueArray&);
17 void UpdateParameters();
18 void SetParameters();
19 void Load();
20 void Unload();
21 void Serialize();
22 void MessageHandler(Message& msg);
24 static void Register();
25protected:
27
29 float distance;
31 float exponent;
32};
33
34}
35
36#endif // TRAM_SDK_ENTITIES_LIGHT_H
Wrapper for an EntityComponent pointer.
Definition: entitycomponent.h:51
Entity base class.
Definition: entity.h:23
LightComponent wrapper.
Definition: light.h:14
float exponent
Definition: light.h:31
void Unload()
Unloads an entity.
Definition: light.cpp:72
void Serialize()
Definition: light.cpp:80
void SetParameters()
Called when either Entity::SetLocation or Entity::SetRotation is called.
Definition: light.cpp:55
float distance
Definition: light.h:29
static void Register()
Definition: light.cpp:25
name_t GetType()
Returns the type of the entity.
Definition: light.cpp:39
vec3 direction
Definition: light.h:30
void MessageHandler(Message &msg)
Allows entities to receive messages.
Definition: light.cpp:91
vec3 color
Definition: light.h:28
Light(const SharedEntityData &, const ValueArray &)
Definition: light.cpp:43
void UpdateParameters()
Called when Entity::UpdateTransform is called.
Definition: light.cpp:50
Component< LightComponent > light
Definition: light.h:26
void Load()
Loads an entity.
Definition: light.cpp:59
Definition: value.h:314
Serialization, i.e.
glm::vec3 vec3
Definition: math.h:11
Message data.
Definition: message.h:16
Basic Entity parameters.
Definition: entity.h:132
Interned string type.
Definition: uid.h:10