Tramway SDK
painis
tram-sdk
src
entities
light.h
Go to the documentation of this file.
1
// TRAMWAY DRIFT AND DUNGEON EXPLORATION SIMULATOR 2022
2
// All rights reserved.
3
4
#ifndef TRAM_SDK_ENTITIES_LIGHT_H
5
#define TRAM_SDK_ENTITIES_LIGHT_H
6
7
#include <
framework/entity.h
>
8
#include <
framework/entitycomponent.h
>
9
#include <
framework/serialization.h
>
10
11
namespace
tram
{
12
13
class
LightComponent;
14
15
class
Light
:
public
Entity
{
16
public
:
17
Light
(
const
SharedEntityData
&,
const
ValueArray
&);
18
void
UpdateParameters
();
19
void
SetParameters
();
20
void
Load
();
21
void
Unload
();
22
void
Serialize
();
23
void
MessageHandler
(
Message
& msg);
24
name_t
GetType
();
25
static
void
Register
();
26
protected
:
27
Component<LightComponent>
light
;
28
29
vec3
color
;
30
float
distance
;
31
vec3
direction
;
32
float
exponent
;
33
};
34
35
}
36
37
#endif
// TRAM_SDK_ENTITIES_LIGHT_H
tram::Component
Wrapper for an EntityComponent pointer.
Definition:
entitycomponent.h:53
tram::Entity
Definition:
entity.h:20
tram::Light
Definition:
light.h:15
tram::Light::exponent
float exponent
Definition:
light.h:32
tram::Light::Unload
void Unload()
Definition:
light.cpp:66
tram::Light::Serialize
void Serialize()
Definition:
light.cpp:74
tram::Light::SetParameters
void SetParameters()
Definition:
light.cpp:49
tram::Light::distance
float distance
Definition:
light.h:30
tram::Light::Register
static void Register()
Definition:
light.cpp:19
tram::Light::GetType
name_t GetType()
Definition:
light.cpp:33
tram::Light::direction
vec3 direction
Definition:
light.h:31
tram::Light::MessageHandler
void MessageHandler(Message &msg)
Definition:
light.cpp:85
tram::Light::color
vec3 color
Definition:
light.h:29
tram::Light::Light
Light(const SharedEntityData &, const ValueArray &)
Definition:
light.cpp:37
tram::Light::UpdateParameters
void UpdateParameters()
Definition:
light.cpp:44
tram::Light::light
Component< LightComponent > light
Definition:
light.h:27
tram::Light::Load
void Load()
Definition:
light.cpp:53
tram::ValueArray
Definition:
value.h:336
entity.h
entitycomponent.h
tram
Definition:
api.h:9
tram::vec3
glm::vec3 vec3
Definition:
math.h:12
serialization.h
tram::Message
Definition:
message.h:16
tram::SharedEntityData
Definition:
entity.cpp:26
tram::UID
Definition:
uid.h:11
Generated by
1.9.2