// Package graphene was automatically generated by github.com/bnema/puregotk DO NOT EDIT package graphene import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) // Describe a rotation using Euler angles. // // The contents of the #graphene_euler_t structure are private // and should never be accessed directly. type Euler struct { _ structs.HostLayout Angles uintptr Order EulerOrder } var xEulerGLibType func() types.GType func EulerGLibType() types.GType { return xEulerGLibType() } func (x *Euler) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } var xEulerAlloc func() *Euler // Allocates a new #graphene_euler_t. // // The contents of the returned structure are undefined. func EulerAlloc() *Euler { cret := xEulerAlloc() return cret } var xEulerEqual func(uintptr, *Euler) bool // Checks if two #graphene_euler_t are equal. func (x *Euler) Equal(BVar *Euler) bool { cret := xEulerEqual(x.GoPointer(), BVar) return cret } var xEulerFree func(uintptr) // Frees the resources allocated by graphene_euler_alloc(). func (x *Euler) Free() { xEulerFree(x.GoPointer()) } var xEulerGetAlpha func(uintptr) float32 // Retrieves the first component of the Euler angle vector, // depending on the order of rotation. // // See also: graphene_euler_get_x() func (x *Euler) GetAlpha() float32 { cret := xEulerGetAlpha(x.GoPointer()) return cret } var xEulerGetBeta func(uintptr) float32 // Retrieves the second component of the Euler angle vector, // depending on the order of rotation. // // See also: graphene_euler_get_y() func (x *Euler) GetBeta() float32 { cret := xEulerGetBeta(x.GoPointer()) return cret } var xEulerGetGamma func(uintptr) float32 // Retrieves the third component of the Euler angle vector, // depending on the order of rotation. // // See also: graphene_euler_get_z() func (x *Euler) GetGamma() float32 { cret := xEulerGetGamma(x.GoPointer()) return cret } var xEulerGetOrder func(uintptr) EulerOrder // Retrieves the order used to apply the rotations described in the // #graphene_euler_t structure, when converting to and from other // structures, like #graphene_quaternion_t and #graphene_matrix_t. // // This function does not return the %GRAPHENE_EULER_ORDER_DEFAULT // enumeration value; it will return the effective order of rotation // instead. func (x *Euler) GetOrder() EulerOrder { cret := xEulerGetOrder(x.GoPointer()) return cret } var xEulerGetX func(uintptr) float32 // Retrieves the rotation angle on the X axis, in degrees. func (x *Euler) GetX() float32 { cret := xEulerGetX(x.GoPointer()) return cret } var xEulerGetY func(uintptr) float32 // Retrieves the rotation angle on the Y axis, in degrees. func (x *Euler) GetY() float32 { cret := xEulerGetY(x.GoPointer()) return cret } var xEulerGetZ func(uintptr) float32 // Retrieves the rotation angle on the Z axis, in degrees. func (x *Euler) GetZ() float32 { cret := xEulerGetZ(x.GoPointer()) return cret } var xEulerInit func(uintptr, float32, float32, float32) *Euler // Initializes a #graphene_euler_t using the given angles. // // The order of the rotations is %GRAPHENE_EULER_ORDER_DEFAULT. func (x *Euler) Init(XVar float32, YVar float32, ZVar float32) *Euler { cret := xEulerInit(x.GoPointer(), XVar, YVar, ZVar) return cret } var xEulerInitFromEuler func(uintptr, *Euler) *Euler // Initializes a #graphene_euler_t using the angles and order of // another #graphene_euler_t. // // If the #graphene_euler_t @src is %NULL, this function is equivalent // to calling graphene_euler_init() with all angles set to 0. func (x *Euler) InitFromEuler(SrcVar *Euler) *Euler { cret := xEulerInitFromEuler(x.GoPointer(), SrcVar) return cret } var xEulerInitFromMatrix func(uintptr, *Matrix, EulerOrder) *Euler // Initializes a #graphene_euler_t using the given rotation matrix. // // If the #graphene_matrix_t @m is %NULL, the #graphene_euler_t will // be initialized with all angles set to 0. func (x *Euler) InitFromMatrix(MVar *Matrix, OrderVar EulerOrder) *Euler { cret := xEulerInitFromMatrix(x.GoPointer(), MVar, OrderVar) return cret } var xEulerInitFromQuaternion func(uintptr, *Quaternion, EulerOrder) *Euler // Initializes a #graphene_euler_t using the given normalized quaternion. // // If the #graphene_quaternion_t @q is %NULL, the #graphene_euler_t will // be initialized with all angles set to 0. func (x *Euler) InitFromQuaternion(QVar *Quaternion, OrderVar EulerOrder) *Euler { cret := xEulerInitFromQuaternion(x.GoPointer(), QVar, OrderVar) return cret } var xEulerInitFromRadians func(uintptr, float32, float32, float32, EulerOrder) *Euler // Initializes a #graphene_euler_t using the given angles // and order of rotation. func (x *Euler) InitFromRadians(XVar float32, YVar float32, ZVar float32, OrderVar EulerOrder) *Euler { cret := xEulerInitFromRadians(x.GoPointer(), XVar, YVar, ZVar, OrderVar) return cret } var xEulerInitFromVec3 func(uintptr, *Vec3, EulerOrder) *Euler // Initializes a #graphene_euler_t using the angles contained in a // #graphene_vec3_t. // // If the #graphene_vec3_t @v is %NULL, the #graphene_euler_t will be // initialized with all angles set to 0. func (x *Euler) InitFromVec3(VVar *Vec3, OrderVar EulerOrder) *Euler { cret := xEulerInitFromVec3(x.GoPointer(), VVar, OrderVar) return cret } var xEulerInitWithOrder func(uintptr, float32, float32, float32, EulerOrder) *Euler // Initializes a #graphene_euler_t with the given angles and @order. func (x *Euler) InitWithOrder(XVar float32, YVar float32, ZVar float32, OrderVar EulerOrder) *Euler { cret := xEulerInitWithOrder(x.GoPointer(), XVar, YVar, ZVar, OrderVar) return cret } var xEulerReorder func(uintptr, EulerOrder, *Euler) // Reorders a #graphene_euler_t using @order. // // This function is equivalent to creating a #graphene_quaternion_t from the // given #graphene_euler_t, and then converting the quaternion into another // #graphene_euler_t. func (x *Euler) Reorder(OrderVar EulerOrder, ResVar *Euler) { xEulerReorder(x.GoPointer(), OrderVar, ResVar) } var xEulerToMatrix func(uintptr, *Matrix) // Converts a #graphene_euler_t into a transformation matrix expressing // the extrinsic composition of rotations described by the Euler angles. // // The rotations are applied over the reference frame axes in the order // associated with the #graphene_euler_t; for instance, if the order // used to initialize @e is %GRAPHENE_EULER_ORDER_XYZ: // // - the first rotation moves the body around the X axis with // an angle φ // - the second rotation moves the body around the Y axis with // an angle of ϑ // - the third rotation moves the body around the Z axis with // an angle of ψ // // The rotation sign convention is right-handed, to preserve compatibility // between Euler-based, quaternion-based, and angle-axis-based rotations. func (x *Euler) ToMatrix(ResVar *Matrix) { xEulerToMatrix(x.GoPointer(), ResVar) } var xEulerToQuaternion func(uintptr, *Quaternion) // Converts a #graphene_euler_t into a #graphene_quaternion_t. func (x *Euler) ToQuaternion(ResVar *Quaternion) { xEulerToQuaternion(x.GoPointer(), ResVar) } var xEulerToVec3 func(uintptr, *Vec3) // Retrieves the angles of a #graphene_euler_t and initializes a // #graphene_vec3_t with them. func (x *Euler) ToVec3(ResVar *Vec3) { xEulerToVec3(x.GoPointer(), ResVar) } // Specify the order of the rotations on each axis. // // The %GRAPHENE_EULER_ORDER_DEFAULT value is special, and is used // as an alias for one of the other orders. type EulerOrder int const ( // Rotate in the default order; the // default order is one of the following enumeration values EulerOrderDefaultValue EulerOrder = -1 // Rotate in the X, Y, and Z order. Deprecated in // Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SXYZ EulerOrderXyzValue EulerOrder = 0 // Rotate in the Y, Z, and X order. Deprecated in // Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SYZX EulerOrderYzxValue EulerOrder = 1 // Rotate in the Z, X, and Y order. Deprecated in // Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SZXY EulerOrderZxyValue EulerOrder = 2 // Rotate in the X, Z, and Y order. Deprecated in // Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SXZY EulerOrderXzyValue EulerOrder = 3 // Rotate in the Y, X, and Z order. Deprecated in // Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SYXZ EulerOrderYxzValue EulerOrder = 4 // Rotate in the Z, Y, and X order. Deprecated in // Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SZYX EulerOrderZyxValue EulerOrder = 5 // Defines a static rotation along the X, Y, and Z axes (Since: 1.10) EulerOrderSxyzValue EulerOrder = 6 // Defines a static rotation along the X, Y, and X axes (Since: 1.10) EulerOrderSxyxValue EulerOrder = 7 // Defines a static rotation along the X, Z, and Y axes (Since: 1.10) EulerOrderSxzyValue EulerOrder = 8 // Defines a static rotation along the X, Z, and X axes (Since: 1.10) EulerOrderSxzxValue EulerOrder = 9 // Defines a static rotation along the Y, Z, and X axes (Since: 1.10) EulerOrderSyzxValue EulerOrder = 10 // Defines a static rotation along the Y, Z, and Y axes (Since: 1.10) EulerOrderSyzyValue EulerOrder = 11 // Defines a static rotation along the Y, X, and Z axes (Since: 1.10) EulerOrderSyxzValue EulerOrder = 12 // Defines a static rotation along the Y, X, and Y axes (Since: 1.10) EulerOrderSyxyValue EulerOrder = 13 // Defines a static rotation along the Z, X, and Y axes (Since: 1.10) EulerOrderSzxyValue EulerOrder = 14 // Defines a static rotation along the Z, X, and Z axes (Since: 1.10) EulerOrderSzxzValue EulerOrder = 15 // Defines a static rotation along the Z, Y, and X axes (Since: 1.10) EulerOrderSzyxValue EulerOrder = 16 // Defines a static rotation along the Z, Y, and Z axes (Since: 1.10) EulerOrderSzyzValue EulerOrder = 17 // Defines a relative rotation along the Z, Y, and X axes (Since: 1.10) EulerOrderRzyxValue EulerOrder = 18 // Defines a relative rotation along the X, Y, and X axes (Since: 1.10) EulerOrderRxyxValue EulerOrder = 19 // Defines a relative rotation along the Y, Z, and X axes (Since: 1.10) EulerOrderRyzxValue EulerOrder = 20 // Defines a relative rotation along the X, Z, and X axes (Since: 1.10) EulerOrderRxzxValue EulerOrder = 21 // Defines a relative rotation along the X, Z, and Y axes (Since: 1.10) EulerOrderRxzyValue EulerOrder = 22 // Defines a relative rotation along the Y, Z, and Y axes (Since: 1.10) EulerOrderRyzyValue EulerOrder = 23 // Defines a relative rotation along the Z, X, and Y axes (Since: 1.10) EulerOrderRzxyValue EulerOrder = 24 // Defines a relative rotation along the Y, X, and Y axes (Since: 1.10) EulerOrderRyxyValue EulerOrder = 25 // Defines a relative rotation along the Y, X, and Z axes (Since: 1.10) EulerOrderRyxzValue EulerOrder = 26 // Defines a relative rotation along the Z, X, and Z axes (Since: 1.10) EulerOrderRzxzValue EulerOrder = 27 // Defines a relative rotation along the X, Y, and Z axes (Since: 1.10) EulerOrderRxyzValue EulerOrder = 28 // Defines a relative rotation along the Z, Y, and Z axes (Since: 1.10) EulerOrderRzyzValue EulerOrder = 29 ) func init() { core.SetPackageName("GRAPHENE", "graphene-gobject-1.0") core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GRAPHENE") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xEulerGLibType, libs, "graphene_euler_get_type") core.PuregoSafeRegister(&xEulerAlloc, libs, "graphene_euler_alloc") core.PuregoSafeRegister(&xEulerEqual, libs, "graphene_euler_equal") core.PuregoSafeRegister(&xEulerFree, libs, "graphene_euler_free") core.PuregoSafeRegister(&xEulerGetAlpha, libs, "graphene_euler_get_alpha") core.PuregoSafeRegister(&xEulerGetBeta, libs, "graphene_euler_get_beta") core.PuregoSafeRegister(&xEulerGetGamma, libs, "graphene_euler_get_gamma") core.PuregoSafeRegister(&xEulerGetOrder, libs, "graphene_euler_get_order") core.PuregoSafeRegister(&xEulerGetX, libs, "graphene_euler_get_x") core.PuregoSafeRegister(&xEulerGetY, libs, "graphene_euler_get_y") core.PuregoSafeRegister(&xEulerGetZ, libs, "graphene_euler_get_z") core.PuregoSafeRegister(&xEulerInit, libs, "graphene_euler_init") core.PuregoSafeRegister(&xEulerInitFromEuler, libs, "graphene_euler_init_from_euler") core.PuregoSafeRegister(&xEulerInitFromMatrix, libs, "graphene_euler_init_from_matrix") core.PuregoSafeRegister(&xEulerInitFromQuaternion, libs, "graphene_euler_init_from_quaternion") core.PuregoSafeRegister(&xEulerInitFromRadians, libs, "graphene_euler_init_from_radians") core.PuregoSafeRegister(&xEulerInitFromVec3, libs, "graphene_euler_init_from_vec3") core.PuregoSafeRegister(&xEulerInitWithOrder, libs, "graphene_euler_init_with_order") core.PuregoSafeRegister(&xEulerReorder, libs, "graphene_euler_reorder") core.PuregoSafeRegister(&xEulerToMatrix, libs, "graphene_euler_to_matrix") core.PuregoSafeRegister(&xEulerToQuaternion, libs, "graphene_euler_to_quaternion") core.PuregoSafeRegister(&xEulerToVec3, libs, "graphene_euler_to_vec3") }