VoxelEngine
Loading...
Searching...
No Matches
AABB.h
1
#pragma once
2
3
#include <glm/glm.hpp>
4
5
6
namespace
engine {
7
8
class
Geometry;
9
struct
Plane;
10
11
struct
AABB
{
12
glm::vec3 min;
13
glm::vec3 max;
14
15
bool
contains(
const
glm::vec3& point)
const
;
16
bool
intersects(
const
AABB
& other)
const
;
17
bool
intersects(
const
Plane
& plane)
const
;
18
bool
isOutsidePlane(
const
Plane
& plane)
const
;
19
glm::vec3 center()
const
;
20
21
void
transform(
const
glm::mat4& matrix);
22
void
move(
const
glm::vec3& offset);
23
void
moveAxis(
int
axis,
float
amount);
24
void
position(
const
glm::vec3& pos);
25
void
expand(
float
amount);
26
27
static
AABB
fromGeometry(
const
Geometry
& geo);
28
static
AABB
fromPoints(
const
std::vector<glm::vec3>& points);
29
};
30
31
}
// namespace engine
engine::Geometry
Definition
Geometry.h:13
engine::AABB
Definition
AABB.h:11
engine::Plane
Definition
Plane.h:6
src
physics
AABB.h
Generated by
1.9.8