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 /core/io | |
parent | 6ab92464bc6356f3342c3efd1fc1bb1a5e4467d5 (diff) |
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 'core/io')
-rw-r--r-- | core/io/marshalls.cpp | 4 | ||||
-rw-r--r-- | core/io/resource_format_binary.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index 1396683d25..81bc45b2f7 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -277,7 +277,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int val.normal.x = decode_float(&buf[0]); val.normal.y = decode_float(&buf[4]); val.normal.z = decode_float(&buf[8]); - val.distance = decode_float(&buf[12]); + val.d = decode_float(&buf[12]); r_variant = val; if (r_len) @@ -1140,7 +1140,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo encode_float(p.normal.x, &buf[0]); encode_float(p.normal.y, &buf[4]); encode_float(p.normal.z, &buf[8]); - encode_float(p.distance, &buf[12]); + encode_float(p.d, &buf[12]); } r_len += 4 * 4; diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 5907143810..8c7559479b 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -214,7 +214,7 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) { v.normal.x = f->get_real(); v.normal.y = f->get_real(); v.normal.z = f->get_real(); - v.distance = f->get_real(); + v.d = f->get_real(); r_v = v; } break; case VARIANT_QUAT: { @@ -1458,7 +1458,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia f->store_real(val.normal.x); f->store_real(val.normal.y); f->store_real(val.normal.z); - f->store_real(val.distance); + f->store_real(val.d); } break; case Variant::QUAT: { |