diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2022-04-24 17:07:35 -0500 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2022-04-29 08:02:56 -0500 |
commit | 1bf94dff3a6fee9fc19189ac77d81beb631b8398 (patch) | |
tree | 54e94eb3395af9afdf5432890a3c795496b1f30c /core/variant | |
parent | b831fb0a540bee165d46c1c229f2ec4569c88461 (diff) |
Rename Basis "elements" to "rows"
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant.cpp | 24 | ||||
-rw-r--r-- | core/variant/variant_parser.cpp | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index ef0be13b98..c41af32c3f 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -1908,10 +1908,10 @@ Variant::operator Transform3D() const { } else if (type == TRANSFORM2D) { const Transform2D &t = *_data._transform2d; Transform3D m; - m.basis.elements[0][0] = t.columns[0][0]; - m.basis.elements[1][0] = t.columns[0][1]; - m.basis.elements[0][1] = t.columns[1][0]; - m.basis.elements[1][1] = t.columns[1][1]; + m.basis.rows[0][0] = t.columns[0][0]; + m.basis.rows[1][0] = t.columns[0][1]; + m.basis.rows[0][1] = t.columns[1][0]; + m.basis.rows[1][1] = t.columns[1][1]; m.origin[0] = t.columns[2][0]; m.origin[1] = t.columns[2][1]; return m; @@ -1926,10 +1926,10 @@ Variant::operator Transform2D() const { } else if (type == TRANSFORM3D) { const Transform3D &t = *_data._transform3d; Transform2D m; - m.columns[0][0] = t.basis.elements[0][0]; - m.columns[0][1] = t.basis.elements[1][0]; - m.columns[1][0] = t.basis.elements[0][1]; - m.columns[1][1] = t.basis.elements[1][1]; + m.columns[0][0] = t.basis.rows[0][0]; + m.columns[0][1] = t.basis.rows[1][0]; + m.columns[1][0] = t.basis.rows[0][1]; + m.columns[1][1] = t.basis.rows[1][1]; m.columns[2][0] = t.origin[0]; m.columns[2][1] = t.origin[1]; return m; @@ -2834,7 +2834,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const { uint32_t hash = 5831; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - hash = hash_djb2_one_float(_data._basis->elements[i][j], hash); + hash = hash_djb2_one_float(_data._basis->rows[i][j], hash); } } @@ -2845,7 +2845,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const { uint32_t hash = 5831; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - hash = hash_djb2_one_float(_data._transform3d->basis.elements[i][j], hash); + hash = hash_djb2_one_float(_data._transform3d->basis.rows[i][j], hash); } hash = hash_djb2_one_float(_data._transform3d->origin[i], hash); } @@ -3162,7 +3162,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const const Basis *r = p_variant._data._basis; for (int i = 0; i < 3; i++) { - if (!(hash_compare_vector3(l->elements[i], r->elements[i]))) { + if (!(hash_compare_vector3(l->rows[i], r->rows[i]))) { return false; } } @@ -3175,7 +3175,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const const Transform3D *r = p_variant._data._transform3d; for (int i = 0; i < 3; i++) { - if (!(hash_compare_vector3(l->basis.elements[i], r->basis.elements[i]))) { + if (!(hash_compare_vector3(l->basis.rows[i], r->basis.rows[i]))) { return false; } } diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp index 5ce313fd3c..205b7fd93f 100644 --- a/core/variant/variant_parser.cpp +++ b/core/variant/variant_parser.cpp @@ -1570,7 +1570,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str if (i != 0 || j != 0) { s += ", "; } - s += rtos_fix(m3.elements[i][j]); + s += rtos_fix(m3.rows[i][j]); } } @@ -1586,7 +1586,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str if (i != 0 || j != 0) { s += ", "; } - s += rtos_fix(m3.elements[i][j]); + s += rtos_fix(m3.rows[i][j]); } } |