-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollision.h
More file actions
23 lines (17 loc) · 1.05 KB
/
Copy pathCollision.h
File metadata and controls
23 lines (17 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Ivaylo Ivanov
#include "TL-Engine.h"
#include "GameStates.h"
#include <cmath>
using namespace tle;
#ifndef COLLISION_H
#define COLLISION_H
class Collision:public gameStatesDecision//Child class of master class Game States
{
public://The Collision class defines all the necessary functions needed to check for collision
bool sphereToSphereCollision(float sphereXPositionOne, float sphereZPositionOne, float sphereRadiusOne, float sphereXPositionTwo, float sphereZPositionTwo, float sphereRadiusTwo);
enum boxSides { frontSide, backSide, leftSide, rightSide, noSide };//States used to return which object side was hit
boxSides sphereToBoxCollision(float sphereXPosition, float sphereZPosition, float sphereRadius, float oldSphereXPosition, float oldSphereZPosition,
float boxObjectXPosition, float boxObjectZPosition, float boxObjectWidth, float boxObjectDepth);
bool Collision::pointToSphereCollision(float sphereXPositionOne, float sphereZPositionOne, float sphereRadiusOne, float sphereXPositionTwo, float sphereZPositionTwo);
};
#endif