![]()  | 
  
    Gamedev Framework (gf)
    0.9.0
    
   A C++14 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, const RenderStates &states, Vector2f position, float angle) const =0 | 
| Render the geometry.  More... | |
The geometry of a physics body.
The geometry is defined in model coordinates.
      
  | 
  strong | 
The type of geometry.
| Enumerator | |
|---|---|
| Circle | A circle (see gf::CircleGeometry)  | 
| Polygon | A polygon (see gf::PolygonGeometry)  | 
      
  | 
  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 | 
| states | The render states to use for drawing | 
| position | The position of the geometry | 
| angle | The angle of the geometry | 
Implemented in gf::PolygonGeometry, and gf::CircleGeometry.
 1.8.13