diff options
author | Daniel Rakos <daniel.rakos@rastergrid.com> | 2019-04-07 16:03:20 +0200 |
---|---|---|
committer | Daniel Rakos <daniel.rakos@rastergrid.com> | 2019-04-08 16:28:41 +0200 |
commit | abccf9a0501edef76bcbde3f98e6b6f52156ffd1 (patch) | |
tree | 8a568c083ad6c2c263566947b5e8e7182f7b7890 /include/core/Array.hpp | |
parent | df04c4097fe09204e1906ae76996b80376d84d34 (diff) | |
download | redot-cpp-abccf9a0501edef76bcbde3f98e6b6f52156ffd1.tar.gz |
Make Basis look column-major while retaining a row-major representation
Per https://github.com/godotengine/godot/issues/14553:
Godot stores Basis in row-major layout for more change for efficiently
taking advantage of SIMD instructions, but in scripts Basis looks like and
is accessible in a column-major format.
This change modifies the C++ binding so that from the script's perspective
Basis does look like if it was column-major while retaining a row-major
in-memory representation. This is achieved using a set of helper template
classes which allow accessing individual columns whose components are
non-continues in memory as if it was a Vector3 type. This ensures script
interface compatibility without needing to transpose the Basis every time
it is passed over the script-engine boundary.
Also made most of the Vector2 and Vector3 class interfaces inlined in the
process for increased performance.
While unrelated (but didn't want to file a separate PR for it), this change
adds the necessary flags to have debug symbol information under MSVC.
Fixes #241.
Diffstat (limited to 'include/core/Array.hpp')
0 files changed, 0 insertions, 0 deletions