summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-10-04 11:44:48 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-10-04 12:34:19 -0500
commit2cea42cc7faf12ad56b12c113bbb70521264c8e8 (patch)
treeae895ad9e52b96b92d60ae91fa80565fdce08c15 /core/io
parent0056acf46fc88757cae9d9f6fe9805f0eec1cd09 (diff)
Rename Projection `matrix` to `columns`
Diffstat (limited to 'core/io')
-rw-r--r--core/io/marshalls.cpp6
-rw-r--r--core/io/resource_format_binary.cpp64
2 files changed, 35 insertions, 35 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index b24c49f58d..9ba653e1a9 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -503,7 +503,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_COND_V((size_t)len < sizeof(double) * 16, ERR_INVALID_DATA);
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- val.matrix[i][j] = decode_double(&buf[(i * 4 + j) * sizeof(double)]);
+ val.columns[i][j] = decode_double(&buf[(i * 4 + j) * sizeof(double)]);
}
}
if (r_len) {
@@ -513,7 +513,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
ERR_FAIL_COND_V((size_t)len < sizeof(float) * 16, ERR_INVALID_DATA);
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- val.matrix[i][j] = decode_float(&buf[(i * 4 + j) * sizeof(float)]);
+ val.columns[i][j] = decode_float(&buf[(i * 4 + j) * sizeof(float)]);
}
}
@@ -1450,7 +1450,7 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
Projection val = p_variant;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
- memcpy(&buf[(i * 4 + j) * sizeof(real_t)], &val.matrix[i][j], sizeof(real_t));
+ memcpy(&buf[(i * 4 + j) * sizeof(real_t)], &val.columns[i][j], sizeof(real_t));
}
}
}
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index 36fa77626e..9ab45f85b8 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -327,22 +327,22 @@ Error ResourceLoaderBinary::parse_variant(Variant &r_v) {
} break;
case VARIANT_PROJECTION: {
Projection v;
- v.matrix[0].x = f->get_real();
- v.matrix[0].y = f->get_real();
- v.matrix[0].z = f->get_real();
- v.matrix[0].w = f->get_real();
- v.matrix[1].x = f->get_real();
- v.matrix[1].y = f->get_real();
- v.matrix[1].z = f->get_real();
- v.matrix[1].w = f->get_real();
- v.matrix[2].x = f->get_real();
- v.matrix[2].y = f->get_real();
- v.matrix[2].z = f->get_real();
- v.matrix[2].w = f->get_real();
- v.matrix[3].x = f->get_real();
- v.matrix[3].y = f->get_real();
- v.matrix[3].z = f->get_real();
- v.matrix[3].w = f->get_real();
+ v.columns[0].x = f->get_real();
+ v.columns[0].y = f->get_real();
+ v.columns[0].z = f->get_real();
+ v.columns[0].w = f->get_real();
+ v.columns[1].x = f->get_real();
+ v.columns[1].y = f->get_real();
+ v.columns[1].z = f->get_real();
+ v.columns[1].w = f->get_real();
+ v.columns[2].x = f->get_real();
+ v.columns[2].y = f->get_real();
+ v.columns[2].z = f->get_real();
+ v.columns[2].w = f->get_real();
+ v.columns[3].x = f->get_real();
+ v.columns[3].y = f->get_real();
+ v.columns[3].z = f->get_real();
+ v.columns[3].w = f->get_real();
r_v = v;
} break;
case VARIANT_COLOR: {
@@ -1630,22 +1630,22 @@ void ResourceFormatSaverBinaryInstance::write_variant(Ref<FileAccess> f, const V
case Variant::PROJECTION: {
f->store_32(VARIANT_PROJECTION);
Projection val = p_property;
- f->store_real(val.matrix[0].x);
- f->store_real(val.matrix[0].y);
- f->store_real(val.matrix[0].z);
- f->store_real(val.matrix[0].w);
- f->store_real(val.matrix[1].x);
- f->store_real(val.matrix[1].y);
- f->store_real(val.matrix[1].z);
- f->store_real(val.matrix[1].w);
- f->store_real(val.matrix[2].x);
- f->store_real(val.matrix[2].y);
- f->store_real(val.matrix[2].z);
- f->store_real(val.matrix[2].w);
- f->store_real(val.matrix[3].x);
- f->store_real(val.matrix[3].y);
- f->store_real(val.matrix[3].z);
- f->store_real(val.matrix[3].w);
+ f->store_real(val.columns[0].x);
+ f->store_real(val.columns[0].y);
+ f->store_real(val.columns[0].z);
+ f->store_real(val.columns[0].w);
+ f->store_real(val.columns[1].x);
+ f->store_real(val.columns[1].y);
+ f->store_real(val.columns[1].z);
+ f->store_real(val.columns[1].w);
+ f->store_real(val.columns[2].x);
+ f->store_real(val.columns[2].y);
+ f->store_real(val.columns[2].z);
+ f->store_real(val.columns[2].w);
+ f->store_real(val.columns[3].x);
+ f->store_real(val.columns[3].y);
+ f->store_real(val.columns[3].z);
+ f->store_real(val.columns[3].w);
} break;
case Variant::COLOR: {