diff options
author | Marcus Elg <marcusaccounts@yahoo.se> | 2020-05-10 09:00:10 +0200 |
---|---|---|
committer | Marcus Elg <marcusaccounts@yahoo.se> | 2020-05-10 12:12:51 +0200 |
commit | ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3 (patch) | |
tree | bd054639c909ab4ea6c855e70ddc3b25ee2f50b0 /core/math/geometry.cpp | |
parent | ff5dfcdf68c20590bf123ade75ca06ed58276372 (diff) |
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; } |