From 98ba22e7064db57316dfff1ae127feb3dceeb73e Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Thu, 31 Jul 2014 13:58:22 +0200 Subject: Initial commit --- docs/html/class_collision_detector.html | 360 ++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 docs/html/class_collision_detector.html (limited to 'docs/html/class_collision_detector.html') diff --git a/docs/html/class_collision_detector.html b/docs/html/class_collision_detector.html new file mode 100644 index 0000000..40a06d5 --- /dev/null +++ b/docs/html/class_collision_detector.html @@ -0,0 +1,360 @@ + + + + +Rally X: CollisionDetector Class Reference + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + +
+
Rally X + +
+
ELEN3009 Project by Justin Wernick and David Schneider
+
+
+ + + + + +
+
+ +
+
CollisionDetector Class Reference
+
+
+ +

Object for handling collisions between GameObjects. + More...

+ +

#include <CollisionDetector.h>

+ +

List of all members.

+ + + + + + + + + + + + + +

+Public Member Functions

void checkCollisions (list< PlayerCar > &players, list< EnemyCar > &enemies, list< Checkpoint > &checkpoints, list< Rock > &rocks, list< Smokescreen > &smokescreens)
 Checks for collisions between all relevant pairs of objects, and calls the relevant collision function if one is found.

+Private Member Functions

void collision (PlayerCar &player, Checkpoint &checkpoint)
 Collision between a PlayerCar and a Checkpoint.
void collision (PlayerCar &player, EnemyCar &enemy)
 Collision between a PlayerCar and an EnemyCar.
void collision (PlayerCar &player, Rock &rock)
 Collision between a PlayerCar and a Rock.
void collision (EnemyCar &enemy, Smokescreen &smokescreen)
 Collision between an EnemyCar and a Smokescreen.
+

Detailed Description

+

Object for handling collisions between GameObjects.

+

Collisions between all relevant objects are checked and the appropriate methods on the GameObjects are called when a collision occurs.

+
Author:
Justin Wernick
+
+David Schneider
+ +

Definition at line 22 of file CollisionDetector.h.

+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void CollisionDetector::checkCollisions (list< PlayerCar > & players,
list< EnemyCar > & enemies,
list< Checkpoint > & checkpoints,
list< Rock > & rocks,
list< Smokescreen > & smokescreens 
)
+
+
+ +

Checks for collisions between all relevant pairs of objects, and calls the relevant collision function if one is found.

+

A collision occurs if the distance between two object's x values is less than 1, and the distance between their y values is also less than 1.

+
Parameters:
+ + + + + + +
[in,out]playersList of PlayerCars, that can collide with EnemieCars, Checkpoints, or Rocks.
[in,out]enemiesList of EnemyCars, that can collide with PlayerCars, or Smokescreens.
[in,out]checkpointsList of Checkpoints, that can collide with PlayerCars.
[in,out]rocksList of Rocks, that can collide with PlayerCars.
[in,out]smokescreensList of Smokescreens, that can collide with EnemyCars.
+
+
+ +

Definition at line 3 of file CollisionDetector.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void CollisionDetector::collision (PlayerCarplayer,
Checkpointcheckpoint 
) [private]
+
+
+ +

Collision between a PlayerCar and a Checkpoint.

+
Parameters:
+ + + +
[in,out]playerPlayerCar involved in the collision.
[in,out]checkpointCheckpoint involved in the collision.
+
+
+ +

Definition at line 44 of file CollisionDetector.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void CollisionDetector::collision (PlayerCarplayer,
EnemyCarenemy 
) [private]
+
+
+ +

Collision between a PlayerCar and an EnemyCar.

+
Parameters:
+ + + +
[in,out]playerPlayerCar involved in the collision.
[in,out]enemyEnemyCar involved in the collision.
+
+
+ +

Definition at line 55 of file CollisionDetector.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void CollisionDetector::collision (PlayerCarplayer,
Rockrock 
) [private]
+
+
+ +

Collision between a PlayerCar and a Rock.

+
Parameters:
+ + + +
[in,out]playerPlayerCar involved in the collision.
[in,out]rockRock involved in the collision.
+
+
+ +

Definition at line 50 of file CollisionDetector.cpp.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void CollisionDetector::collision (EnemyCarenemy,
Smokescreensmokescreen 
) [private]
+
+
+ +

Collision between an EnemyCar and a Smokescreen.

+
Parameters:
+ + + +
[in,out]enemyEnemyCar involved in the collision.
[in,out]smokescreenSmokescreen involved in the collision.
+
+
+ +

Definition at line 61 of file CollisionDetector.cpp.

+ +
+
+
The documentation for this class was generated from the following files: +
+ +
+ All Classes Files Functions Variables Typedefs Enumerations Enumerator
+ + +
+ +
+ + + + + + + -- cgit v1.2.3