Aether3D
Game Engine
Include
Scene.hpp
1
#ifndef SCENE_H
2
#define SCENE_H
3
4
#ifndef INCLUDE_STRING_H
5
# include <string>
6
# define INCLUDE_STRING_H
7
#endif
8
#ifndef INCLUDE_LIST_H
9
# include <list>
10
# define INCLUDE_LIST_H
11
#endif
12
13
class
Camera
;
14
class
Light
;
15
class
Material
;
16
class
Model
;
17
class
Texture
;
18
class
SceneGraphNode
;
19
struct
Vec3
;
20
21
enum class
CollisionTest
22
{
23
AABB,
24
Triangles
25
};
26
28
class
Scene
29
{
30
public
:
32
virtual
~Scene
() {}
33
35
virtual
void
Add
(
Camera
* camera ) = 0;
36
38
virtual
void
Add
(
Light
* light ) = 0;
39
41
virtual
void
Add
(
Model
* model ) = 0;
42
44
virtual
void
Remove
(
SceneGraphNode
* node ) = 0;
45
47
virtual
Camera
*
GetNonRTCamera
() = 0;
48
55
virtual
Material
*
GetMaterial
(
const
char
* name ) = 0;
56
63
virtual
Model
*
GetModel
(
const
char
* name ) = 0;
64
75
virtual
std::list< std::pair< Model*, std::list< std::string > > >
GetColliders
(
int
screenX,
int
screenY, CollisionTest collisionTest,
float
maxDepth )
const
= 0;
76
86
virtual
std::list< std::pair< Model*, std::list< std::string > > >
GetColliders
(
const
Vec3
& aabbMin,
const
Vec3
& aabbMax, CollisionTest collisionTest )
const
= 0;
87
94
virtual
bool
LoadFromFile
(
const
char
* path ) = 0;
95
101
virtual
bool
SaveToFile
(
const
char
* path ) = 0;
102
104
virtual
SceneGraphNode
&
RootNode
() = 0;
105
107
virtual
void
SetSkybox
(
const
Texture
* cubeMap ) = 0;
108
115
virtual
void
OnNodeAdded
(
SceneGraphNode
* node ) = 0;
116
};
117
118
#endif
Scene
Stores scene in a scene graph.
Definition:
Scene.hpp:28
Scene::OnNodeAdded
virtual void OnNodeAdded(SceneGraphNode *node)=0
Scene::Remove
virtual void Remove(SceneGraphNode *node)=0
Camera
Perspective or orthographic camera.
Definition:
Camera.hpp:12
Scene::SaveToFile
virtual bool SaveToFile(const char *path)=0
Scene::GetModel
virtual Model * GetModel(const char *name)=0
Material
Stores material properties for Mesh. Their names/values are directly mapped into shader uniforms.
Definition:
Material.hpp:19
Scene::SetSkybox
virtual void SetSkybox(const Texture *cubeMap)=0
Texture
2D or Cube Map texture.
Definition:
Texture.hpp:7
Light
Light.
Definition:
Light.hpp:11
Scene::~Scene
virtual ~Scene()
Definition:
Scene.hpp:32
Vec3
3-component vector.
Definition:
Vec3.hpp:22
Scene::Add
virtual void Add(Camera *camera)=0
Scene::RootNode
virtual SceneGraphNode & RootNode()=0
Model
Contains meshes loaded from Aether3D's own .ae3d file format.
Definition:
Model.hpp:21
Scene::GetColliders
virtual std::list< std::pair< Model *, std::list< std::string > > > GetColliders(int screenX, int screenY, CollisionTest collisionTest, float maxDepth) const =0
Scene::LoadFromFile
virtual bool LoadFromFile(const char *path)=0
SceneGraphNode
Scene Graph Node. Models, Lights and Cameras are derived from this class.
Definition:
SceneGraphNode.hpp:28
Scene::GetNonRTCamera
virtual Camera * GetNonRTCamera()=0
Scene::GetMaterial
virtual Material * GetMaterial(const char *name)=0
Generated on Sun Dec 13 2020 10:31:15 for Aether3D by
1.8.17