Pathfinder
AABB.h
Go to the documentation of this file.
1 
10 #ifndef AABB_H
11 #define AABB_H
12 
13 #include "Polygon.h"
14 
15 namespace Pathfinder {
16 
22  struct AABB {
23 
24  Geometry::Vec3 min;
25  Geometry::Vec3 max;
33  AABB();
34 
35 
44  AABB(
45  const Geometry::Vec3& min,
46  const Geometry::Vec3& max
47  );
48 
49 
62  bool
64  const Polygon* p,
65  const short& component
66  );
67 
68 
80  bool
81  triInAABB(
82  const Polygon* p
83  );
84 
85 
93  bool
95  Geometry::Vec3 p
96  );
97 
98  };
99 
100 
110  bool
112  const AABB& a,
113  const AABB& b
114  );
115 
116 }
117 
118 #endif
bool pointInAABB(Geometry::Vec3 p)
Check whether the point lies inside this AABB.
Definition: AABB.cpp:55
bool triInAABB(const Polygon *p)
Check whether the polygon intersects with this AABB.
Definition: AABB.cpp:46
bool AABBintersection(const AABB &a, const AABB &b)
Check if two AABBs intersect.
Definition: AABB.cpp:64
AABB()
A constructor that creates an object with dummy attributes.
Definition: AABB.cpp:23
Definition: AABB.cpp:21
A struct that represents a single polygon.
Definition: Polygon.h:21
bool triNotInAABB(const Polygon *p, const short &component)
Check whether a polygon definetely lies outside of this AABB.
Definition: AABB.cpp:33
Geometry::Vec3 max
The biggest corner of the AABB.
Definition: AABB.h:25
Geometry::Vec3 min
The smallest corner of the AABB.
Definition: AABB.h:24
This file declares the struct Polygon that presents a convenient way to access polygons.
This struct models an AABB.
Definition: AABB.h:22