diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 13:06:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 13:06:55 +0200 |
commit | 9cc67b19b8803adf3cb12364f1e3faade7553ebb (patch) | |
tree | e4741393cf3a0dd288bc2096c97471ea595340b0 /core/math/geometry.cpp | |
parent | 2d8d311b1280c78e1ae70900186d5ae22a488828 (diff) | |
parent | ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3 (diff) | |
download | redot-engine-9cc67b19b8803adf3cb12364f1e3faade7553ebb.tar.gz |
Merge pull request #38613 from MCrafterzz/plane
Renamed plane's d to distance
Diffstat (limited to 'core/math/geometry.cpp')
-rw-r--r-- | core/math/geometry.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index fa96fc4535..d55ede9fe0 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -780,7 +780,7 @@ Geometry::MeshData Geometry::build_convex_mesh(const Vector<Plane> &p_planes) { if (Math::is_zero_approx(den)) continue; // Point too short. - real_t dist = -(clip.normal.dot(edge0_A) - clip.d) / den; + real_t dist = -(clip.normal.dot(edge0_A) - clip.distance) / den; Vector3 inters = edge0_A + rel * dist; new_vertices.push_back(inters); } @@ -1199,7 +1199,7 @@ Vector<Vector3> Geometry::compute_convex_mesh_points(const Plane *p_planes, int for (int n = 0; n < p_plane_count; n++) { if (n != i && n != j && n != k) { real_t dp = p_planes[n].normal.dot(convex_shape_point); - if (dp - p_planes[n].d > CMP_EPSILON) { + if (dp - p_planes[n].distance > CMP_EPSILON) { excluded = true; break; } |