CPSC310A
Video Game Development

Assignment 4

Collision Detection

Details

Add oriented bounding box collision detection to the Clone class by adding the following function:

bool collides(Clone other)

Returns true if this clone's oriented bounding box intersects with the specified other clone's oriented bounding box, and false otherwise.

Extra

The following function may be useful, but is not required.

void uncollide(Clone other)

Moves this clone the minimum amount so that it is no longer colliding with the specified other clone. This function is useful for preventing a solid object from penetrating another solid object.

Test

Your program should include a test program that uses the collide function to implement a primary play mechanic.

Submission

Your program will be evaluated for both style and functionality. Submit your code as a tar file on cseval before class on Monday March 31th.