Basic unit of simulation. More...
#include <space.hpp>
Classes | |
struct | SegmentQueryData |
Public Member Functions | |
operator cpSpace * () | |
void | add (std::shared_ptr< Shape >) |
void | add (std::shared_ptr< Body >) |
void | remove (std::shared_ptr< Shape >) |
void | remove (std::shared_ptr< Body >) |
Vect | getGravity () const |
void | setGravity (const Vect &) |
void | step (Float) |
void | segmentQuery (Vect a, Vect b, Layers, Group, SegmentQueryFunc) const |
std::shared_ptr< Shape > | segmentQueryFirst (Vect a, Vect b, Layers, Group, SegmentQueryInfo *=nullptr) const |
std::shared_ptr< Shape > | pointQueryFirst (Vect p, Layers, Group) const |
Public Attributes | |
std::shared_ptr< Body > | staticBody |
Basic unit of simulation.
Vect cp::Space::getGravity | ( | ) | const |
Global gravity applied to the space. Defaults to cp::Vect(0, 0). Can be overridden on a per body basis by writing custom integration functions.