|
StevEngine
StevEngine is a customizable C++ game engine.
|
Container for game objects and scene state. More...
#include <main/Scene.hpp>
Public Member Functions | |
| Utilities::ID | CreateObject () |
| Create empty GameObject. | |
| Utilities::ID | CreateObject (std::string name, Utilities::Vector3 position=Utilities::Vector3(), Utilities::Quaternion rotation=Utilities::Quaternion(), Utilities::Vector3 scale=Utilities::Vector3(1, 1, 1)) |
| Create GameObject with transform. | |
| Utilities::ID | CreateObject (Resources::Resource file, Utilities::StreamType type) |
| Create GameObject from resource file. | |
| Utilities::ID | CreateObject (Utilities::Stream &stream) |
| Create GameObject from serialized data. | |
| bool | Exists (Utilities::ID id) |
| Checks if an object with the specified id exists. | |
| GameObject & | GetObject (Utilities::ID id) |
| Get object by ID. | |
| Visuals::Camera * | GetCamera () |
| Get main camera component. | |
| GameObject & | GetCameraObject () |
| Get camera object. | |
| std::vector< Utilities::ID > | GetAllObjects () |
| Get IDs of all objects in scene. | |
| std::vector< Utilities::ID > | GetAllParentObjects () |
| Get IDs of all root objects (no parent) | |
| void | DestroyObject (Utilities::ID id) |
| Destroy object and all children. | |
| Utilities::Stream | Export (Utilities::StreamType type) |
| Export entire scene. | |
| Scene (std::string name) | |
| Should never be called directly, use SceneManager::CreateScene. | |
| Scene (std::string name, Utilities::Stream &stream) | |
| Should never be called directly, use SceneManager::CreateScene. | |
| Physics::LayerManager & | GetLayers () |
Public Attributes | |
| const std::string | name |
| Scene name/identifier. | |
Friends | |
| class | Engine |
| class | SceneManager |
Container for game objects and scene state.
Manages a collection of GameObjects and their relationships. Handles object creation, destruction and lookup within the scene.
| StevEngine::Scene::Scene | ( | std::string | name | ) |
Should never be called directly, use SceneManager::CreateScene.
Create new scene
| name | Scene identifier |
| StevEngine::Scene::Scene | ( | std::string | name, |
| Utilities::Stream & | stream ) |
Should never be called directly, use SceneManager::CreateScene.
Create scene from serialized data
| name | Name of the scene |
| stream | Stream containing serialized object data |
| ID StevEngine::Scene::CreateObject | ( | ) |
Create empty GameObject.
| Utilities::ID StevEngine::Scene::CreateObject | ( | Resources::Resource | file, |
| Utilities::StreamType | type ) |
Create GameObject from resource file.
| file | Resource containing serialized object data |
| ID StevEngine::Scene::CreateObject | ( | std::string | name, |
| Utilities::Vector3 | position = Utilities::Vector3(), | ||
| Utilities::Quaternion | rotation = Utilities::Quaternion(), | ||
| Utilities::Vector3 | scale = Utilities::Vector3(1, 1, 1) ) |
Create GameObject with transform.
| name | Object name |
| position | Initial position |
| rotation | Initial rotation |
| scale | Initial scale |
| Utilities::ID StevEngine::Scene::CreateObject | ( | Utilities::Stream & | stream | ) |
Create GameObject from serialized data.
| stream | Stream containing serialized object data |
| void StevEngine::Scene::DestroyObject | ( | Utilities::ID | id | ) |
Destroy object and all children.
| id | ID of object to destroy |
| bool StevEngine::Scene::Exists | ( | Utilities::ID | id | ) |
Checks if an object with the specified id exists.
| id | Object identifier |
| Utilities::Stream StevEngine::Scene::Export | ( | Utilities::StreamType | type | ) |
Export entire scene.
| type | Type of stream to export to |
| std::vector< ID > StevEngine::Scene::GetAllObjects | ( | ) |
Get IDs of all objects in scene.
| std::vector< ID > StevEngine::Scene::GetAllParentObjects | ( | ) |
Get IDs of all root objects (no parent)
|
inline |
Get main camera component.
|
inline |
Get camera object.
| GameObject & StevEngine::Scene::GetObject | ( | Utilities::ID | id | ) |
Get object by ID.
| id | Object identifier |