Aether3D Game Engine
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 };
25 
27 class Scene
28 {
29  public:
31  virtual ~Scene() {}
32 
34  virtual void Add( Camera* camera ) = 0;
35 
37  virtual void Add( Light* light ) = 0;
38 
40  virtual void Add( Model* model ) = 0;
41 
43  virtual void Remove( SceneGraphNode* node ) = 0;
44 
46  virtual Camera* GetNonRTCamera() = 0;
47 
54  virtual Material* GetMaterial( const char* name ) = 0;
55 
62  virtual Model* GetModel( const char* name ) = 0;
63 
74  virtual std::list< std::pair< Model*, std::list< std::string > > > GetColliders( int screenX, int screenY, CollisionTest collisionTest, float maxDepth ) const = 0;
75 
85  virtual std::list< std::pair< Model*, std::list< std::string > > > GetColliders( const Vec3& aabbMin, const Vec3& aabbMax, CollisionTest collisionTest ) const = 0;
86 
93  virtual bool LoadFromFile( const std::string& path ) = 0;
94 
100  virtual bool SaveToFile( const char* path ) = 0;
101 
103  virtual SceneGraphNode& RootNode() = 0;
104 
106  virtual void SetSkybox( const Texture* cubeMap ) = 0;
107 
114  virtual void OnNodeAdded( SceneGraphNode* node ) = 0;
115 };
116 
117 #endif
Contains meshes loaded from Aether3D&#39;s own .ae3d file format.
Definition: Model.hpp:21
Light.
Definition: Light.hpp:11
virtual ~Scene()
Definition: Scene.hpp:31
Perspective or orthographic camera.
Definition: Camera.hpp:12
Stores material properties for Mesh. Their names/values are directly mapped into shader uniforms...
Definition: Material.hpp:19
Stores scene in a scene graph.
Definition: Scene.hpp:27
3-component vector.
Definition: Vec3.hpp:22
Scene Graph Node. Models, Lights and Cameras are derived from this class.
Definition: SceneGraphNode.hpp:28
2D or Cube Map texture.
Definition: Texture.hpp:7