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 /scene/resources/surface_tool.cpp | |
parent | ff5dfcdf68c20590bf123ade75ca06ed58276372 (diff) |
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]; |