summaryrefslogtreecommitdiff
path: root/servers/physics/space_sw.cpp
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-11-16 21:09:00 -0500
committerFerenc Arn <tagcup@yahoo.com>2017-11-17 11:01:41 -0500
commitd28763a4c1792dc00fde3d151eaea54f9cf2b8a9 (patch)
tree7abd311b6e672829bd751fbf4d9135b60f2f9913 /servers/physics/space_sw.cpp
parentb44cb4e3b9b573a3cbbd6f71aff81e6c3465d84b (diff)
Rename Rect3 to AABB.
Fixes #12973.
Diffstat (limited to 'servers/physics/space_sw.cpp')
-rw-r--r--servers/physics/space_sw.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 7fac56f3d7..a6426b7ee0 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -176,7 +176,7 @@ int PhysicsDirectSpaceStateSW::intersect_shape(const RID &p_shape, const Transfo
ShapeSW *shape = static_cast<PhysicsServerSW *>(PhysicsServer::get_singleton())->shape_owner.get(p_shape);
ERR_FAIL_COND_V(!shape, 0);
- Rect3 aabb = p_xform.xform(shape->get_aabb());
+ AABB aabb = p_xform.xform(shape->get_aabb());
int amount = space->broadphase->cull_aabb(aabb, space->intersection_query_results, SpaceSW::INTERSECTION_QUERY_MAX, space->intersection_query_subindex_results);
@@ -224,8 +224,8 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform
ShapeSW *shape = static_cast<PhysicsServerSW *>(PhysicsServer::get_singleton())->shape_owner.get(p_shape);
ERR_FAIL_COND_V(!shape, false);
- Rect3 aabb = p_xform.xform(shape->get_aabb());
- aabb = aabb.merge(Rect3(aabb.position + p_motion, aabb.size)); //motion
+ AABB aabb = p_xform.xform(shape->get_aabb());
+ aabb = aabb.merge(AABB(aabb.position + p_motion, aabb.size)); //motion
aabb = aabb.grow(p_margin);
/*
@@ -341,7 +341,7 @@ bool PhysicsDirectSpaceStateSW::collide_shape(RID p_shape, const Transform &p_sh
ShapeSW *shape = static_cast<PhysicsServerSW *>(PhysicsServer::get_singleton())->shape_owner.get(p_shape);
ERR_FAIL_COND_V(!shape, 0);
- Rect3 aabb = p_shape_xform.xform(shape->get_aabb());
+ AABB aabb = p_shape_xform.xform(shape->get_aabb());
aabb = aabb.grow(p_margin);
int amount = space->broadphase->cull_aabb(aabb, space->intersection_query_results, SpaceSW::INTERSECTION_QUERY_MAX, space->intersection_query_subindex_results);
@@ -417,7 +417,7 @@ bool PhysicsDirectSpaceStateSW::rest_info(RID p_shape, const Transform &p_shape_
ShapeSW *shape = static_cast<PhysicsServerSW *>(PhysicsServer::get_singleton())->shape_owner.get(p_shape);
ERR_FAIL_COND_V(!shape, 0);
- Rect3 aabb = p_shape_xform.xform(shape->get_aabb());
+ AABB aabb = p_shape_xform.xform(shape->get_aabb());
aabb = aabb.grow(p_margin);
int amount = space->broadphase->cull_aabb(aabb, space->intersection_query_results, SpaceSW::INTERSECTION_QUERY_MAX, space->intersection_query_subindex_results);
@@ -514,7 +514,7 @@ PhysicsDirectSpaceStateSW::PhysicsDirectSpaceStateSW() {
////////////////////////////////////////////////////////////////////////////////////////////////////////////
-int SpaceSW::_cull_aabb_for_body(BodySW *p_body, const Rect3 &p_aabb) {
+int SpaceSW::_cull_aabb_for_body(BodySW *p_body, const AABB &p_aabb) {
int amount = broadphase->cull_aabb(p_aabb, intersection_query_results, INTERSECTION_QUERY_MAX, intersection_query_subindex_results);
@@ -561,7 +561,7 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve
r_result->collider_id = 0;
r_result->collider_shape = 0;
}
- Rect3 body_aabb;
+ AABB body_aabb;
for (int i = 0; i < p_body->get_shape_count(); i++) {
@@ -648,7 +648,7 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve
{
// STEP 2 ATTEMPT MOTION
- Rect3 motion_aabb = body_aabb;
+ AABB motion_aabb = body_aabb;
motion_aabb.position += p_motion;
motion_aabb = motion_aabb.merge(body_aabb);