clan::PhysicsWorld Class Reference

Top-level world class. More...

#include <physics_world.h>

Public Member Functions

Construction
 PhysicsWorld ()
 Constructs a null instance. More...
 
 PhysicsWorld (const PhysicsWorldDescription &description)
 Constructs a world. More...
 
 ~PhysicsWorld ()
 
Attributes
Signal_v1< float > & sig_world_step ()
 Signal emitted when world's step is called. More...
 
Signal_v0sig_world_destroyed ()
 Signal emitted when world's destroyed. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
bool is_olm_enabled () const
 Returns true if the Physics world has the object lifetime management enabled. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
std::string get_name () const
 Returns the name of the Physics World. More...
 
double get_timestep () const
 Returns the timestep for every world step. More...
 
int get_velocity_iterations () const
 Returns the amount of velocity iterations on every world tick. More...
 
int get_position_iterations () const
 Returns the amount of position iterations on every world tick. More...
 
int get_physic_scale () const
 Return the amount of pixels for 1 meter in the Physics World. More...
 
PhysicsContextget_pc ()
 Return the Physics Context of the world. More...
 
PhysicsQueryAssistantget_qa ()
 Return the Physics Query Assistant of the world. More...
 
Operations
void set_olm (const bool value=true)
 Sets the object lifetime management. If enabled the physics objects are going to be removed from the Physics Context after the last API object pointing to them cease to exist. More...
 
void step ()
 Simulates one step of the physic simulation. More...
 
void step (float timestep, int velocity_iterations=8, int position_iterations=3)
 Simulates one step of the physic simulation. More...
 

Friends

class Body
 
class BodyDescription
 
class ChainShape
 
class CircleShape
 
class DistanceJointDescription
 
class EdgeShape
 
class Fixture
 
class FixtureDescription
 
class MouseJoint
 
class MouseJointDescription
 
class PhysicsContext
 
class PhysicsDebugDraw
 
class PhysicsQueryAssistant
 
class PhysicsWorld_Impl
 
class PolygonShape
 
class PrismaticJointDescription
 
class RevoluteJointDescription
 

Detailed Description

Top-level world class.

The world class manages all physics entities, dynamic simulation, and asynchronous queries. The world also contains efficient memory management facilities.


The documentation for this class was generated from the following file: