basis.gen.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383
  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/basis.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. // NewEmptyBasis will return a pointer to an empty
  49. // initialized Basis. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyBasis() Pointer {
  52. var obj C.godot_basis
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromBasis will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromBasis(obj Basis) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewBasisFromPointer will return a Basis from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewBasisFromPointer(ptr Pointer) Basis {
  63. return Basis{base: (*C.godot_basis)(ptr.getBase())}
  64. }
  65. // Basis data structure wrapper
  66. type Basis struct {
  67. base *C.godot_basis
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt Basis) getBase() *C.godot_basis {
  71. return gdt.base
  72. }
  73. // NewBasisWithRows godot_basis_new_with_rows [[godot_basis * r_dest] [const godot_vector3 * p_x_axis] [const godot_vector3 * p_y_axis] [const godot_vector3 * p_z_axis]] void
  74. func NewBasisWithRows(xAxis Vector3, yAxis Vector3, zAxis Vector3) Basis {
  75. var dest C.godot_basis
  76. arg1 := xAxis.getBase()
  77. arg2 := yAxis.getBase()
  78. arg3 := zAxis.getBase()
  79. C.go_godot_basis_new_with_rows(GDNative.api, &dest, arg1, arg2, arg3)
  80. return Basis{base: &dest}
  81. }
  82. // NewBasisWithAxisAndAngle godot_basis_new_with_axis_and_angle [[godot_basis * r_dest] [const godot_vector3 * p_axis] [const godot_real p_phi]] void
  83. func NewBasisWithAxisAndAngle(axis Vector3, phi Real) Basis {
  84. var dest C.godot_basis
  85. arg1 := axis.getBase()
  86. arg2 := phi.getBase()
  87. C.go_godot_basis_new_with_axis_and_angle(GDNative.api, &dest, arg1, arg2)
  88. return Basis{base: &dest}
  89. }
  90. // NewBasisWithEuler godot_basis_new_with_euler [[godot_basis * r_dest] [const godot_vector3 * p_euler]] void
  91. func NewBasisWithEuler(euler Vector3) Basis {
  92. var dest C.godot_basis
  93. arg1 := euler.getBase()
  94. C.go_godot_basis_new_with_euler(GDNative.api, &dest, arg1)
  95. return Basis{base: &dest}
  96. }
  97. // AsString godot_basis_as_string [[const godot_basis * p_self]] godot_string
  98. func (gdt *Basis) AsString() String {
  99. arg0 := gdt.getBase()
  100. ret := C.go_godot_basis_as_string(GDNative.api, arg0)
  101. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  102. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  103. goStr := C.GoString(char)
  104. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  105. return String(goStr)
  106. }
  107. // Inverse godot_basis_inverse [[const godot_basis * p_self]] godot_basis
  108. func (gdt *Basis) Inverse() Basis {
  109. arg0 := gdt.getBase()
  110. ret := C.go_godot_basis_inverse(GDNative.api, arg0)
  111. return Basis{base: &ret}
  112. }
  113. // Transposed godot_basis_transposed [[const godot_basis * p_self]] godot_basis
  114. func (gdt *Basis) Transposed() Basis {
  115. arg0 := gdt.getBase()
  116. ret := C.go_godot_basis_transposed(GDNative.api, arg0)
  117. return Basis{base: &ret}
  118. }
  119. // Orthonormalized godot_basis_orthonormalized [[const godot_basis * p_self]] godot_basis
  120. func (gdt *Basis) Orthonormalized() Basis {
  121. arg0 := gdt.getBase()
  122. ret := C.go_godot_basis_orthonormalized(GDNative.api, arg0)
  123. return Basis{base: &ret}
  124. }
  125. // Determinant godot_basis_determinant [[const godot_basis * p_self]] godot_real
  126. func (gdt *Basis) Determinant() Real {
  127. arg0 := gdt.getBase()
  128. ret := C.go_godot_basis_determinant(GDNative.api, arg0)
  129. return Real(ret)
  130. }
  131. // Rotated godot_basis_rotated [[const godot_basis * p_self] [const godot_vector3 * p_axis] [const godot_real p_phi]] godot_basis
  132. func (gdt *Basis) Rotated(axis Vector3, phi Real) Basis {
  133. arg0 := gdt.getBase()
  134. arg1 := axis.getBase()
  135. arg2 := phi.getBase()
  136. ret := C.go_godot_basis_rotated(GDNative.api, arg0, arg1, arg2)
  137. return Basis{base: &ret}
  138. }
  139. // Scaled godot_basis_scaled [[const godot_basis * p_self] [const godot_vector3 * p_scale]] godot_basis
  140. func (gdt *Basis) Scaled(scale Vector3) Basis {
  141. arg0 := gdt.getBase()
  142. arg1 := scale.getBase()
  143. ret := C.go_godot_basis_scaled(GDNative.api, arg0, arg1)
  144. return Basis{base: &ret}
  145. }
  146. // GetScale godot_basis_get_scale [[const godot_basis * p_self]] godot_vector3
  147. func (gdt *Basis) GetScale() Vector3 {
  148. arg0 := gdt.getBase()
  149. ret := C.go_godot_basis_get_scale(GDNative.api, arg0)
  150. return Vector3{base: &ret}
  151. }
  152. // GetEuler godot_basis_get_euler [[const godot_basis * p_self]] godot_vector3
  153. func (gdt *Basis) GetEuler() Vector3 {
  154. arg0 := gdt.getBase()
  155. ret := C.go_godot_basis_get_euler(GDNative.api, arg0)
  156. return Vector3{base: &ret}
  157. }
  158. // Tdotx godot_basis_tdotx [[const godot_basis * p_self] [const godot_vector3 * p_with]] godot_real
  159. func (gdt *Basis) Tdotx(with Vector3) Real {
  160. arg0 := gdt.getBase()
  161. arg1 := with.getBase()
  162. ret := C.go_godot_basis_tdotx(GDNative.api, arg0, arg1)
  163. return Real(ret)
  164. }
  165. // Tdoty godot_basis_tdoty [[const godot_basis * p_self] [const godot_vector3 * p_with]] godot_real
  166. func (gdt *Basis) Tdoty(with Vector3) Real {
  167. arg0 := gdt.getBase()
  168. arg1 := with.getBase()
  169. ret := C.go_godot_basis_tdoty(GDNative.api, arg0, arg1)
  170. return Real(ret)
  171. }
  172. // Tdotz godot_basis_tdotz [[const godot_basis * p_self] [const godot_vector3 * p_with]] godot_real
  173. func (gdt *Basis) Tdotz(with Vector3) Real {
  174. arg0 := gdt.getBase()
  175. arg1 := with.getBase()
  176. ret := C.go_godot_basis_tdotz(GDNative.api, arg0, arg1)
  177. return Real(ret)
  178. }
  179. // Xform godot_basis_xform [[const godot_basis * p_self] [const godot_vector3 * p_v]] godot_vector3
  180. func (gdt *Basis) Xform(v Vector3) Vector3 {
  181. arg0 := gdt.getBase()
  182. arg1 := v.getBase()
  183. ret := C.go_godot_basis_xform(GDNative.api, arg0, arg1)
  184. return Vector3{base: &ret}
  185. }
  186. // XformInv godot_basis_xform_inv [[const godot_basis * p_self] [const godot_vector3 * p_v]] godot_vector3
  187. func (gdt *Basis) XformInv(v Vector3) Vector3 {
  188. arg0 := gdt.getBase()
  189. arg1 := v.getBase()
  190. ret := C.go_godot_basis_xform_inv(GDNative.api, arg0, arg1)
  191. return Vector3{base: &ret}
  192. }
  193. // GetOrthogonalIndex godot_basis_get_orthogonal_index [[const godot_basis * p_self]] godot_int
  194. func (gdt *Basis) GetOrthogonalIndex() Int {
  195. arg0 := gdt.getBase()
  196. ret := C.go_godot_basis_get_orthogonal_index(GDNative.api, arg0)
  197. return Int(ret)
  198. }
  199. // NewBasis godot_basis_new [[godot_basis * r_dest]] void
  200. func NewBasis() Basis {
  201. var dest C.godot_basis
  202. C.go_godot_basis_new(GDNative.api, &dest)
  203. return Basis{base: &dest}
  204. }
  205. // NewBasisWithEulerQuat godot_basis_new_with_euler_quat [[godot_basis * r_dest] [const godot_quat * p_euler]] void
  206. func NewBasisWithEulerQuat(euler Quat) Basis {
  207. var dest C.godot_basis
  208. arg1 := euler.getBase()
  209. C.go_godot_basis_new_with_euler_quat(GDNative.api, &dest, arg1)
  210. return Basis{base: &dest}
  211. }
  212. // GetElements godot_basis_get_elements [[const godot_basis * p_self] [godot_vector3 * p_elements]] void
  213. func (gdt *Basis) GetElements(elements Vector3) {
  214. arg0 := gdt.getBase()
  215. arg1 := elements.getBase()
  216. C.go_godot_basis_get_elements(GDNative.api, arg0, arg1)
  217. }
  218. // GetAxis godot_basis_get_axis [[const godot_basis * p_self] [const godot_int p_axis]] godot_vector3
  219. func (gdt *Basis) GetAxis(axis Int) Vector3 {
  220. arg0 := gdt.getBase()
  221. arg1 := axis.getBase()
  222. ret := C.go_godot_basis_get_axis(GDNative.api, arg0, arg1)
  223. return Vector3{base: &ret}
  224. }
  225. // SetAxis godot_basis_set_axis [[godot_basis * p_self] [const godot_int p_axis] [const godot_vector3 * p_value]] void
  226. func (gdt *Basis) SetAxis(axis Int, value Vector3) {
  227. arg0 := gdt.getBase()
  228. arg1 := axis.getBase()
  229. arg2 := value.getBase()
  230. C.go_godot_basis_set_axis(GDNative.api, arg0, arg1, arg2)
  231. }
  232. // GetRow godot_basis_get_row [[const godot_basis * p_self] [const godot_int p_row]] godot_vector3
  233. func (gdt *Basis) GetRow(row Int) Vector3 {
  234. arg0 := gdt.getBase()
  235. arg1 := row.getBase()
  236. ret := C.go_godot_basis_get_row(GDNative.api, arg0, arg1)
  237. return Vector3{base: &ret}
  238. }
  239. // SetRow godot_basis_set_row [[godot_basis * p_self] [const godot_int p_row] [const godot_vector3 * p_value]] void
  240. func (gdt *Basis) SetRow(row Int, value Vector3) {
  241. arg0 := gdt.getBase()
  242. arg1 := row.getBase()
  243. arg2 := value.getBase()
  244. C.go_godot_basis_set_row(GDNative.api, arg0, arg1, arg2)
  245. }
  246. // OperatorEqual godot_basis_operator_equal [[const godot_basis * p_self] [const godot_basis * p_b]] godot_bool
  247. func (gdt *Basis) OperatorEqual(b Basis) Bool {
  248. arg0 := gdt.getBase()
  249. arg1 := b.getBase()
  250. ret := C.go_godot_basis_operator_equal(GDNative.api, arg0, arg1)
  251. return Bool(ret)
  252. }
  253. // OperatorAdd godot_basis_operator_add [[const godot_basis * p_self] [const godot_basis * p_b]] godot_basis
  254. func (gdt *Basis) OperatorAdd(b Basis) Basis {
  255. arg0 := gdt.getBase()
  256. arg1 := b.getBase()
  257. ret := C.go_godot_basis_operator_add(GDNative.api, arg0, arg1)
  258. return Basis{base: &ret}
  259. }
  260. // OperatorSubtract godot_basis_operator_subtract [[const godot_basis * p_self] [const godot_basis * p_b]] godot_basis
  261. func (gdt *Basis) OperatorSubtract(b Basis) Basis {
  262. arg0 := gdt.getBase()
  263. arg1 := b.getBase()
  264. ret := C.go_godot_basis_operator_subtract(GDNative.api, arg0, arg1)
  265. return Basis{base: &ret}
  266. }
  267. // OperatorMultiplyVector godot_basis_operator_multiply_vector [[const godot_basis * p_self] [const godot_basis * p_b]] godot_basis
  268. func (gdt *Basis) OperatorMultiplyVector(b Basis) Basis {
  269. arg0 := gdt.getBase()
  270. arg1 := b.getBase()
  271. ret := C.go_godot_basis_operator_multiply_vector(GDNative.api, arg0, arg1)
  272. return Basis{base: &ret}
  273. }
  274. // OperatorMultiplyScalar godot_basis_operator_multiply_scalar [[const godot_basis * p_self] [const godot_real p_b]] godot_basis
  275. func (gdt *Basis) OperatorMultiplyScalar(b Real) Basis {
  276. arg0 := gdt.getBase()
  277. arg1 := b.getBase()
  278. ret := C.go_godot_basis_operator_multiply_scalar(GDNative.api, arg0, arg1)
  279. return Basis{base: &ret}
  280. }