Class World
Defined in File World.hpp
Inheritance Relationships
Base Type
public Cacao::Resource(Class Resource)
Class Documentation
-
class World : public Cacao::Resource
A collection of entities and a camera comprising an area of gameplay.
Warning
If there are still outstanding references to contained Actors when the destructor is called, it may not be able to prevent memory leaks and the Actor will probably be in a broken state.
Public Functions
-
void MakeToplevel(ActorRef actor)
Make an Actor a toplevel (no parent, at root of world tree)
- Parameters:
actor – The actor to make toplevel
- Throws:
BadValueException – If the actor does not belong to this world
-
std::vector<ActorRef> GetToplevelActors() const
Get a list of actors that are toplevel (have no parent)
Public Members
-
std::shared_ptr<Cubemap> skyboxTex
Cube texture to use as the skybox.
Public Static Functions
-
static inline std::shared_ptr<World> Create(const std::string &addr)
Create a new blank world.
- Parameters:
addr – The resource address to associate with the world
- Throws:
BadValueException – If the address is malformed
-
void MakeToplevel(ActorRef actor)