33 float getVolume() {
return hsize.
x * 2 * hsize.
y * 2 * hsize.
z * 2; }
53 (min.
x <= pmax.
x && max.
x >= pmin.
x) &&
54 (min.
y <= pmax.
y && max.
y >= pmin.
y) &&
55 (min.
z <= pmax.
z && max.
z >= pmin.
z);
67 res->construct(_min, _max);
69 if (min.
x > pmax.
x || max.
x < pmin.
x)
73 _min.x = (min.
x > pmin.
x) ? min.
x : pmin.
x;
74 _max.
x = (max.
x < pmax.
x) ? max.
x : pmax.
x;
77 if (min.
y > pmax.
y || max.
y < pmin.
y)
81 _min.y = (min.
y > pmin.
y) ? min.
y : pmin.
y;
82 _max.
y = (max.
y < pmax.
y) ? max.
y : pmax.
y;
85 if (min.
z > pmax.
z || max.
z < pmin.
z)
89 _min.z = (min.
z > pmin.
z) ? min.
z : pmin.
z;
90 _max.
z = (max.
z < pmax.
z) ? max.
z : pmax.
z;
92 res->construct(_min, _max);
100 array<Vector3>^ points = gcnew array<Vector3>(8);
113 for (
int i = 0; i < 8; i++)
121 return under && over;
129 if (p.
x < min.
x) min.
x = p.
x;
130 if (p.
y < min.
y) min.
x = p.
y;
131 if (p.
z < min.
z) min.
x = p.
z;
133 if (p.
x > max.
x) max.
x = p.
x;
134 if (p.
y > max.
y) max.
x = p.
y;
135 if (p.
z > max.
z) max.
x = p.
z;
147 if (amin.
x < min.
x) min.
x = amin.
x;
148 if (amin.
y < min.
y) min.
x = amin.
y;
149 if (amin.
z < min.
z) min.
x = amin.
z;
151 if (amax.
x > max.
x) max.
x = amax.
x;
152 if (amax.
y > max.
y) max.
x = amax.
y;
153 if (amax.
z > max.
z) max.
x = amax.
z;
162 hsize = (max + -min) * 0.5f;
163 center = min + hsize;
164 hsize =
Vector3(fabs(hsize.x), fabs(hsize.y), fabs(hsize.z));
void inflateRate(float r)
Definition: Aabb.h:40
void expand(Aabb^ aabb)
Definition: Aabb.h:140
void setCenter(Vector3 v)
Definition: Aabb.h:27
void expand(const Vector3 p)
Definition: Aabb.h:124
Vector3 getMin()
Definition: Aabb.h:31
bool intersectPlane(Plane^ plane)
Definition: Aabb.h:96
Vector3 getMax()
Definition: Aabb.h:32
bool intersectAabb(Aabb^ p, Aabb^res)
Definition: Aabb.h:58
Aabb(const Vector3 min, const Vector3 max)
Definition: Aabb.h:15
float getVolume()
Definition: Aabb.h:33
bool intersect(Aabb^ p)
Definition: Aabb.h:45
void setSize(Vector3 v)
Definition: Aabb.h:29
void inflate(float v)
Definition: Aabb.h:35
Vector3 getSize()
Definition: Aabb.h:28
Aabb(const Aabb^ o)
Definition: Aabb.h:20
Vector3 getCenter()
Definition: Aabb.h:26
Aabb()
Definition: Aabb.h:11
Definition: Math/Plane.h:8
float distanceTo(Vector3 point)
Definition: Math/Plane.h:22
Definition: RefCapture.h:3
float y
Definition: Vector3.h:10
float z
Definition: Vector3.h:10
float x
Definition: Vector3.h:10