diff options
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2017-05-20 15:52:56 +0200 |
---|---|---|
committer | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2017-06-08 07:21:53 +0200 |
commit | 8ecdbfc417409c9c8080580f3963e2397f8bdb78 (patch) | |
tree | e18f5e3bf44de3db54c765b514a05e10828b431e /modules/gdnative/godot/godot_transform.cpp | |
parent | b21e68c8bc0168120ded326259d021d394a9d7bf (diff) | |
download | redot-engine-8ecdbfc417409c9c8080580f3963e2397f8bdb78.tar.gz |
[GDnative] API consistency + missing properties
Diffstat (limited to 'modules/gdnative/godot/godot_transform.cpp')
-rw-r--r-- | modules/gdnative/godot/godot_transform.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/gdnative/godot/godot_transform.cpp b/modules/gdnative/godot/godot_transform.cpp index f5a012f59c..eb9e1e207b 100644 --- a/modules/gdnative/godot/godot_transform.cpp +++ b/modules/gdnative/godot/godot_transform.cpp @@ -57,6 +57,32 @@ void GDAPI godot_transform_new(godot_transform *r_dest, const godot_basis *p_bas *dest = Transform(*basis, *origin); } +godot_basis GDAPI godot_transform_get_basis(const godot_transform *p_self) { + godot_basis dest; + const Transform *self = (const Transform *)p_self; + *((Basis *)&dest) = self->basis; + return dest; +} + +void GDAPI godot_transform_set_basis(godot_transform *p_self, godot_basis *p_v) { + Transform *self = (Transform *)p_self; + const Basis *v = (const Basis *)p_v; + self->basis = *v; +} + +godot_vector3 GDAPI godot_transform_get_origin(const godot_transform *p_self) { + godot_vector3 dest; + const Transform *self = (const Transform *)p_self; + *((Vector3 *)&dest) = self->origin; + return dest; +} + +void GDAPI godot_transform_set_origin(godot_transform *p_self, godot_vector3 *p_v) { + Transform *self = (Transform *)p_self; + const Vector3 *v = (const Vector3 *)p_v; + self->origin = *v; +} + godot_string GDAPI godot_transform_as_string(const godot_transform *p_self) { godot_string ret; const Transform *self = (const Transform *)p_self; |