Rename Rect3 to AABB.

Fixes #12973.
This commit is contained in:
Ferenc Arn 2017-11-16 21:09:00 -05:00
parent b44cb4e3b9
commit d28763a4c1
138 changed files with 1203 additions and 1194 deletions

View file

@ -30,8 +30,8 @@
#ifndef FACE3_H
#define FACE3_H
#include "aabb.h"
#include "plane.h"
#include "rect3.h"
#include "transform.h"
#include "vector3.h"
@ -76,16 +76,16 @@ public:
void get_support(const Vector3 &p_normal, const Transform &p_transform, Vector3 *p_vertices, int *p_count, int p_max) const;
void project_range(const Vector3 &p_normal, const Transform &p_transform, real_t &r_min, real_t &r_max) const;
Rect3 get_aabb() const {
AABB get_aabb() const {
Rect3 aabb(vertex[0], Vector3());
AABB aabb(vertex[0], Vector3());
aabb.expand_to(vertex[1]);
aabb.expand_to(vertex[2]);
return aabb;
}
bool intersects_aabb(const Rect3 &p_aabb) const;
_FORCE_INLINE_ bool intersects_aabb2(const Rect3 &p_aabb) const;
bool intersects_aabb(const AABB &p_aabb) const;
_FORCE_INLINE_ bool intersects_aabb2(const AABB &p_aabb) const;
operator String() const;
inline Face3() {}
@ -96,7 +96,7 @@ public:
}
};
bool Face3::intersects_aabb2(const Rect3 &p_aabb) const {
bool Face3::intersects_aabb2(const AABB &p_aabb) const {
Vector3 perp = (vertex[0] - vertex[2]).cross(vertex[0] - vertex[1]);
@ -256,6 +256,6 @@ bool Face3::intersects_aabb2(const Rect3 &p_aabb) const {
return true;
}
//this sucks...
//this sucks...
#endif // FACE3_H