Gamedev Framework (gf)  0.2.0
A C++11 framework for 2D games
Public Attributes | Related Functions | List of all members
gf::Manifold Struct Reference

Data about the collision between two objects. More...

#include <gf/Collision.h>

Public Attributes

Vector2f normal
 Collision normal. More...
 
float penetration
 Penetration depth. More...
 

Related Functions

(Note that these are not member functions.)

bool collides (const CircF &lhs, const CircF &rhs, Manifold &m)
 Check if two circles collides. More...
 
bool collides (const RectF &lhs, const CircF &rhs, Manifold &m)
 Check if a rectangle collides with a circle. More...
 
bool collides (const CircF &lhs, const RectF &rhs, Manifold &m)
 Check if a circle collides with a rectangle. More...
 
bool collides (const RectF &lhs, const RectF &rhs, Manifold &m)
 Check if two rectangles collides. More...
 

Detailed Description

Data about the collision between two objects.

See also
How to Create a Custom Physics Engine

Friends And Related Function Documentation

bool collides ( const CircF lhs,
const CircF rhs,
Manifold m 
)
related

Check if two circles collides.

Parameters
lhsFirst circle
rhsSecond circle
mData to fill if there is a collision
Returns
True if there is a collision
bool collides ( const RectF lhs,
const CircF rhs,
Manifold m 
)
related

Check if a rectangle collides with a circle.

Parameters
lhsThe rectangle
rhsThe circle
mData to fill if there is a collision
Returns
True if there is a collision
bool collides ( const CircF lhs,
const RectF rhs,
Manifold m 
)
related

Check if a circle collides with a rectangle.

Parameters
lhsThe circle
rhsThe rectangle
mData to fill if there is a collision
Returns
True if there is a collision
bool collides ( const RectF lhs,
const RectF rhs,
Manifold m 
)
related

Check if two rectangles collides.

Parameters
lhsFirst rectangle
rhsSecond rectangle
mData to fill if there is a collision
Returns
True if there is a collision

Member Data Documentation

Vector2f gf::Manifold::normal

Collision normal.

float gf::Manifold::penetration

Penetration depth.