Tramway SDK
scene.h
Go to the documentation of this file.
1// Tramway Drifting and Dungeon Exploration Simulator SDK Runtime
2
3#ifndef TRAM_SDK_RENDER_SCENE_H
4#define TRAM_SDK_RENDER_SCENE_H
5
6#include <framework/math.h>
7#include <render/model.h>
8
9namespace tram {
10 class RenderComponent;
11}
12
13namespace tram::Render {
14 typedef void* aabbleaf_t;
15}
16
17namespace tram::Render::AABB {
18
19enum ReferenceType : uint32_t {
21};
22
25 void* data;
26
29};
30
31aabbleaf_t InsertLeaf(RenderComponent* component, vec3 position, quat rotation, vec3 scale);
32void RemoveLeaf(aabbleaf_t leaf);
33
34QueryResponse FindNearestFromRay(vec3 ray_pos, vec3 ray_dir, uint32_t mask);
35
36void DebugDrawTree();
37
38}
39
41
42void AddLight(light_t light, vec3 pos, float dist);
43void FindLights(vec3 position, light_t* dest);
44void RemoveLight(light_t light);
45
46}
47
48#endif // TRAM_SDK_RENDER_SCENE_H
Renders a Model.
Definition: render.h:12
Definition: scene.cpp:41
void RemoveLeaf(aabbleaf_t leaf_id)
Removes a leaf from.
Definition: scene.cpp:101
ReferenceType
Definition: scene.h:19
@ REFERENCE_RENDERCOMPONENT
Definition: scene.h:20
QueryResponse FindNearestFromRay(vec3 ray_pos, vec3 ray_dir, uint32_t mask)
Peforms a raycast and retrieves the nearest object.
Definition: scene.cpp:113
aabbleaf_t InsertLeaf(RenderComponent *component, vec3 position, quat rotation, vec3 scale)
Inserts a RenderComponent leaf into the scene tree.
Definition: scene.cpp:61
void DebugDrawTree()
Draws the scene tree for a single frame.
Definition: scene.cpp:184
Scene light tree.
void AddLight(light_t light, vec3 pos, float dist)
Adds a light to the light tree.
Definition: scene.cpp:203
void RemoveLight(light_t light)
Removes a light from the light tree.
Definition: scene.cpp:230
void FindLights(vec3 position, light_t *dest)
Finds the 4 nearest lights to a given position.
Definition: scene.cpp:216
High-level Render system API.
Definition: gui.h:8
void * aabbleaf_t
Definition: scene.h:14
Serialization, i.e.
glm::vec3 vec3
Definition: math.h:11
glm::quat quat
Definition: math.h:12
Definition: scene.h:23
vec3 intersection
Definition: scene.h:27
ReferenceType type
Definition: scene.h:24
AABBTriangle triangle
Definition: scene.h:28
void * data
Definition: scene.h:25
Definition: model.h:13
Definition: render.h:166