Jamie Slowgrove - MGP Assignment 2 - JAM
 All Classes Namespaces Files Functions Variables Macros
Functions
JAM_CollisionDetection Namespace Reference

A Namespace that contains functions for the collision detection. More...

Functions

bool collisionRectRectDetection (JAM_Vec2 positionA, JAM_Vec2 dimensionsA, JAM_Vec2 positionB, JAM_Vec2 dimensionsB)
 
bool collisionCircleCircleDetection (JAM_Vec2 positionA, float radiusA, JAM_Vec2 positionB, float radiusB)
 

Detailed Description

A Namespace that contains functions for the collision detection.

Author
Jamie Slowgrove

Function Documentation

bool JAM_CollisionDetection::collisionCircleCircleDetection ( JAM_Vec2  positionA,
float  radiusA,
JAM_Vec2  positionB,
float  radiusB 
)

CollisionDetection between two circles.

Parameters
positionAThe position of the first circle.
radiusAThe radius of the first circle.
positionBThe position of the second circle.
radiusBThe radius of the second circle.
Returns
If the circles intersect.
bool JAM_CollisionDetection::collisionRectRectDetection ( JAM_Vec2  positionA,
JAM_Vec2  dimensionsA,
JAM_Vec2  positionB,
JAM_Vec2  dimensionsB 
)

CollisionDetection between two rectangles.

Parameters
positionAThe position of the first rectangle.
dimensionsAThe dimensions of the first rectangle.
positionBThe position of the second rectangle.
dimensionsBThe dimensions of the second rectangle.
Returns
If the rectangles intersect.