transform2d.go 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. package gdnative
  2. /*
  3. #include <gdnative/gdnative.h>
  4. #include "gdnative.gen.h"
  5. */
  6. import "C"
  7. // NewTransform2D godot_transform2d_new [[godot_transform2d * r_dest] [const godot_real p_rot] [const godot_vector2 * p_pos]] void
  8. func NewTransform2D(rot Real, pos Vector2) *Transform2D {
  9. var dest C.godot_transform2d
  10. arg1 := rot.getBase()
  11. arg2 := pos.getBase()
  12. C.go_godot_transform2d_new(GDNative.api, &dest, arg1, arg2)
  13. return &Transform2D{base: &dest}
  14. }
  15. // NewTransform2DAxisOrigin godot_transform2d_new_axis_origin [[godot_transform2d * r_dest] [const godot_vector2 * p_x_axis] [const godot_vector2 * p_y_axis] [const godot_vector2 * p_origin]] void
  16. func NewTransform2DAxisOrigin(xAxis Vector2, yAxis Vector2, origin Vector2) *Transform2D {
  17. var dest C.godot_transform2d
  18. arg1 := xAxis.getBase()
  19. arg2 := yAxis.getBase()
  20. arg3 := origin.getBase()
  21. C.go_godot_transform2d_new_axis_origin(GDNative.api, &dest, arg1, arg2, arg3)
  22. return &Transform2D{base: &dest}
  23. }
  24. // NewTransform2DIdentity godot_transform2d_new_identity [[godot_transform2d * r_dest]] void
  25. func NewTransform2DIdentity() *Transform2D {
  26. var dest C.godot_transform2d
  27. C.go_godot_transform2d_new_identity(GDNative.api, &dest)
  28. return &Transform2D{base: &dest}
  29. }