3#ifndef __COLLISIONS_H__ 
    4#define __COLLISIONS_H__ 1 
    6#include "math/vector_2.h" 
    7#include "math/vector_3.h" 
    8#include "math/vector_4.h" 
   41  Circle(
float x, 
float y, 
float r);
 
   42  Circle(
Vec2 pos, 
float r);
 
   44  Circle(
const Circle& o);
 
   47  void operator=(
const Circle& o);
 
   56  Sphere(
float x, 
float y, 
float z, 
float r);
 
   57  Sphere(
Vec3 pos, 
float r);
 
   59  Sphere(
const Sphere& o);
 
   62  void operator=(
const Sphere& o);
 
   70  Rect2(
float x, 
float y, 
float w, 
float h);
 
   73  Rect2(
const Vec2& pos, 
const Vec2& size);
 
   74  Rect2(
const Rect2& o);
 
   82  Rect3(
float x, 
float y, 
float z, 
float w, 
float h, 
float d);
 
   84  Rect3(
const Vec3& pos, 
const Vec3& size);
 
   85  Rect3(
const Rect3& o);
 
   95bool Check(Circle c, Vec2 p);
 
   96bool Check(Rect2 r, Vec2 p);
 
   97bool Check(Obb2 o, Vec2 p);
 
   99bool Check(Circle c1, Circle c2);
 
  100bool Check(Rect2 r, Circle c);
 
  101bool Check(Obb2 o, Circle c);
 
  103bool Check(Rect2 r1, Rect2 r2);
 
  104bool Check(Obb2 o, Rect2 r);
 
  106bool Check(Obb2 o1, Obb2 o2);
 
  109bool Check(Sphere s, Vec3 p);
 
  110bool Check(Rect3 r, Vec3 p);
 
  111bool Check(Obb3 o, Vec3 p);
 
  113bool Check(Sphere s1, Sphere s2);
 
  114bool Check(Rect3 r, Sphere s);
 
  115bool Check(Obb3 o, Sphere s);
 
  117bool Check(Rect3 r1, Rect3 r2);
 
  118bool Check(Obb3 o, Rect3 r);
 
  120bool Check(Obb3 o1, Obb3 o2);
 
represents mathematical vector with 2 components
Definition: vector_2.h:7
represents mathematical vector with 3 components
Definition: vector_3.h:12
Face
The faces of a cube colision.
Definition: collisions.h:11
Face detectFaceCollision(const BoxCmp &me, const BoxCmp &other)
If two objects are colliding return the face of the box with which it collides.
bool collidesWith(const BoxCmp &me, const BoxCmp &other)
Detect if the BoxCmp are colliding.
copperdielf Math Library
Definition: buffer.hpp:5
Component used to detect collisions.
Definition: default_components.hpp:337