Saga
Saga Game Engine
Loading...
Searching...
No Matches
collider.h
Go to the documentation of this file.
1#pragma once
2#include <glm/vec3.hpp>
3#include <vector>
4#include <tuple>
5
6namespace Saga {
11 struct Collider { };
12
18 float height;
19 float radius;
20
27 CylinderCollider(float height = 1, float radius = 0.5f) : height(height), radius(radius) {}
28 };
29
34 struct MeshCollider { };
35
41 glm::vec3 radius;
42
48 EllipsoidCollider(glm::vec3 radius = glm::vec3(1,1,1)) : radius(radius) {}
49 };
50}
Definition: app.cpp:8
A boolean flag to tell if an Entity has a Collider.
Definition: collider.h:11
Model an axis-aligned cylinder collider.
Definition: collider.h:17
float radius
Definition: collider.h:19
float height
Definition: collider.h:18
CylinderCollider(float height=1, float radius=0.5f)
Definition: collider.h:27
Model an axis-aligned ellipsoid.
Definition: collider.h:40
glm::vec3 radius
Definition: collider.h:41
EllipsoidCollider(glm::vec3 radius=glm::vec3(1, 1, 1))
Construct an ellipsoid collider.
Definition: collider.h:48
Model a mesh containing a list of triangles.
Definition: collider.h:34