summaryrefslogtreecommitdiff
path: root/src/game-server/collisiondetection.hpp
diff options
context:
space:
mode:
authorRogier Polak <rogier.l.a.polak@gmail.com>2007-03-03 03:32:46 +0000
committerRogier Polak <rogier.l.a.polak@gmail.com>2007-03-03 03:32:46 +0000
commitcdf81ef8e5b25fd8751a92c6ff394c01daedbb88 (patch)
treefb0d4da6fbd31efe6370de1f0c58d8f9db7ac277 /src/game-server/collisiondetection.hpp
parentaf1ce69940a9c0b46907402e7d69e6ac9ea96912 (diff)
downloadmanaserv-cdf81ef8e5b25fd8751a92c6ff394c01daedbb88.tar.gz
manaserv-cdf81ef8e5b25fd8751a92c6ff394c01daedbb88.tar.bz2
manaserv-cdf81ef8e5b25fd8751a92c6ff394c01daedbb88.tar.xz
manaserv-cdf81ef8e5b25fd8751a92c6ff394c01daedbb88.zip
Implemented an alternate collision-detection function, added namespace utils::math.
Diffstat (limited to 'src/game-server/collisiondetection.hpp')
-rw-r--r--src/game-server/collisiondetection.hpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/game-server/collisiondetection.hpp b/src/game-server/collisiondetection.hpp
index 9f5c0fa4..88631031 100644
--- a/src/game-server/collisiondetection.hpp
+++ b/src/game-server/collisiondetection.hpp
@@ -17,18 +17,37 @@
* with The Mana World; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: object.hpp 3098 2007-02-01 20:12:27Z b_lindeijer $
+ * $Id: $
*/
+#ifndef _TMW_COLLISIONDETECTION_H
+#define _TMW_COLLISIONDETECTION_H
+
class Point;
/**
- * This namespace collects all collision detection functions we need
+ * This namespace collects all needed collision detection functions
*/
namespace Collision
{
bool
- circleWithCirclesector( const Point &circlePos, int circleRadius,
- const Point &secPos, int secRadius, float secAngle, float secSize);
+ circleWithCirclesector(const Point &circlePos, int circleRadius,
+ const Point &secPos, int secRadius,
+ float secAngle, float secSize);
+ /**
+ * Checks if a disk and a circle-sector collide
+ *
+ * @param halfTopAngle
+ * The half-top-angle of the circle sector in degrees (0,359).
+ * @param placeAngle
+ * The placement-angle of the circle sector in degrees (0,359).
+ */
+ bool
+ diskWithCircleSector(const Point &diskCenter, int diskRadius,
+ const Point &sectorCenter, int sectorRadius,
+ int halfTopAngle, int placeAngle);
+
};
+
+#endif