21 #ifndef GF_PHYSICS_GEOMETRY_H 22 #define GF_PHYSICS_GEOMETRY_H 31 #ifndef DOXYGEN_SHOULD_SKIP_THIS 84 virtual float getArea()
const = 0;
135 const CircF&
get()
const;
137 virtual float getArea()
const override;
182 virtual float getArea()
const override;
187 void computeBoundingCircle();
191 CircF m_boundingCircle;
194 #ifndef DOXYGEN_SHOULD_SKIP_THIS Type
The type of geometry.
Definition: PhysicsGeometry.h:51
virtual CircF getBoundingCircle() const =0
Get a bouding circle.
CircleGeometry(CircF circle)
Constructor.
virtual void renderAt(RenderTarget &target, const RenderStates &states, Vector2f position, float angle) const override
Render the geometry.
Base class for all render targets (window, texture, ...)
Definition: RenderTarget.h:66
A circle physics geometry.
Definition: PhysicsGeometry.h:112
Define the states used for drawing to a RenderTarget.
Definition: RenderStates.h:82
const CircF & get() const
Get the circle.
A polygon physics geometry.
Definition: PhysicsGeometry.h:150
virtual void renderAt(RenderTarget &target, const RenderStates &states, Vector2f position, float angle) const override
Render the geometry.
PhysicsGeometry(Type type)
Constructor.
Definition: PhysicsGeometry.h:61
virtual float getArea() const =0
Compute the area of the geometry.
const Polygon & get() const
Get the polygon.
PolygonGeometry(Polygon polygon)
Constructor.
A polygon (see gf::PolygonGeometry)
virtual CircF getBoundingCircle() const override
Get a bouding circle.
Type getType() const
Get the type of the geometry.
Definition: PhysicsGeometry.h:75
The namespace for gf classes.
Definition: Action.h:34
virtual CircF getBoundingCircle() const override
Get a bouding circle.
virtual float getArea() const override
Compute the area of the geometry.
virtual ~PhysicsGeometry()
Destructor.
virtual void renderAt(RenderTarget &target, const RenderStates &states, Vector2f position, float angle) const =0
Render the geometry.
PolygonGeometry(Vector2f size)
Constructor.
A circle (see gf::CircleGeometry)
A convex polygon.
Definition: Polygon.h:52
PolygonGeometry(RectF rectangle)
Constructor.
CircleGeometry(float radius)
Constructor.
The geometry of a physics body.
Definition: PhysicsGeometry.h:46
#define GF_API
Definition: Portability.h:35
virtual float getArea() const override
Compute the area of the geometry.