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 /scene/resources/surface_tool.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 'scene/resources/surface_tool.cpp')
-rw-r--r-- | scene/resources/surface_tool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 4b392e23b7..c5e1aa7c80 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -107,7 +107,7 @@ void SurfaceTool::add_vertex(const Vector3 &p_vertex) { vtx.weights = last_weights; vtx.bones = last_bones; vtx.tangent = last_tangent.normal; - vtx.binormal = last_normal.cross(last_tangent.normal).normalized() * last_tangent.d; + vtx.binormal = last_normal.cross(last_tangent.normal).normalized() * last_tangent.distance; const int expected_vertices = 4; @@ -575,7 +575,7 @@ Vector<SurfaceTool::Vertex> SurfaceTool::create_vertex_array_from_triangle_array if (lformat & RS::ARRAY_FORMAT_TANGENT) { Plane p(tarr[i * 4 + 0], tarr[i * 4 + 1], tarr[i * 4 + 2], tarr[i * 4 + 3]); v.tangent = p.normal; - v.binormal = p.normal.cross(v.tangent).normalized() * p.d; + v.binormal = p.normal.cross(v.tangent).normalized() * p.distance; } if (lformat & RS::ARRAY_FORMAT_COLOR) v.color = carr[i]; @@ -658,7 +658,7 @@ void SurfaceTool::_create_list_from_arrays(Array arr, List<Vertex> *r_vertex, Li if (lformat & RS::ARRAY_FORMAT_TANGENT) { Plane p(tarr[i * 4 + 0], tarr[i * 4 + 1], tarr[i * 4 + 2], tarr[i * 4 + 3]); v.tangent = p.normal; - v.binormal = p.normal.cross(v.tangent).normalized() * p.d; + v.binormal = p.normal.cross(v.tangent).normalized() * p.distance; } if (lformat & RS::ARRAY_FORMAT_COLOR) v.color = carr[i]; |