diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 16:47:11 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-10 16:47:11 +0200 |
| commit | 94721f5ab8af9e7d91a4de58baf2c8d849ceab6e (patch) | |
| tree | 92fb34d709310b76de1c2d45cfe2aad8db7a523a /editor/import | |
| parent | 6ab92464bc6356f3342c3efd1fc1bb1a5e4467d5 (diff) | |
| download | redot-engine-94721f5ab8af9e7d91a4de58baf2c8d849ceab6e.tar.gz | |
Revert "Renamed plane's d to distance"
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3.
This was wrong, `d` is not a distance but the `d` constant in the
parametric equation `ax + by + cz = d` describing the plane.
Diffstat (limited to 'editor/import')
| -rw-r--r-- | editor/import/editor_import_collada.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 7e7a982501..697ddfba96 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -766,7 +766,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me Vector3 tangent = Vector3(tangent_src->array[tangent_pos + 0], tangent_src->array[tangent_pos + 1], tangent_src->array[tangent_pos + 2]); vertex.tangent.normal = tangent; - vertex.tangent.distance = vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1; + vertex.tangent.d = vertex.normal.cross(tangent).dot(binormal) > 0 ? 1 : -1; } } @@ -794,7 +794,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me #ifndef NO_UP_AXIS_SWAP if (collada.state.up_axis == Vector3::AXIS_Z) { - Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.distance; + Vector3 bn = vertex.normal.cross(vertex.tangent.normal) * vertex.tangent.d; SWAP(vertex.vertex.z, vertex.vertex.y); vertex.vertex.z = -vertex.vertex.z; @@ -805,7 +805,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me SWAP(bn.z, bn.y); bn.z = -bn.z; - vertex.tangent.distance = vertex.normal.cross(vertex.tangent.normal).dot(bn) > 0 ? 1 : -1; + vertex.tangent.d = vertex.normal.cross(vertex.tangent.normal).dot(bn) > 0 ? 1 : -1; } #endif |
