![]() |
Gamedev Framework (gf)
0.4.0
A C++11 framework for 2D games
|
A circle physics geometry. More...
#include <gf/PhysicsGeometry.h>
Public Member Functions | |
CircleGeometry (float radius) | |
Constructor. More... | |
CircleGeometry (CircF circle) | |
Constructor. More... | |
const CircF & | get () const |
Get the circle. More... | |
virtual float | getArea () const override |
Compute the area of the geometry. More... | |
virtual CircF | getBoundingCircle () const override |
Get a bouding circle. More... | |
virtual void | renderAt (RenderTarget &target, Vector2f position, float angle) const override |
Render the geometry. More... | |
![]() | |
PhysicsGeometry (Type type) | |
Constructor. More... | |
virtual | ~PhysicsGeometry () |
Destructor. More... | |
Type | getType () const |
Get the type of the geometry. More... | |
Additional Inherited Members | |
![]() | |
enum | Type { Type::Circle, Type::Polygon } |
The type of geometry. More... | |
A circle physics geometry.
gf::CircleGeometry::CircleGeometry | ( | float | radius | ) |
Constructor.
The geometry is centered in \( (0,0) \)
radius | The radius of the circle |
gf::CircleGeometry::CircleGeometry | ( | CircF | circle | ) |
Constructor.
circle | The base circle |
const CircF& gf::CircleGeometry::get | ( | ) | const |
Get the circle.
|
overridevirtual |
|
overridevirtual |
Get a bouding circle.
The circle may not be the minimum bouding circle.
Implements gf::PhysicsGeometry.
|
overridevirtual |
Render the geometry.
target | The render target |
position | The position of the geometry |
angle | The angle of the geometry |
Implements gf::PhysicsGeometry.