#include <Scene.hpp>
Definition at line 66 of file Scene.hpp.
jop::Scene::Scene |
( |
const std::string & |
ID | ) |
|
virtual jop::Scene::~Scene |
( |
| ) |
|
|
virtual |
template<int D>
void jop::Scene::disableWorld |
( |
| ) |
|
Disable a world.
The template argument D must be either 2 or 3. The world will be deleted immediately. You shouldn't need to ever call this in typical situations, but should you, you'll need to ensure that all colliders that exist within the world are destroyed beforehand.
After this call returns, getWorld() will create the world again once called.
- See also
- getWorld()
Object& jop::Scene::getAsObject |
( |
| ) |
|
Get this scene as object.
This can be used to work around the privately inherited jop::Object. Do not ever call this unless you know what you're doing.
- Returns
- Reference to this as Object
const Object& jop::Scene::getAsObject |
( |
| ) |
const |
Get this scene as object.
This can be used to work around the privately inherited jop::Object. Do not ever call this unless you know what you're doing.
- Returns
- Reference to this as Object
float jop::Scene::getDeltaScale |
( |
| ) |
const |
Get the delta time scalar.
- Returns
- The delta time scalar
Renderer& jop::Scene::getRenderer |
( |
| ) |
const |
Get the renderer.
- Returns
- Reference to the renderer
template<int D>
detail::WorldType<D>::type& jop::Scene::getWorld |
( |
| ) |
|
Get the physics world.
The template argument D must be either 2 or 3. If a world hasn't been enabled yet, it will be created by this function.
- Returns
- Reference to the world
jop::Scene::JOP_DISALLOW_COPY_MOVE |
( |
Scene |
| ) |
|
virtual void jop::Scene::postUpdate |
( |
const float |
deltaTime | ) |
|
|
virtual |
Post-update.
This will be called after objects are updated.
- Parameters
-
virtual void jop::Scene::preUpdate |
( |
const float |
deltaTime | ) |
|
|
virtual |
Pre-update.
This will be called before objects are updated.
- Parameters
-
Send a message to this scene.
The message will be forwarded to the objects, should it pass the filter.
- Parameters
-
- Returns
- The message result
void jop::Scene::setDeltaScale |
( |
const float |
scale | ) |
|
Set the delta time scalar.
The delta time value will be multiplied by this value every frame. This makes it possible to create slow-down or fast-forward effects.
- Warning
- The delta scale is allowed to be zero. You should ensure that divisions by zero won't occur because of this.
- Parameters
-
- See also
- Engine::getDeltaTimeUnscaled()
template<typename T , typename... Args>
T& jop::Scene::setRenderer |
( |
Args &&... |
args | ) |
|
Set a new renderer.
- Parameters
-
args | Arguments to pass into the renderer's constructor |
- Returns
- Reference to the newly constructed renderer
void jop::Scene::updateBase |
( |
const float |
deltaTime | ) |
|
template<int D>
bool jop::Scene::worldEnabled |
( |
| ) |
const |
Check if a world is enabled.
The template argument D must be either 2 or 3.
- Returns
- True if world has been enabled
The documentation for this class was generated from the following file: