diff options
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant.cpp | 34 | ||||
-rw-r--r-- | core/variant/variant_parser.cpp | 2 | ||||
-rw-r--r-- | core/variant/variant_setget.cpp | 2 | ||||
-rw-r--r-- | core/variant/variant_setget.h | 8 |
4 files changed, 23 insertions, 23 deletions
diff --git a/core/variant/variant.cpp b/core/variant/variant.cpp index f24ffeb1a9..9615747927 100644 --- a/core/variant/variant.cpp +++ b/core/variant/variant.cpp @@ -3121,22 +3121,22 @@ uint32_t Variant::recursive_hash(int recursion_count) const { case PROJECTION: { uint32_t h = HASH_MURMUR3_SEED; const Projection &t = *_data._projection; - h = hash_murmur3_one_real(t.matrix[0].x, h); - h = hash_murmur3_one_real(t.matrix[0].y, h); - h = hash_murmur3_one_real(t.matrix[0].z, h); - h = hash_murmur3_one_real(t.matrix[0].w, h); - h = hash_murmur3_one_real(t.matrix[1].x, h); - h = hash_murmur3_one_real(t.matrix[1].y, h); - h = hash_murmur3_one_real(t.matrix[1].z, h); - h = hash_murmur3_one_real(t.matrix[1].w, h); - h = hash_murmur3_one_real(t.matrix[2].x, h); - h = hash_murmur3_one_real(t.matrix[2].y, h); - h = hash_murmur3_one_real(t.matrix[2].z, h); - h = hash_murmur3_one_real(t.matrix[2].w, h); - h = hash_murmur3_one_real(t.matrix[3].x, h); - h = hash_murmur3_one_real(t.matrix[3].y, h); - h = hash_murmur3_one_real(t.matrix[3].z, h); - h = hash_murmur3_one_real(t.matrix[3].w, h); + h = hash_murmur3_one_real(t.columns[0].x, h); + h = hash_murmur3_one_real(t.columns[0].y, h); + h = hash_murmur3_one_real(t.columns[0].z, h); + h = hash_murmur3_one_real(t.columns[0].w, h); + h = hash_murmur3_one_real(t.columns[1].x, h); + h = hash_murmur3_one_real(t.columns[1].y, h); + h = hash_murmur3_one_real(t.columns[1].z, h); + h = hash_murmur3_one_real(t.columns[1].w, h); + h = hash_murmur3_one_real(t.columns[2].x, h); + h = hash_murmur3_one_real(t.columns[2].y, h); + h = hash_murmur3_one_real(t.columns[2].z, h); + h = hash_murmur3_one_real(t.columns[2].w, h); + h = hash_murmur3_one_real(t.columns[3].x, h); + h = hash_murmur3_one_real(t.columns[3].y, h); + h = hash_murmur3_one_real(t.columns[3].z, h); + h = hash_murmur3_one_real(t.columns[3].w, h); return hash_fmix32(h); } break; // misc types @@ -3507,7 +3507,7 @@ bool Variant::hash_compare(const Variant &p_variant, int recursion_count) const const Projection *r = p_variant._data._projection; for (int i = 0; i < 4; i++) { - if (!(hash_compare_vector4(l->matrix[i], r->matrix[i]))) { + if (!(hash_compare_vector4(l->columns[i], r->columns[i]))) { return false; } } diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp index 8151ff2102..d2e4d752a4 100644 --- a/core/variant/variant_parser.cpp +++ b/core/variant/variant_parser.cpp @@ -1651,7 +1651,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str if (i != 0 || j != 0) { s += ", "; } - s += rtos_fix(t.matrix[i][j]); + s += rtos_fix(t.columns[i][j]); } } diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index ff67b187ef..188103ee5e 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -826,7 +826,7 @@ INDEXED_SETGET_STRUCT_BULTIN_NUMERIC(Color, double, float, 4) INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Transform2D, Vector2, .columns, 3) INDEXED_SETGET_STRUCT_BULTIN_FUNC(Basis, Vector3, set_column, get_column, 3) -INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Projection, Vector4, .matrix, 4) +INDEXED_SETGET_STRUCT_BULTIN_ACCESSOR(Projection, Vector4, .columns, 4) INDEXED_SETGET_STRUCT_TYPED_NUMERIC(PackedByteArray, int64_t, uint8_t) INDEXED_SETGET_STRUCT_TYPED_NUMERIC(PackedInt32Array, int64_t, int32_t) diff --git a/core/variant/variant_setget.h b/core/variant/variant_setget.h index 570277dc7a..d151a85a6e 100644 --- a/core/variant/variant_setget.h +++ b/core/variant/variant_setget.h @@ -325,10 +325,10 @@ SETGET_STRUCT_FUNC_INDEX(Basis, Vector3, z, set_column, get_column, 2) SETGET_STRUCT(Transform3D, Basis, basis) SETGET_STRUCT(Transform3D, Vector3, origin) -SETGET_STRUCT_CUSTOM(Projection, Vector4, x, matrix[0]) -SETGET_STRUCT_CUSTOM(Projection, Vector4, y, matrix[1]) -SETGET_STRUCT_CUSTOM(Projection, Vector4, z, matrix[2]) -SETGET_STRUCT_CUSTOM(Projection, Vector4, w, matrix[3]) +SETGET_STRUCT_CUSTOM(Projection, Vector4, x, columns[0]) +SETGET_STRUCT_CUSTOM(Projection, Vector4, y, columns[1]) +SETGET_STRUCT_CUSTOM(Projection, Vector4, z, columns[2]) +SETGET_STRUCT_CUSTOM(Projection, Vector4, w, columns[3]) SETGET_NUMBER_STRUCT(Color, double, r) SETGET_NUMBER_STRUCT(Color, double, g) |