Commit Graph

14 Commits (925a47f65b93d5a71000240d5696c45639774d5a)

Author SHA1 Message Date
Marc Gilleron 8e1cc29c66 Added missing constants to Vector2, Vector3, Basis and Quat 2020-12-08 23:35:17 +00:00
Silver1063 96ae052e06 Added missing Vector3 slerp and Vector3 project
Vector3 slerp and Vector3 project were missing from godot cpp so I added them.
2020-10-11 17:31:23 -07:00
Silver1063 a733457285 Update Vector3 slide to match godot implementation
It wasn't the same before and resulted in weird behavior, its better now.
2020-10-11 15:47:01 -07:00
Marc Gilleron 0d1511695d Added Godot's math functions 2020-09-04 02:14:45 +01:00
Marc ca800d63c8
Merge pull request #371 from NHodgesVFX/VectorBounceReflectFix
Fix Vector's Bounce Reflect
2020-08-23 22:04:31 +01:00
Jummit 20fdc09c96 Add missing move_toward to Vector2 and Vector3 2020-07-15 17:05:54 +02:00
Marc Gilleron 78f5496f4b Add missing Vector3::direction_to() and Vector2::direction_to() 2020-06-05 19:07:56 +01:00
NHodgesVFX 82476108ba Fix Style Issues 2020-02-06 18:44:50 -05:00
NHodgesVFX a2e6f7a5ef Fix Vector's Bounce Reflect
Fixes Vector 2 and 3 bounce and reflect methods to match gdscript

Co-Authored-By: Bruno Campos <brunocu@msn.com>

Move calculation to reflect

fix commit

squash

fix style
2020-02-06 18:38:39 -05:00
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