aabb.gen.go 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351
  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/aabb.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. // NewEmptyAabb will return a pointer to an empty
  49. // initialized Aabb. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyAabb() Pointer {
  52. var obj C.godot_aabb
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromAabb will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromAabb(obj Aabb) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewAabbFromPointer will return a Aabb from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewAabbFromPointer(ptr Pointer) Aabb {
  63. return Aabb{base: (*C.godot_aabb)(ptr.getBase())}
  64. }
  65. // Aabb data structure wrapper
  66. type Aabb struct {
  67. base *C.godot_aabb
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt Aabb) getBase() *C.godot_aabb {
  71. return gdt.base
  72. }
  73. // NewAabb godot_aabb_new [[godot_aabb * r_dest] [const godot_vector3 * p_pos] [const godot_vector3 * p_size]] void
  74. func NewAabb(pos Vector3, size Vector3) Aabb {
  75. var dest C.godot_aabb
  76. arg1 := pos.getBase()
  77. arg2 := size.getBase()
  78. C.go_godot_aabb_new(GDNative.api, &dest, arg1, arg2)
  79. return Aabb{base: &dest}
  80. }
  81. // GetPosition godot_aabb_get_position [[const godot_aabb * p_self]] godot_vector3
  82. func (gdt *Aabb) GetPosition() Vector3 {
  83. arg0 := gdt.getBase()
  84. ret := C.go_godot_aabb_get_position(GDNative.api, arg0)
  85. return Vector3{base: &ret}
  86. }
  87. // SetPosition godot_aabb_set_position [[const godot_aabb * p_self] [const godot_vector3 * p_v]] void
  88. func (gdt *Aabb) SetPosition(v Vector3) {
  89. arg0 := gdt.getBase()
  90. arg1 := v.getBase()
  91. C.go_godot_aabb_set_position(GDNative.api, arg0, arg1)
  92. }
  93. // GetSize godot_aabb_get_size [[const godot_aabb * p_self]] godot_vector3
  94. func (gdt *Aabb) GetSize() Vector3 {
  95. arg0 := gdt.getBase()
  96. ret := C.go_godot_aabb_get_size(GDNative.api, arg0)
  97. return Vector3{base: &ret}
  98. }
  99. // SetSize godot_aabb_set_size [[const godot_aabb * p_self] [const godot_vector3 * p_v]] void
  100. func (gdt *Aabb) SetSize(v Vector3) {
  101. arg0 := gdt.getBase()
  102. arg1 := v.getBase()
  103. C.go_godot_aabb_set_size(GDNative.api, arg0, arg1)
  104. }
  105. // AsString godot_aabb_as_string [[const godot_aabb * p_self]] godot_string
  106. func (gdt *Aabb) AsString() String {
  107. arg0 := gdt.getBase()
  108. ret := C.go_godot_aabb_as_string(GDNative.api, arg0)
  109. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  110. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  111. goStr := C.GoString(char)
  112. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  113. return String(goStr)
  114. }
  115. // GetArea godot_aabb_get_area [[const godot_aabb * p_self]] godot_real
  116. func (gdt *Aabb) GetArea() Real {
  117. arg0 := gdt.getBase()
  118. ret := C.go_godot_aabb_get_area(GDNative.api, arg0)
  119. return Real(ret)
  120. }
  121. // HasNoArea godot_aabb_has_no_area [[const godot_aabb * p_self]] godot_bool
  122. func (gdt *Aabb) HasNoArea() Bool {
  123. arg0 := gdt.getBase()
  124. ret := C.go_godot_aabb_has_no_area(GDNative.api, arg0)
  125. return Bool(ret)
  126. }
  127. // HasNoSurface godot_aabb_has_no_surface [[const godot_aabb * p_self]] godot_bool
  128. func (gdt *Aabb) HasNoSurface() Bool {
  129. arg0 := gdt.getBase()
  130. ret := C.go_godot_aabb_has_no_surface(GDNative.api, arg0)
  131. return Bool(ret)
  132. }
  133. // Intersects godot_aabb_intersects [[const godot_aabb * p_self] [const godot_aabb * p_with]] godot_bool
  134. func (gdt *Aabb) Intersects(with Aabb) Bool {
  135. arg0 := gdt.getBase()
  136. arg1 := with.getBase()
  137. ret := C.go_godot_aabb_intersects(GDNative.api, arg0, arg1)
  138. return Bool(ret)
  139. }
  140. // Encloses godot_aabb_encloses [[const godot_aabb * p_self] [const godot_aabb * p_with]] godot_bool
  141. func (gdt *Aabb) Encloses(with Aabb) Bool {
  142. arg0 := gdt.getBase()
  143. arg1 := with.getBase()
  144. ret := C.go_godot_aabb_encloses(GDNative.api, arg0, arg1)
  145. return Bool(ret)
  146. }
  147. // Merge godot_aabb_merge [[const godot_aabb * p_self] [const godot_aabb * p_with]] godot_aabb
  148. func (gdt *Aabb) Merge(with Aabb) Aabb {
  149. arg0 := gdt.getBase()
  150. arg1 := with.getBase()
  151. ret := C.go_godot_aabb_merge(GDNative.api, arg0, arg1)
  152. return Aabb{base: &ret}
  153. }
  154. // Intersection godot_aabb_intersection [[const godot_aabb * p_self] [const godot_aabb * p_with]] godot_aabb
  155. func (gdt *Aabb) Intersection(with Aabb) Aabb {
  156. arg0 := gdt.getBase()
  157. arg1 := with.getBase()
  158. ret := C.go_godot_aabb_intersection(GDNative.api, arg0, arg1)
  159. return Aabb{base: &ret}
  160. }
  161. // IntersectsPlane godot_aabb_intersects_plane [[const godot_aabb * p_self] [const godot_plane * p_plane]] godot_bool
  162. func (gdt *Aabb) IntersectsPlane(plane Plane) Bool {
  163. arg0 := gdt.getBase()
  164. arg1 := plane.getBase()
  165. ret := C.go_godot_aabb_intersects_plane(GDNative.api, arg0, arg1)
  166. return Bool(ret)
  167. }
  168. // IntersectsSegment godot_aabb_intersects_segment [[const godot_aabb * p_self] [const godot_vector3 * p_from] [const godot_vector3 * p_to]] godot_bool
  169. func (gdt *Aabb) IntersectsSegment(from Vector3, to Vector3) Bool {
  170. arg0 := gdt.getBase()
  171. arg1 := from.getBase()
  172. arg2 := to.getBase()
  173. ret := C.go_godot_aabb_intersects_segment(GDNative.api, arg0, arg1, arg2)
  174. return Bool(ret)
  175. }
  176. // HasPoint godot_aabb_has_point [[const godot_aabb * p_self] [const godot_vector3 * p_point]] godot_bool
  177. func (gdt *Aabb) HasPoint(point Vector3) Bool {
  178. arg0 := gdt.getBase()
  179. arg1 := point.getBase()
  180. ret := C.go_godot_aabb_has_point(GDNative.api, arg0, arg1)
  181. return Bool(ret)
  182. }
  183. // GetSupport godot_aabb_get_support [[const godot_aabb * p_self] [const godot_vector3 * p_dir]] godot_vector3
  184. func (gdt *Aabb) GetSupport(dir Vector3) Vector3 {
  185. arg0 := gdt.getBase()
  186. arg1 := dir.getBase()
  187. ret := C.go_godot_aabb_get_support(GDNative.api, arg0, arg1)
  188. return Vector3{base: &ret}
  189. }
  190. // GetLongestAxis godot_aabb_get_longest_axis [[const godot_aabb * p_self]] godot_vector3
  191. func (gdt *Aabb) GetLongestAxis() Vector3 {
  192. arg0 := gdt.getBase()
  193. ret := C.go_godot_aabb_get_longest_axis(GDNative.api, arg0)
  194. return Vector3{base: &ret}
  195. }
  196. // GetLongestAxisIndex godot_aabb_get_longest_axis_index [[const godot_aabb * p_self]] godot_int
  197. func (gdt *Aabb) GetLongestAxisIndex() Int {
  198. arg0 := gdt.getBase()
  199. ret := C.go_godot_aabb_get_longest_axis_index(GDNative.api, arg0)
  200. return Int(ret)
  201. }
  202. // GetLongestAxisSize godot_aabb_get_longest_axis_size [[const godot_aabb * p_self]] godot_real
  203. func (gdt *Aabb) GetLongestAxisSize() Real {
  204. arg0 := gdt.getBase()
  205. ret := C.go_godot_aabb_get_longest_axis_size(GDNative.api, arg0)
  206. return Real(ret)
  207. }
  208. // GetShortestAxis godot_aabb_get_shortest_axis [[const godot_aabb * p_self]] godot_vector3
  209. func (gdt *Aabb) GetShortestAxis() Vector3 {
  210. arg0 := gdt.getBase()
  211. ret := C.go_godot_aabb_get_shortest_axis(GDNative.api, arg0)
  212. return Vector3{base: &ret}
  213. }
  214. // GetShortestAxisIndex godot_aabb_get_shortest_axis_index [[const godot_aabb * p_self]] godot_int
  215. func (gdt *Aabb) GetShortestAxisIndex() Int {
  216. arg0 := gdt.getBase()
  217. ret := C.go_godot_aabb_get_shortest_axis_index(GDNative.api, arg0)
  218. return Int(ret)
  219. }
  220. // GetShortestAxisSize godot_aabb_get_shortest_axis_size [[const godot_aabb * p_self]] godot_real
  221. func (gdt *Aabb) GetShortestAxisSize() Real {
  222. arg0 := gdt.getBase()
  223. ret := C.go_godot_aabb_get_shortest_axis_size(GDNative.api, arg0)
  224. return Real(ret)
  225. }
  226. // Expand godot_aabb_expand [[const godot_aabb * p_self] [const godot_vector3 * p_to_point]] godot_aabb
  227. func (gdt *Aabb) Expand(toPoint Vector3) Aabb {
  228. arg0 := gdt.getBase()
  229. arg1 := toPoint.getBase()
  230. ret := C.go_godot_aabb_expand(GDNative.api, arg0, arg1)
  231. return Aabb{base: &ret}
  232. }
  233. // Grow godot_aabb_grow [[const godot_aabb * p_self] [const godot_real p_by]] godot_aabb
  234. func (gdt *Aabb) Grow(by Real) Aabb {
  235. arg0 := gdt.getBase()
  236. arg1 := by.getBase()
  237. ret := C.go_godot_aabb_grow(GDNative.api, arg0, arg1)
  238. return Aabb{base: &ret}
  239. }
  240. // GetEndpoint godot_aabb_get_endpoint [[const godot_aabb * p_self] [const godot_int p_idx]] godot_vector3
  241. func (gdt *Aabb) GetEndpoint(idx Int) Vector3 {
  242. arg0 := gdt.getBase()
  243. arg1 := idx.getBase()
  244. ret := C.go_godot_aabb_get_endpoint(GDNative.api, arg0, arg1)
  245. return Vector3{base: &ret}
  246. }
  247. // OperatorEqual godot_aabb_operator_equal [[const godot_aabb * p_self] [const godot_aabb * p_b]] godot_bool
  248. func (gdt *Aabb) OperatorEqual(b Aabb) Bool {
  249. arg0 := gdt.getBase()
  250. arg1 := b.getBase()
  251. ret := C.go_godot_aabb_operator_equal(GDNative.api, arg0, arg1)
  252. return Bool(ret)
  253. }