Collision Namespace Reference


Detailed Description

This namespace collects all needed collision detection functions.


Functions

bool circleWithCirclesector (const Point &circlePos, int circleRadius, const Point &secPos, int secRadius, float secAngle, float secSize)
bool diskWithCircleSector (const Point &diskCenter, int diskRadius, const Point &sectorCenter, int sectorRadius, int halfTopAngle, int placeAngle)
 Checks if a disk and a circle-sector collide.


Function Documentation

bool Collision::circleWithCirclesector const Point circlePos,
int  circleRadius,
const Point secPos,
int  secRadius,
float  secAngle,
float  secSize
 

Definition at line 31 of file collisiondetection.cpp.

bool Collision::diskWithCircleSector const Point diskCenter,
int  diskRadius,
const Point sectorCenter,
int  sectorRadius,
int  halfTopAngle,
int  placeAngle
 

Checks if a disk and a circle-sector collide.

For a detailled explanation of this function please see: http://wiki.themanaworld.org/index.php/Collision_determination

This bounding circle implementation can be used up and until a half-top-angle of +/- 85 degrees. The bounding circle becomes infinitly large at 90 degrees. Above about 60 degrees a bounding half-circle with radius R becomes more efficient. (The additional check for a region 1 collision can then be scrapped.)

Definition at line 87 of file collisiondetection.cpp.


Generated on Fri Mar 30 15:39:19 2007 for TMW Server by  doxygen 1.3.9.1