![]() |
Gamedev Framework (gf)
0.4.0
A C++11 framework for 2D games
|
The geometry of a physics body. More...
#include <gf/PhysicsGeometry.h>

Public Types | |
| enum | Type { Type::Circle, Type::Polygon } |
| The type of geometry. More... | |
Public Member Functions | |
| PhysicsGeometry (Type type) | |
| Constructor. More... | |
| virtual | ~PhysicsGeometry () |
| Destructor. More... | |
| Type | getType () const |
| Get the type of the geometry. More... | |
| virtual float | getArea () const =0 |
| Compute the area of the geometry. More... | |
| virtual CircF | getBoundingCircle () const =0 |
| Get a bouding circle. More... | |
| virtual void | renderAt (RenderTarget &target, Vector2f position, float angle) const =0 |
| Render the geometry. More... | |
The geometry of a physics body.
The geometry is defined in model coordinates.
|
inline |
Constructor.
| type | The type of the geometry |
|
virtual |
Destructor.
|
pure virtual |
Compute the area of the geometry.
Implemented in gf::PolygonGeometry, and gf::CircleGeometry.
|
pure virtual |
Get a bouding circle.
The circle may not be the minimum bouding circle.
Implemented in gf::PolygonGeometry, and gf::CircleGeometry.
|
inline |
Get the type of the geometry.
|
pure virtual |
Render the geometry.
| target | The render target |
| position | The position of the geometry |
| angle | The angle of the geometry |
Implemented in gf::PolygonGeometry, and gf::CircleGeometry.
1.8.8