transform2d.gen.go 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  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/transform2d.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. // NewEmptyTransform2D will return a pointer to an empty
  49. // initialized Transform2D. This is primarily used in
  50. // conjunction with MethodBindPtrCall.
  51. func NewEmptyTransform2D() Pointer {
  52. var obj C.godot_transform2d
  53. return Pointer{base: unsafe.Pointer(&obj)}
  54. }
  55. // NewPointerFromTransform2D will return an unsafe pointer to the given
  56. // object. This is primarily used in conjunction with MethodBindPtrCall.
  57. func NewPointerFromTransform2D(obj Transform2D) Pointer {
  58. return Pointer{base: unsafe.Pointer(obj.getBase())}
  59. }
  60. // NewTransform2DFromPointer will return a Transform2D from the
  61. // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
  62. func NewTransform2DFromPointer(ptr Pointer) Transform2D {
  63. return Transform2D{base: (*C.godot_transform2d)(ptr.getBase())}
  64. }
  65. // Transform2D data structure wrapper
  66. type Transform2D struct {
  67. base *C.godot_transform2d
  68. }
  69. // returns the wrapped C base data type for this type
  70. func (gdt Transform2D) getBase() *C.godot_transform2d {
  71. return gdt.base
  72. }
  73. // AsString godot_transform2d_as_string [[const godot_transform2d * p_self]] godot_string
  74. func (gdt *Transform2D) AsString() String {
  75. arg0 := gdt.getBase()
  76. ret := C.go_godot_transform2d_as_string(GDNative.api, arg0)
  77. utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
  78. char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
  79. goStr := C.GoString(char)
  80. C.go_godot_char_string_destroy(GDNative.api, &utfStr)
  81. return String(goStr)
  82. }
  83. // Inverse godot_transform2d_inverse [[const godot_transform2d * p_self]] godot_transform2d
  84. func (gdt *Transform2D) Inverse() Transform2D {
  85. arg0 := gdt.getBase()
  86. ret := C.go_godot_transform2d_inverse(GDNative.api, arg0)
  87. return Transform2D{base: &ret}
  88. }
  89. // AffineInverse godot_transform2d_affine_inverse [[const godot_transform2d * p_self]] godot_transform2d
  90. func (gdt *Transform2D) AffineInverse() Transform2D {
  91. arg0 := gdt.getBase()
  92. ret := C.go_godot_transform2d_affine_inverse(GDNative.api, arg0)
  93. return Transform2D{base: &ret}
  94. }
  95. // GetRotation godot_transform2d_get_rotation [[const godot_transform2d * p_self]] godot_real
  96. func (gdt *Transform2D) GetRotation() Real {
  97. arg0 := gdt.getBase()
  98. ret := C.go_godot_transform2d_get_rotation(GDNative.api, arg0)
  99. return Real(ret)
  100. }
  101. // GetOrigin godot_transform2d_get_origin [[const godot_transform2d * p_self]] godot_vector2
  102. func (gdt *Transform2D) GetOrigin() Vector2 {
  103. arg0 := gdt.getBase()
  104. ret := C.go_godot_transform2d_get_origin(GDNative.api, arg0)
  105. return Vector2{base: &ret}
  106. }
  107. // GetScale godot_transform2d_get_scale [[const godot_transform2d * p_self]] godot_vector2
  108. func (gdt *Transform2D) GetScale() Vector2 {
  109. arg0 := gdt.getBase()
  110. ret := C.go_godot_transform2d_get_scale(GDNative.api, arg0)
  111. return Vector2{base: &ret}
  112. }
  113. // Orthonormalized godot_transform2d_orthonormalized [[const godot_transform2d * p_self]] godot_transform2d
  114. func (gdt *Transform2D) Orthonormalized() Transform2D {
  115. arg0 := gdt.getBase()
  116. ret := C.go_godot_transform2d_orthonormalized(GDNative.api, arg0)
  117. return Transform2D{base: &ret}
  118. }
  119. // Rotated godot_transform2d_rotated [[const godot_transform2d * p_self] [const godot_real p_phi]] godot_transform2d
  120. func (gdt *Transform2D) Rotated(phi Real) Transform2D {
  121. arg0 := gdt.getBase()
  122. arg1 := phi.getBase()
  123. ret := C.go_godot_transform2d_rotated(GDNative.api, arg0, arg1)
  124. return Transform2D{base: &ret}
  125. }
  126. // Scaled godot_transform2d_scaled [[const godot_transform2d * p_self] [const godot_vector2 * p_scale]] godot_transform2d
  127. func (gdt *Transform2D) Scaled(scale Vector2) Transform2D {
  128. arg0 := gdt.getBase()
  129. arg1 := scale.getBase()
  130. ret := C.go_godot_transform2d_scaled(GDNative.api, arg0, arg1)
  131. return Transform2D{base: &ret}
  132. }
  133. // Translated godot_transform2d_translated [[const godot_transform2d * p_self] [const godot_vector2 * p_offset]] godot_transform2d
  134. func (gdt *Transform2D) Translated(offset Vector2) Transform2D {
  135. arg0 := gdt.getBase()
  136. arg1 := offset.getBase()
  137. ret := C.go_godot_transform2d_translated(GDNative.api, arg0, arg1)
  138. return Transform2D{base: &ret}
  139. }
  140. // XformVector2 godot_transform2d_xform_vector2 [[const godot_transform2d * p_self] [const godot_vector2 * p_v]] godot_vector2
  141. func (gdt *Transform2D) XformVector2(v Vector2) Vector2 {
  142. arg0 := gdt.getBase()
  143. arg1 := v.getBase()
  144. ret := C.go_godot_transform2d_xform_vector2(GDNative.api, arg0, arg1)
  145. return Vector2{base: &ret}
  146. }
  147. // XformInvVector2 godot_transform2d_xform_inv_vector2 [[const godot_transform2d * p_self] [const godot_vector2 * p_v]] godot_vector2
  148. func (gdt *Transform2D) XformInvVector2(v Vector2) Vector2 {
  149. arg0 := gdt.getBase()
  150. arg1 := v.getBase()
  151. ret := C.go_godot_transform2d_xform_inv_vector2(GDNative.api, arg0, arg1)
  152. return Vector2{base: &ret}
  153. }
  154. // BasisXformVector2 godot_transform2d_basis_xform_vector2 [[const godot_transform2d * p_self] [const godot_vector2 * p_v]] godot_vector2
  155. func (gdt *Transform2D) BasisXformVector2(v Vector2) Vector2 {
  156. arg0 := gdt.getBase()
  157. arg1 := v.getBase()
  158. ret := C.go_godot_transform2d_basis_xform_vector2(GDNative.api, arg0, arg1)
  159. return Vector2{base: &ret}
  160. }
  161. // BasisXformInvVector2 godot_transform2d_basis_xform_inv_vector2 [[const godot_transform2d * p_self] [const godot_vector2 * p_v]] godot_vector2
  162. func (gdt *Transform2D) BasisXformInvVector2(v Vector2) Vector2 {
  163. arg0 := gdt.getBase()
  164. arg1 := v.getBase()
  165. ret := C.go_godot_transform2d_basis_xform_inv_vector2(GDNative.api, arg0, arg1)
  166. return Vector2{base: &ret}
  167. }
  168. // InterpolateWith godot_transform2d_interpolate_with [[const godot_transform2d * p_self] [const godot_transform2d * p_m] [const godot_real p_c]] godot_transform2d
  169. func (gdt *Transform2D) InterpolateWith(m Transform2D, c Real) Transform2D {
  170. arg0 := gdt.getBase()
  171. arg1 := m.getBase()
  172. arg2 := c.getBase()
  173. ret := C.go_godot_transform2d_interpolate_with(GDNative.api, arg0, arg1, arg2)
  174. return Transform2D{base: &ret}
  175. }
  176. // OperatorEqual godot_transform2d_operator_equal [[const godot_transform2d * p_self] [const godot_transform2d * p_b]] godot_bool
  177. func (gdt *Transform2D) OperatorEqual(b Transform2D) Bool {
  178. arg0 := gdt.getBase()
  179. arg1 := b.getBase()
  180. ret := C.go_godot_transform2d_operator_equal(GDNative.api, arg0, arg1)
  181. return Bool(ret)
  182. }
  183. // OperatorMultiply godot_transform2d_operator_multiply [[const godot_transform2d * p_self] [const godot_transform2d * p_b]] godot_transform2d
  184. func (gdt *Transform2D) OperatorMultiply(b Transform2D) Transform2D {
  185. arg0 := gdt.getBase()
  186. arg1 := b.getBase()
  187. ret := C.go_godot_transform2d_operator_multiply(GDNative.api, arg0, arg1)
  188. return Transform2D{base: &ret}
  189. }
  190. // XformRect2 godot_transform2d_xform_rect2 [[const godot_transform2d * p_self] [const godot_rect2 * p_v]] godot_rect2
  191. func (gdt *Transform2D) XformRect2(v Rect2) Rect2 {
  192. arg0 := gdt.getBase()
  193. arg1 := v.getBase()
  194. ret := C.go_godot_transform2d_xform_rect2(GDNative.api, arg0, arg1)
  195. return Rect2{base: &ret}
  196. }
  197. // XformInvRect2 godot_transform2d_xform_inv_rect2 [[const godot_transform2d * p_self] [const godot_rect2 * p_v]] godot_rect2
  198. func (gdt *Transform2D) XformInvRect2(v Rect2) Rect2 {
  199. arg0 := gdt.getBase()
  200. arg1 := v.getBase()
  201. ret := C.go_godot_transform2d_xform_inv_rect2(GDNative.api, arg0, arg1)
  202. return Rect2{base: &ret}
  203. }