plane.gen.go 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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/plane.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. // NewEmptyPlane will return a pointer to an empty
  49. // initialized Plane. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyPlane() Pointer {
  52. var obj C.godot_plane
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromPlane will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromPlane(obj Plane) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewPlaneFromPointer will return a Plane from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewPlaneFromPointer(ptr Pointer) Plane {
  63. return Plane{base: (*C.godot_plane)(ptr.getBase())}
  64. }
  65. // Plane data structure wrapper
  66. type Plane struct {
  67. base *C.godot_plane
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt Plane) getBase() *C.godot_plane {
  71. return gdt.base
  72. }
  73. // NewPlaneWithReals godot_plane_new_with_reals [[godot_plane * r_dest] [const godot_real p_a] [const godot_real p_b] [const godot_real p_c] [const godot_real p_d]] void
  74. func NewPlaneWithReals(a Real, b Real, c Real, d Real) Plane {
  75. var dest C.godot_plane
  76. arg1 := a.getBase()
  77. arg2 := b.getBase()
  78. arg3 := c.getBase()
  79. arg4 := d.getBase()
  80. C.go_godot_plane_new_with_reals(GDNative.api, &dest, arg1, arg2, arg3, arg4)
  81. return Plane{base: &dest}
  82. }
  83. // NewPlaneWithVectors godot_plane_new_with_vectors [[godot_plane * r_dest] [const godot_vector3 * p_v1] [const godot_vector3 * p_v2] [const godot_vector3 * p_v3]] void
  84. func NewPlaneWithVectors(v1 Vector3, v2 Vector3, v3 Vector3) Plane {
  85. var dest C.godot_plane
  86. arg1 := v1.getBase()
  87. arg2 := v2.getBase()
  88. arg3 := v3.getBase()
  89. C.go_godot_plane_new_with_vectors(GDNative.api, &dest, arg1, arg2, arg3)
  90. return Plane{base: &dest}
  91. }
  92. // NewPlaneWithNormal godot_plane_new_with_normal [[godot_plane * r_dest] [const godot_vector3 * p_normal] [const godot_real p_d]] void
  93. func NewPlaneWithNormal(normal Vector3, d Real) Plane {
  94. var dest C.godot_plane
  95. arg1 := normal.getBase()
  96. arg2 := d.getBase()
  97. C.go_godot_plane_new_with_normal(GDNative.api, &dest, arg1, arg2)
  98. return Plane{base: &dest}
  99. }
  100. // AsString godot_plane_as_string [[const godot_plane * p_self]] godot_string
  101. func (gdt *Plane) AsString() String {
  102. arg0 := gdt.getBase()
  103. ret := C.go_godot_plane_as_string(GDNative.api, arg0)
  104. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  105. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  106. goStr := C.GoString(char)
  107. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  108. return String(goStr)
  109. }
  110. // Normalized godot_plane_normalized [[const godot_plane * p_self]] godot_plane
  111. func (gdt *Plane) Normalized() Plane {
  112. arg0 := gdt.getBase()
  113. ret := C.go_godot_plane_normalized(GDNative.api, arg0)
  114. return Plane{base: &ret}
  115. }
  116. // Center godot_plane_center [[const godot_plane * p_self]] godot_vector3
  117. func (gdt *Plane) Center() Vector3 {
  118. arg0 := gdt.getBase()
  119. ret := C.go_godot_plane_center(GDNative.api, arg0)
  120. return Vector3{base: &ret}
  121. }
  122. // GetAnyPoint godot_plane_get_any_point [[const godot_plane * p_self]] godot_vector3
  123. func (gdt *Plane) GetAnyPoint() Vector3 {
  124. arg0 := gdt.getBase()
  125. ret := C.go_godot_plane_get_any_point(GDNative.api, arg0)
  126. return Vector3{base: &ret}
  127. }
  128. // IsPointOver godot_plane_is_point_over [[const godot_plane * p_self] [const godot_vector3 * p_point]] godot_bool
  129. func (gdt *Plane) IsPointOver(point Vector3) Bool {
  130. arg0 := gdt.getBase()
  131. arg1 := point.getBase()
  132. ret := C.go_godot_plane_is_point_over(GDNative.api, arg0, arg1)
  133. return Bool(ret)
  134. }
  135. // DistanceTo godot_plane_distance_to [[const godot_plane * p_self] [const godot_vector3 * p_point]] godot_real
  136. func (gdt *Plane) DistanceTo(point Vector3) Real {
  137. arg0 := gdt.getBase()
  138. arg1 := point.getBase()
  139. ret := C.go_godot_plane_distance_to(GDNative.api, arg0, arg1)
  140. return Real(ret)
  141. }
  142. // HasPoint godot_plane_has_point [[const godot_plane * p_self] [const godot_vector3 * p_point] [const godot_real p_epsilon]] godot_bool
  143. func (gdt *Plane) HasPoint(point Vector3, epsilon Real) Bool {
  144. arg0 := gdt.getBase()
  145. arg1 := point.getBase()
  146. arg2 := epsilon.getBase()
  147. ret := C.go_godot_plane_has_point(GDNative.api, arg0, arg1, arg2)
  148. return Bool(ret)
  149. }
  150. // Project godot_plane_project [[const godot_plane * p_self] [const godot_vector3 * p_point]] godot_vector3
  151. func (gdt *Plane) Project(point Vector3) Vector3 {
  152. arg0 := gdt.getBase()
  153. arg1 := point.getBase()
  154. ret := C.go_godot_plane_project(GDNative.api, arg0, arg1)
  155. return Vector3{base: &ret}
  156. }
  157. // Intersect3 godot_plane_intersect_3 [[const godot_plane * p_self] [godot_vector3 * r_dest] [const godot_plane * p_b] [const godot_plane * p_c]] godot_bool
  158. func (gdt *Plane) Intersect3(dest Vector3, b Plane, c Plane) Bool {
  159. arg0 := gdt.getBase()
  160. arg1 := dest.getBase()
  161. arg2 := b.getBase()
  162. arg3 := c.getBase()
  163. ret := C.go_godot_plane_intersect_3(GDNative.api, arg0, arg1, arg2, arg3)
  164. return Bool(ret)
  165. }
  166. // IntersectsRay godot_plane_intersects_ray [[const godot_plane * p_self] [godot_vector3 * r_dest] [const godot_vector3 * p_from] [const godot_vector3 * p_dir]] godot_bool
  167. func (gdt *Plane) IntersectsRay(dest Vector3, from Vector3, dir Vector3) Bool {
  168. arg0 := gdt.getBase()
  169. arg1 := dest.getBase()
  170. arg2 := from.getBase()
  171. arg3 := dir.getBase()
  172. ret := C.go_godot_plane_intersects_ray(GDNative.api, arg0, arg1, arg2, arg3)
  173. return Bool(ret)
  174. }
  175. // IntersectsSegment godot_plane_intersects_segment [[const godot_plane * p_self] [godot_vector3 * r_dest] [const godot_vector3 * p_begin] [const godot_vector3 * p_end]] godot_bool
  176. func (gdt *Plane) IntersectsSegment(dest Vector3, begin Vector3, end Vector3) Bool {
  177. arg0 := gdt.getBase()
  178. arg1 := dest.getBase()
  179. arg2 := begin.getBase()
  180. arg3 := end.getBase()
  181. ret := C.go_godot_plane_intersects_segment(GDNative.api, arg0, arg1, arg2, arg3)
  182. return Bool(ret)
  183. }
  184. // OperatorNeg godot_plane_operator_neg [[const godot_plane * p_self]] godot_plane
  185. func (gdt *Plane) OperatorNeg() Plane {
  186. arg0 := gdt.getBase()
  187. ret := C.go_godot_plane_operator_neg(GDNative.api, arg0)
  188. return Plane{base: &ret}
  189. }
  190. // OperatorEqual godot_plane_operator_equal [[const godot_plane * p_self] [const godot_plane * p_b]] godot_bool
  191. func (gdt *Plane) OperatorEqual(b Plane) Bool {
  192. arg0 := gdt.getBase()
  193. arg1 := b.getBase()
  194. ret := C.go_godot_plane_operator_equal(GDNative.api, arg0, arg1)
  195. return Bool(ret)
  196. }
  197. // SetNormal godot_plane_set_normal [[godot_plane * p_self] [const godot_vector3 * p_normal]] void
  198. func (gdt *Plane) SetNormal(normal Vector3) {
  199. arg0 := gdt.getBase()
  200. arg1 := normal.getBase()
  201. C.go_godot_plane_set_normal(GDNative.api, arg0, arg1)
  202. }
  203. // GetNormal godot_plane_get_normal [[const godot_plane * p_self]] godot_vector3
  204. func (gdt *Plane) GetNormal() Vector3 {
  205. arg0 := gdt.getBase()
  206. ret := C.go_godot_plane_get_normal(GDNative.api, arg0)
  207. return Vector3{base: &ret}
  208. }
  209. // GetD godot_plane_get_d [[const godot_plane * p_self]] godot_real
  210. func (gdt *Plane) GetD() Real {
  211. arg0 := gdt.getBase()
  212. ret := C.go_godot_plane_get_d(GDNative.api, arg0)
  213. return Real(ret)
  214. }
  215. // SetD godot_plane_set_d [[godot_plane * p_self] [const godot_real p_d]] void
  216. func (gdt *Plane) SetD(d Real) {
  217. arg0 := gdt.getBase()
  218. arg1 := d.getBase()
  219. C.go_godot_plane_set_d(GDNative.api, arg0, arg1)
  220. }