CPSC310A
Video Game Development

Activity 13

Oriented Bounding Box Collision

Details

Write the following two functions for the oriented bounding box collision algorithm:

  1. bool overlap(float min1, float max1, float min2, float max2)

    Returns true if the region between min1 and max1 overlaps with the region between min2 and max2 and false otherwise.

  2. float dot(float vector1[], float vector2[])

    Returns the dot product of two three-dimensional vectors, vector1 and vector2.

Submission

Please show your source code and run your program for the instructor.