Commit Graph

5 Commits (877de75d8bfb2dc2f30b6a8d1968157f485125a1)

Author SHA1 Message Date
Daniel Rakos abccf9a050 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.
2019-04-08 16:28:41 +02:00
Bastiaan Olij fc20fa3fce Implementing clang-format and applying it to all classes 2018-11-24 09:09:41 +11:00
Bastiaan Olij d7982cfac3 Redid PR 190 for master now that nativescript 1.1 has been merged 2018-11-22 22:14:28 +11:00
Karroffel 4769f49cb4 Use static linking instead of dynamic linking 2017-07-23 17:53:50 +02:00
Karroffel cf30b0f39d rewrote binding generator in python 2017-05-12 21:53:07 +02:00