1 #ifndef GF_PHYSICS_MODEL_H 2 #define GF_PHYSICS_MODEL_H 10 #ifndef DOXYGEN_SHOULD_SKIP_THIS 72 std::vector<PhysicsBody*> m_staticBodies;
73 std::vector<PhysicsBody*> m_dynamicBodies;
76 #ifndef DOXYGEN_SHOULD_SKIP_THIS void clear()
Remove all bodies from the simulation.
A physics body.
Definition: PhysicsBody.h:36
Represents a time value.
Definition: Time.h:73
A game object that can be updated.
Definition: Model.h:46
PhysicsModel(Vector2f gravity={ 0.0f, 0.0f })
Constructor.
void setGravity(Vector2f gravity) noexcept
Set the gravity of the simulation.
Definition: PhysicsModel.h:36
The namespace for gf classes.
Definition: Action.h:34
A model for physics simulation.
Definition: PhysicsModel.h:22
void addBody(PhysicsBody &body)
Add a body to the simulation.
Vector2f getGravity() const noexcept
Get the gravity of the simulation.
Definition: PhysicsModel.h:45
#define GF_API
Definition: Portability.h:35
void removeBody(PhysicsBody &body)
Remove a body from the simulation.
virtual void update(Time time) override
Update the model's state.