Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
collider.h
1 
9 #pragma once
10 
11 #include "core.h"
12 #include <Entities/component.h>
13 #include <Math/vec2.h>
14 #include <Physics/AABB.h>
15 #include <Renderer/rectangleShape.h>
16 #include <Events/subject.h>
17 
18 #ifndef COLLIDER_H_DEFINED
19 #define COLLIDER_H_DEFINED
20 
21 namespace physics{
22 
23 class RUNE_ENGINE Collider : public rune::Subject
24 {
25 protected:
30 
31 public:
33  Collider();
35  virtual AABB computeAABB(void) = 0;
36 
37 
38 
39 
40 };
41 }
42 
43 #endif
physics::Collider
A collider that is to be used for registering collisions between objects in the scene.
Definition: collider.h:24
physics
The physics module responsible for handling and resolving collisions between physics::Collider2D.
Definition: AABB.h:7
physics::Collider::computeAABB
virtual AABB computeAABB(void)=0
Computes the appropriate physics::AABB that should be given to the collider.
rune::Subject
A subject that can be watched for signals by observers.
Definition: subject.h:21
physics::Collider::offset
rune::Vec2 offset
The amount of offset from the center of the AABB that should be applied.
Definition: collider.h:29
physics::Collider::boundingBox
AABB boundingBox
The axis aligned bounding box that surrounds the collider.
Definition: collider.h:27
rune::Vec2
1 x 2 vector to be used for math.
Definition: vec2.h:20
physics::AABB
Axis aligned bounding box for each object.
Definition: AABB.h:10