diff options
author | reduz <reduzio@gmail.com> | 2020-12-17 15:56:59 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-12-18 15:48:03 +0100 |
commit | d2302f53d6ad80943e7f4245ac572003f1681d00 (patch) | |
tree | f1d46d8194f01e56cd3a4d042b9b33ba728c6f62 /core/math/aabb.h | |
parent | 36b4e035dc7c410c29cda4446f8daa2e00a31da0 (diff) |
Implement automatic LOD (Level of Detail)
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)
-Disabled AABB.get_support test because its broken
Diffstat (limited to 'core/math/aabb.h')
-rw-r--r-- | core/math/aabb.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/math/aabb.h b/core/math/aabb.h index 45dcbc7f7f..474304eae2 100644 --- a/core/math/aabb.h +++ b/core/math/aabb.h @@ -190,9 +190,9 @@ Vector3 AABB::get_support(const Vector3 &p_normal) const { Vector3 ofs = position + half_extents; return Vector3( - (p_normal.x > 0) ? -half_extents.x : half_extents.x, - (p_normal.y > 0) ? -half_extents.y : half_extents.y, - (p_normal.z > 0) ? -half_extents.z : half_extents.z) + + (p_normal.x > 0) ? half_extents.x : -half_extents.x, + (p_normal.y > 0) ? half_extents.y : -half_extents.y, + (p_normal.z > 0) ? half_extents.z : -half_extents.z) + ofs; } |