123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322 |
- // Copyright © 2019 - 2020 Oscar Campos <oscar.campos@thepimpam.com>
- // Copyright © 2017 - William Edwards
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- package gdnative
- // ==================================================================
- // This file was autogenerated by PimPam GDNative-Go binding tools
- // Please do not modify this file, any change will be lost
- // ==================================================================
- /*
- #include "gdnative.gen.h"
- #include <gdnative/transform.h>
- // Include all headers for now. TODO: Look up all the required
- // headers we need to import based on the method arguments and return types.
- #include <gdnative/aabb.h>
- #include <gdnative/array.h>
- #include <gdnative/basis.h>
- #include <gdnative/color.h>
- #include <gdnative/dictionary.h>
- #include <gdnative/gdnative.h>
- #include <gdnative/node_path.h>
- #include <gdnative/plane.h>
- #include <gdnative/pool_arrays.h>
- #include <gdnative/quat.h>
- #include <gdnative/rect2.h>
- #include <gdnative/rid.h>
- #include <gdnative/string.h>
- #include <gdnative/string_name.h>
- #include <gdnative/transform.h>
- #include <gdnative/transform2d.h>
- #include <gdnative/variant.h>
- #include <gdnative/vector2.h>
- #include <gdnative/vector3.h>
- #include <gdnative_api_struct.gen.h>
- */
- import "C"
- import "unsafe"
- // NewEmptyTransform will return a pointer to an empty
- // initialized Transform. This is primarily used in
- // conjunction with MethodBindPtrCall.
- func NewEmptyTransform() Pointer {
- var obj C.godot_transform
- return Pointer{base: unsafe.Pointer(&obj)}
- }
- // NewPointerFromTransform will return an unsafe pointer to the given
- // object. This is primarily used in conjunction with MethodBindPtrCall.
- func NewPointerFromTransform(obj Transform) Pointer {
- return Pointer{base: unsafe.Pointer(obj.getBase())}
- }
- // NewTransformFromPointer will return a Transform from the
- // given unsafe pointer. This is primarily used in conjunction with MethodBindPtrCall.
- func NewTransformFromPointer(ptr Pointer) Transform {
- return Transform{base: (*C.godot_transform)(ptr.getBase())}
- }
- // Transform data structure wrapper
- type Transform struct {
- base *C.godot_transform
- }
- // returns the wrapped C base data type for this type
- func (gdt Transform) getBase() *C.godot_transform {
- return gdt.base
- }
- // NewTransformWithAxisOrigin godot_transform_new_with_axis_origin [[godot_transform * r_dest] [const godot_vector3 * p_x_axis] [const godot_vector3 * p_y_axis] [const godot_vector3 * p_z_axis] [const godot_vector3 * p_origin]] void
- func NewTransformWithAxisOrigin(xAxis Vector3, yAxis Vector3, zAxis Vector3, origin Vector3) Transform {
- var dest C.godot_transform
- arg1 := xAxis.getBase()
- arg2 := yAxis.getBase()
- arg3 := zAxis.getBase()
- arg4 := origin.getBase()
- C.go_godot_transform_new_with_axis_origin(GDNative.api, &dest, arg1, arg2, arg3, arg4)
- return Transform{base: &dest}
- }
- // NewTransform godot_transform_new [[godot_transform * r_dest] [const godot_basis * p_basis] [const godot_vector3 * p_origin]] void
- func NewTransform(basis Basis, origin Vector3) Transform {
- var dest C.godot_transform
- arg1 := basis.getBase()
- arg2 := origin.getBase()
- C.go_godot_transform_new(GDNative.api, &dest, arg1, arg2)
- return Transform{base: &dest}
- }
- // GetBasis godot_transform_get_basis [[const godot_transform * p_self]] godot_basis
- func (gdt *Transform) GetBasis() Basis {
- arg0 := gdt.getBase()
- ret := C.go_godot_transform_get_basis(GDNative.api, arg0)
- return Basis{base: &ret}
- }
- // SetBasis godot_transform_set_basis [[godot_transform * p_self] [const godot_basis * p_v]] void
- func (gdt *Transform) SetBasis(v Basis) {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- C.go_godot_transform_set_basis(GDNative.api, arg0, arg1)
- }
- // GetOrigin godot_transform_get_origin [[const godot_transform * p_self]] godot_vector3
- func (gdt *Transform) GetOrigin() Vector3 {
- arg0 := gdt.getBase()
- ret := C.go_godot_transform_get_origin(GDNative.api, arg0)
- return Vector3{base: &ret}
- }
- // SetOrigin godot_transform_set_origin [[godot_transform * p_self] [const godot_vector3 * p_v]] void
- func (gdt *Transform) SetOrigin(v Vector3) {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- C.go_godot_transform_set_origin(GDNative.api, arg0, arg1)
- }
- // AsString godot_transform_as_string [[const godot_transform * p_self]] godot_string
- func (gdt *Transform) AsString() String {
- arg0 := gdt.getBase()
- ret := C.go_godot_transform_as_string(GDNative.api, arg0)
- utfStr := C.go_godot_string_utf8(GDNative.api, &ret)
- char := C.go_godot_char_string_get_data(GDNative.api, &utfStr)
- goStr := C.GoString(char)
- C.go_godot_char_string_destroy(GDNative.api, &utfStr)
- return String(goStr)
- }
- // Inverse godot_transform_inverse [[const godot_transform * p_self]] godot_transform
- func (gdt *Transform) Inverse() Transform {
- arg0 := gdt.getBase()
- ret := C.go_godot_transform_inverse(GDNative.api, arg0)
- return Transform{base: &ret}
- }
- // AffineInverse godot_transform_affine_inverse [[const godot_transform * p_self]] godot_transform
- func (gdt *Transform) AffineInverse() Transform {
- arg0 := gdt.getBase()
- ret := C.go_godot_transform_affine_inverse(GDNative.api, arg0)
- return Transform{base: &ret}
- }
- // Orthonormalized godot_transform_orthonormalized [[const godot_transform * p_self]] godot_transform
- func (gdt *Transform) Orthonormalized() Transform {
- arg0 := gdt.getBase()
- ret := C.go_godot_transform_orthonormalized(GDNative.api, arg0)
- return Transform{base: &ret}
- }
- // Rotated godot_transform_rotated [[const godot_transform * p_self] [const godot_vector3 * p_axis] [const godot_real p_phi]] godot_transform
- func (gdt *Transform) Rotated(axis Vector3, phi Real) Transform {
- arg0 := gdt.getBase()
- arg1 := axis.getBase()
- arg2 := phi.getBase()
- ret := C.go_godot_transform_rotated(GDNative.api, arg0, arg1, arg2)
- return Transform{base: &ret}
- }
- // Scaled godot_transform_scaled [[const godot_transform * p_self] [const godot_vector3 * p_scale]] godot_transform
- func (gdt *Transform) Scaled(scale Vector3) Transform {
- arg0 := gdt.getBase()
- arg1 := scale.getBase()
- ret := C.go_godot_transform_scaled(GDNative.api, arg0, arg1)
- return Transform{base: &ret}
- }
- // Translated godot_transform_translated [[const godot_transform * p_self] [const godot_vector3 * p_ofs]] godot_transform
- func (gdt *Transform) Translated(ofs Vector3) Transform {
- arg0 := gdt.getBase()
- arg1 := ofs.getBase()
- ret := C.go_godot_transform_translated(GDNative.api, arg0, arg1)
- return Transform{base: &ret}
- }
- // LookingAt godot_transform_looking_at [[const godot_transform * p_self] [const godot_vector3 * p_target] [const godot_vector3 * p_up]] godot_transform
- func (gdt *Transform) LookingAt(target Vector3, up Vector3) Transform {
- arg0 := gdt.getBase()
- arg1 := target.getBase()
- arg2 := up.getBase()
- ret := C.go_godot_transform_looking_at(GDNative.api, arg0, arg1, arg2)
- return Transform{base: &ret}
- }
- // XformPlane godot_transform_xform_plane [[const godot_transform * p_self] [const godot_plane * p_v]] godot_plane
- func (gdt *Transform) XformPlane(v Plane) Plane {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- ret := C.go_godot_transform_xform_plane(GDNative.api, arg0, arg1)
- return Plane{base: &ret}
- }
- // XformInvPlane godot_transform_xform_inv_plane [[const godot_transform * p_self] [const godot_plane * p_v]] godot_plane
- func (gdt *Transform) XformInvPlane(v Plane) Plane {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- ret := C.go_godot_transform_xform_inv_plane(GDNative.api, arg0, arg1)
- return Plane{base: &ret}
- }
- // NewTransformIdentity godot_transform_new_identity [[godot_transform * r_dest]] void
- func NewTransformIdentity() Transform {
- var dest C.godot_transform
- C.go_godot_transform_new_identity(GDNative.api, &dest)
- return Transform{base: &dest}
- }
- // OperatorEqual godot_transform_operator_equal [[const godot_transform * p_self] [const godot_transform * p_b]] godot_bool
- func (gdt *Transform) OperatorEqual(b Transform) Bool {
- arg0 := gdt.getBase()
- arg1 := b.getBase()
- ret := C.go_godot_transform_operator_equal(GDNative.api, arg0, arg1)
- return Bool(ret)
- }
- // OperatorMultiply godot_transform_operator_multiply [[const godot_transform * p_self] [const godot_transform * p_b]] godot_transform
- func (gdt *Transform) OperatorMultiply(b Transform) Transform {
- arg0 := gdt.getBase()
- arg1 := b.getBase()
- ret := C.go_godot_transform_operator_multiply(GDNative.api, arg0, arg1)
- return Transform{base: &ret}
- }
- // XformVector3 godot_transform_xform_vector3 [[const godot_transform * p_self] [const godot_vector3 * p_v]] godot_vector3
- func (gdt *Transform) XformVector3(v Vector3) Vector3 {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- ret := C.go_godot_transform_xform_vector3(GDNative.api, arg0, arg1)
- return Vector3{base: &ret}
- }
- // XformInvVector3 godot_transform_xform_inv_vector3 [[const godot_transform * p_self] [const godot_vector3 * p_v]] godot_vector3
- func (gdt *Transform) XformInvVector3(v Vector3) Vector3 {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- ret := C.go_godot_transform_xform_inv_vector3(GDNative.api, arg0, arg1)
- return Vector3{base: &ret}
- }
- // XformAabb godot_transform_xform_aabb [[const godot_transform * p_self] [const godot_aabb * p_v]] godot_aabb
- func (gdt *Transform) XformAabb(v Aabb) Aabb {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- ret := C.go_godot_transform_xform_aabb(GDNative.api, arg0, arg1)
- return Aabb{base: &ret}
- }
- // XformInvAabb godot_transform_xform_inv_aabb [[const godot_transform * p_self] [const godot_aabb * p_v]] godot_aabb
- func (gdt *Transform) XformInvAabb(v Aabb) Aabb {
- arg0 := gdt.getBase()
- arg1 := v.getBase()
- ret := C.go_godot_transform_xform_inv_aabb(GDNative.api, arg0, arg1)
- return Aabb{base: &ret}
- }
|