transform.gen.go 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. // Copyright © 2019 - 2020 Oscar Campos <oscar.campos@thepimpam.com>
  2. // Copyright © 2017 - William Edwards
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. package gdnative
  16. // ==================================================================
  17. // This file was autogenerated by PimPam GDNative-Go binding tools
  18. // Please do not modify this file, any change will be lost
  19. // ==================================================================
  20. /*
  21. #include "gdnative.gen.h"
  22. #include <gdnative/transform.h>
  23. // Include all headers for now. TODO: Look up all the required
  24. // headers we need to import based on the method arguments and return types.
  25. #include <gdnative/aabb.h>
  26. #include <gdnative/array.h>
  27. #include <gdnative/basis.h>
  28. #include <gdnative/color.h>
  29. #include <gdnative/dictionary.h>
  30. #include <gdnative/gdnative.h>
  31. #include <gdnative/node_path.h>
  32. #include <gdnative/plane.h>
  33. #include <gdnative/pool_arrays.h>
  34. #include <gdnative/quat.h>
  35. #include <gdnative/rect2.h>
  36. #include <gdnative/rid.h>
  37. #include <gdnative/string.h>
  38. #include <gdnative/string_name.h>
  39. #include <gdnative/transform.h>
  40. #include <gdnative/transform2d.h>
  41. #include <gdnative/variant.h>
  42. #include <gdnative/vector2.h>
  43. #include <gdnative/vector3.h>
  44. #include <gdnative_api_struct.gen.h>
  45. */
  46. import "C"
  47. import "unsafe"
  48. // NewEmptyTransform will return a pointer to an empty
  49. // initialized Transform. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyTransform() Pointer {
  52. var obj C.godot_transform
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromTransform will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromTransform(obj Transform) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewTransformFromPointer will return a Transform from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewTransformFromPointer(ptr Pointer) Transform {
  63. return Transform{base: (*C.godot_transform)(ptr.getBase())}
  64. }
  65. // Transform data structure wrapper
  66. type Transform struct {
  67. base *C.godot_transform
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt Transform) getBase() *C.godot_transform {
  71. return gdt.base
  72. }
  73. // NewTransformWithAxisOrigin godot_transform_new_with_axis_origin [[godot_transform * r_dest] [const godot_vector3 * p_x_axis] [const godot_vector3 * p_y_axis] [const godot_vector3 * p_z_axis] [const godot_vector3 * p_origin]] void
  74. func NewTransformWithAxisOrigin(xAxis Vector3, yAxis Vector3, zAxis Vector3, origin Vector3) Transform {
  75. var dest C.godot_transform
  76. arg1 := xAxis.getBase()
  77. arg2 := yAxis.getBase()
  78. arg3 := zAxis.getBase()
  79. arg4 := origin.getBase()
  80. C.go_godot_transform_new_with_axis_origin(GDNative.api, &dest, arg1, arg2, arg3, arg4)
  81. return Transform{base: &dest}
  82. }
  83. // NewTransform godot_transform_new [[godot_transform * r_dest] [const godot_basis * p_basis] [const godot_vector3 * p_origin]] void
  84. func NewTransform(basis Basis, origin Vector3) Transform {
  85. var dest C.godot_transform
  86. arg1 := basis.getBase()
  87. arg2 := origin.getBase()
  88. C.go_godot_transform_new(GDNative.api, &dest, arg1, arg2)
  89. return Transform{base: &dest}
  90. }
  91. // GetBasis godot_transform_get_basis [[const godot_transform * p_self]] godot_basis
  92. func (gdt *Transform) GetBasis() Basis {
  93. arg0 := gdt.getBase()
  94. ret := C.go_godot_transform_get_basis(GDNative.api, arg0)
  95. return Basis{base: &ret}
  96. }
  97. // SetBasis godot_transform_set_basis [[godot_transform * p_self] [const godot_basis * p_v]] void
  98. func (gdt *Transform) SetBasis(v Basis) {
  99. arg0 := gdt.getBase()
  100. arg1 := v.getBase()
  101. C.go_godot_transform_set_basis(GDNative.api, arg0, arg1)
  102. }
  103. // GetOrigin godot_transform_get_origin [[const godot_transform * p_self]] godot_vector3
  104. func (gdt *Transform) GetOrigin() Vector3 {
  105. arg0 := gdt.getBase()
  106. ret := C.go_godot_transform_get_origin(GDNative.api, arg0)
  107. return Vector3{base: &ret}
  108. }
  109. // SetOrigin godot_transform_set_origin [[godot_transform * p_self] [const godot_vector3 * p_v]] void
  110. func (gdt *Transform) SetOrigin(v Vector3) {
  111. arg0 := gdt.getBase()
  112. arg1 := v.getBase()
  113. C.go_godot_transform_set_origin(GDNative.api, arg0, arg1)
  114. }
  115. // AsString godot_transform_as_string [[const godot_transform * p_self]] godot_string
  116. func (gdt *Transform) AsString() String {
  117. arg0 := gdt.getBase()
  118. ret := C.go_godot_transform_as_string(GDNative.api, arg0)
  119. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  120. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  121. goStr := C.GoString(char)
  122. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  123. return String(goStr)
  124. }
  125. // Inverse godot_transform_inverse [[const godot_transform * p_self]] godot_transform
  126. func (gdt *Transform) Inverse() Transform {
  127. arg0 := gdt.getBase()
  128. ret := C.go_godot_transform_inverse(GDNative.api, arg0)
  129. return Transform{base: &ret}
  130. }
  131. // AffineInverse godot_transform_affine_inverse [[const godot_transform * p_self]] godot_transform
  132. func (gdt *Transform) AffineInverse() Transform {
  133. arg0 := gdt.getBase()
  134. ret := C.go_godot_transform_affine_inverse(GDNative.api, arg0)
  135. return Transform{base: &ret}
  136. }
  137. // Orthonormalized godot_transform_orthonormalized [[const godot_transform * p_self]] godot_transform
  138. func (gdt *Transform) Orthonormalized() Transform {
  139. arg0 := gdt.getBase()
  140. ret := C.go_godot_transform_orthonormalized(GDNative.api, arg0)
  141. return Transform{base: &ret}
  142. }
  143. // Rotated godot_transform_rotated [[const godot_transform * p_self] [const godot_vector3 * p_axis] [const godot_real p_phi]] godot_transform
  144. func (gdt *Transform) Rotated(axis Vector3, phi Real) Transform {
  145. arg0 := gdt.getBase()
  146. arg1 := axis.getBase()
  147. arg2 := phi.getBase()
  148. ret := C.go_godot_transform_rotated(GDNative.api, arg0, arg1, arg2)
  149. return Transform{base: &ret}
  150. }
  151. // Scaled godot_transform_scaled [[const godot_transform * p_self] [const godot_vector3 * p_scale]] godot_transform
  152. func (gdt *Transform) Scaled(scale Vector3) Transform {
  153. arg0 := gdt.getBase()
  154. arg1 := scale.getBase()
  155. ret := C.go_godot_transform_scaled(GDNative.api, arg0, arg1)
  156. return Transform{base: &ret}
  157. }
  158. // Translated godot_transform_translated [[const godot_transform * p_self] [const godot_vector3 * p_ofs]] godot_transform
  159. func (gdt *Transform) Translated(ofs Vector3) Transform {
  160. arg0 := gdt.getBase()
  161. arg1 := ofs.getBase()
  162. ret := C.go_godot_transform_translated(GDNative.api, arg0, arg1)
  163. return Transform{base: &ret}
  164. }
  165. // LookingAt godot_transform_looking_at [[const godot_transform * p_self] [const godot_vector3 * p_target] [const godot_vector3 * p_up]] godot_transform
  166. func (gdt *Transform) LookingAt(target Vector3, up Vector3) Transform {
  167. arg0 := gdt.getBase()
  168. arg1 := target.getBase()
  169. arg2 := up.getBase()
  170. ret := C.go_godot_transform_looking_at(GDNative.api, arg0, arg1, arg2)
  171. return Transform{base: &ret}
  172. }
  173. // XformPlane godot_transform_xform_plane [[const godot_transform * p_self] [const godot_plane * p_v]] godot_plane
  174. func (gdt *Transform) XformPlane(v Plane) Plane {
  175. arg0 := gdt.getBase()
  176. arg1 := v.getBase()
  177. ret := C.go_godot_transform_xform_plane(GDNative.api, arg0, arg1)
  178. return Plane{base: &ret}
  179. }
  180. // XformInvPlane godot_transform_xform_inv_plane [[const godot_transform * p_self] [const godot_plane * p_v]] godot_plane
  181. func (gdt *Transform) XformInvPlane(v Plane) Plane {
  182. arg0 := gdt.getBase()
  183. arg1 := v.getBase()
  184. ret := C.go_godot_transform_xform_inv_plane(GDNative.api, arg0, arg1)
  185. return Plane{base: &ret}
  186. }
  187. // NewTransformIdentity godot_transform_new_identity [[godot_transform * r_dest]] void
  188. func NewTransformIdentity() Transform {
  189. var dest C.godot_transform
  190. C.go_godot_transform_new_identity(GDNative.api, &dest)
  191. return Transform{base: &dest}
  192. }
  193. // OperatorEqual godot_transform_operator_equal [[const godot_transform * p_self] [const godot_transform * p_b]] godot_bool
  194. func (gdt *Transform) OperatorEqual(b Transform) Bool {
  195. arg0 := gdt.getBase()
  196. arg1 := b.getBase()
  197. ret := C.go_godot_transform_operator_equal(GDNative.api, arg0, arg1)
  198. return Bool(ret)
  199. }
  200. // OperatorMultiply godot_transform_operator_multiply [[const godot_transform * p_self] [const godot_transform * p_b]] godot_transform
  201. func (gdt *Transform) OperatorMultiply(b Transform) Transform {
  202. arg0 := gdt.getBase()
  203. arg1 := b.getBase()
  204. ret := C.go_godot_transform_operator_multiply(GDNative.api, arg0, arg1)
  205. return Transform{base: &ret}
  206. }
  207. // XformVector3 godot_transform_xform_vector3 [[const godot_transform * p_self] [const godot_vector3 * p_v]] godot_vector3
  208. func (gdt *Transform) XformVector3(v Vector3) Vector3 {
  209. arg0 := gdt.getBase()
  210. arg1 := v.getBase()
  211. ret := C.go_godot_transform_xform_vector3(GDNative.api, arg0, arg1)
  212. return Vector3{base: &ret}
  213. }
  214. // XformInvVector3 godot_transform_xform_inv_vector3 [[const godot_transform * p_self] [const godot_vector3 * p_v]] godot_vector3
  215. func (gdt *Transform) XformInvVector3(v Vector3) Vector3 {
  216. arg0 := gdt.getBase()
  217. arg1 := v.getBase()
  218. ret := C.go_godot_transform_xform_inv_vector3(GDNative.api, arg0, arg1)
  219. return Vector3{base: &ret}
  220. }
  221. // XformAabb godot_transform_xform_aabb [[const godot_transform * p_self] [const godot_aabb * p_v]] godot_aabb
  222. func (gdt *Transform) XformAabb(v Aabb) Aabb {
  223. arg0 := gdt.getBase()
  224. arg1 := v.getBase()
  225. ret := C.go_godot_transform_xform_aabb(GDNative.api, arg0, arg1)
  226. return Aabb{base: &ret}
  227. }
  228. // XformInvAabb godot_transform_xform_inv_aabb [[const godot_transform * p_self] [const godot_aabb * p_v]] godot_aabb
  229. func (gdt *Transform) XformInvAabb(v Aabb) Aabb {
  230. arg0 := gdt.getBase()
  231. arg1 := v.getBase()
  232. ret := C.go_godot_transform_xform_inv_aabb(GDNative.api, arg0, arg1)
  233. return Aabb{base: &ret}
  234. }