v0.2.1 c0399be

graphene-euler.go RawHistoryFolder

1// Package graphene was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package graphene
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/gobject/types"
12)
13
14// Describe a rotation using Euler angles.
15//
16// The contents of the #graphene_euler_t structure are private
17// and should never be accessed directly.
18type Euler struct {
19	_ structs.HostLayout
20
21	Angles uintptr
22
23	Order EulerOrder
24}
25
26var xEulerGLibType func() types.GType
27
28func EulerGLibType() types.GType {
29	return xEulerGLibType()
30}
31
32func (x *Euler) GoPointer() uintptr {
33	return uintptr(unsafe.Pointer(x))
34}
35
36var xEulerAlloc func() *Euler
37
38// Allocates a new #graphene_euler_t.
39//
40// The contents of the returned structure are undefined.
41func EulerAlloc() *Euler {
42
43	cret := xEulerAlloc()
44	return cret
45}
46
47var xEulerEqual func(uintptr, *Euler) bool
48
49// Checks if two #graphene_euler_t are equal.
50func (x *Euler) Equal(BVar *Euler) bool {
51
52	cret := xEulerEqual(x.GoPointer(), BVar)
53	return cret
54}
55
56var xEulerFree func(uintptr)
57
58// Frees the resources allocated by graphene_euler_alloc().
59func (x *Euler) Free() {
60
61	xEulerFree(x.GoPointer())
62
63}
64
65var xEulerGetAlpha func(uintptr) float32
66
67// Retrieves the first component of the Euler angle vector,
68// depending on the order of rotation.
69//
70// See also: graphene_euler_get_x()
71func (x *Euler) GetAlpha() float32 {
72
73	cret := xEulerGetAlpha(x.GoPointer())
74	return cret
75}
76
77var xEulerGetBeta func(uintptr) float32
78
79// Retrieves the second component of the Euler angle vector,
80// depending on the order of rotation.
81//
82// See also: graphene_euler_get_y()
83func (x *Euler) GetBeta() float32 {
84
85	cret := xEulerGetBeta(x.GoPointer())
86	return cret
87}
88
89var xEulerGetGamma func(uintptr) float32
90
91// Retrieves the third component of the Euler angle vector,
92// depending on the order of rotation.
93//
94// See also: graphene_euler_get_z()
95func (x *Euler) GetGamma() float32 {
96
97	cret := xEulerGetGamma(x.GoPointer())
98	return cret
99}
100
101var xEulerGetOrder func(uintptr) EulerOrder
102
103// Retrieves the order used to apply the rotations described in the
104// #graphene_euler_t structure, when converting to and from other
105// structures, like #graphene_quaternion_t and #graphene_matrix_t.
106//
107// This function does not return the %GRAPHENE_EULER_ORDER_DEFAULT
108// enumeration value; it will return the effective order of rotation
109// instead.
110func (x *Euler) GetOrder() EulerOrder {
111
112	cret := xEulerGetOrder(x.GoPointer())
113	return cret
114}
115
116var xEulerGetX func(uintptr) float32
117
118// Retrieves the rotation angle on the X axis, in degrees.
119func (x *Euler) GetX() float32 {
120
121	cret := xEulerGetX(x.GoPointer())
122	return cret
123}
124
125var xEulerGetY func(uintptr) float32
126
127// Retrieves the rotation angle on the Y axis, in degrees.
128func (x *Euler) GetY() float32 {
129
130	cret := xEulerGetY(x.GoPointer())
131	return cret
132}
133
134var xEulerGetZ func(uintptr) float32
135
136// Retrieves the rotation angle on the Z axis, in degrees.
137func (x *Euler) GetZ() float32 {
138
139	cret := xEulerGetZ(x.GoPointer())
140	return cret
141}
142
143var xEulerInit func(uintptr, float32, float32, float32) *Euler
144
145// Initializes a #graphene_euler_t using the given angles.
146//
147// The order of the rotations is %GRAPHENE_EULER_ORDER_DEFAULT.
148func (x *Euler) Init(XVar float32, YVar float32, ZVar float32) *Euler {
149
150	cret := xEulerInit(x.GoPointer(), XVar, YVar, ZVar)
151	return cret
152}
153
154var xEulerInitFromEuler func(uintptr, *Euler) *Euler
155
156// Initializes a #graphene_euler_t using the angles and order of
157// another #graphene_euler_t.
158//
159// If the #graphene_euler_t @src is %NULL, this function is equivalent
160// to calling graphene_euler_init() with all angles set to 0.
161func (x *Euler) InitFromEuler(SrcVar *Euler) *Euler {
162
163	cret := xEulerInitFromEuler(x.GoPointer(), SrcVar)
164	return cret
165}
166
167var xEulerInitFromMatrix func(uintptr, *Matrix, EulerOrder) *Euler
168
169// Initializes a #graphene_euler_t using the given rotation matrix.
170//
171// If the #graphene_matrix_t @m is %NULL, the #graphene_euler_t will
172// be initialized with all angles set to 0.
173func (x *Euler) InitFromMatrix(MVar *Matrix, OrderVar EulerOrder) *Euler {
174
175	cret := xEulerInitFromMatrix(x.GoPointer(), MVar, OrderVar)
176	return cret
177}
178
179var xEulerInitFromQuaternion func(uintptr, *Quaternion, EulerOrder) *Euler
180
181// Initializes a #graphene_euler_t using the given normalized quaternion.
182//
183// If the #graphene_quaternion_t @q is %NULL, the #graphene_euler_t will
184// be initialized with all angles set to 0.
185func (x *Euler) InitFromQuaternion(QVar *Quaternion, OrderVar EulerOrder) *Euler {
186
187	cret := xEulerInitFromQuaternion(x.GoPointer(), QVar, OrderVar)
188	return cret
189}
190
191var xEulerInitFromRadians func(uintptr, float32, float32, float32, EulerOrder) *Euler
192
193// Initializes a #graphene_euler_t using the given angles
194// and order of rotation.
195func (x *Euler) InitFromRadians(XVar float32, YVar float32, ZVar float32, OrderVar EulerOrder) *Euler {
196
197	cret := xEulerInitFromRadians(x.GoPointer(), XVar, YVar, ZVar, OrderVar)
198	return cret
199}
200
201var xEulerInitFromVec3 func(uintptr, *Vec3, EulerOrder) *Euler
202
203// Initializes a #graphene_euler_t using the angles contained in a
204// #graphene_vec3_t.
205//
206// If the #graphene_vec3_t @v is %NULL, the #graphene_euler_t will be
207// initialized with all angles set to 0.
208func (x *Euler) InitFromVec3(VVar *Vec3, OrderVar EulerOrder) *Euler {
209
210	cret := xEulerInitFromVec3(x.GoPointer(), VVar, OrderVar)
211	return cret
212}
213
214var xEulerInitWithOrder func(uintptr, float32, float32, float32, EulerOrder) *Euler
215
216// Initializes a #graphene_euler_t with the given angles and @order.
217func (x *Euler) InitWithOrder(XVar float32, YVar float32, ZVar float32, OrderVar EulerOrder) *Euler {
218
219	cret := xEulerInitWithOrder(x.GoPointer(), XVar, YVar, ZVar, OrderVar)
220	return cret
221}
222
223var xEulerReorder func(uintptr, EulerOrder, *Euler)
224
225// Reorders a #graphene_euler_t using @order.
226//
227// This function is equivalent to creating a #graphene_quaternion_t from the
228// given #graphene_euler_t, and then converting the quaternion into another
229// #graphene_euler_t.
230func (x *Euler) Reorder(OrderVar EulerOrder, ResVar *Euler) {
231
232	xEulerReorder(x.GoPointer(), OrderVar, ResVar)
233
234}
235
236var xEulerToMatrix func(uintptr, *Matrix)
237
238// Converts a #graphene_euler_t into a transformation matrix expressing
239// the extrinsic composition of rotations described by the Euler angles.
240//
241// The rotations are applied over the reference frame axes in the order
242// associated with the #graphene_euler_t; for instance, if the order
243// used to initialize @e is %GRAPHENE_EULER_ORDER_XYZ:
244//
245//   - the first rotation moves the body around the X axis with
246//     an angle φ
247//   - the second rotation moves the body around the Y axis with
248//     an angle of ϑ
249//   - the third rotation moves the body around the Z axis with
250//     an angle of ψ
251//
252// The rotation sign convention is right-handed, to preserve compatibility
253// between Euler-based, quaternion-based, and angle-axis-based rotations.
254func (x *Euler) ToMatrix(ResVar *Matrix) {
255
256	xEulerToMatrix(x.GoPointer(), ResVar)
257
258}
259
260var xEulerToQuaternion func(uintptr, *Quaternion)
261
262// Converts a #graphene_euler_t into a #graphene_quaternion_t.
263func (x *Euler) ToQuaternion(ResVar *Quaternion) {
264
265	xEulerToQuaternion(x.GoPointer(), ResVar)
266
267}
268
269var xEulerToVec3 func(uintptr, *Vec3)
270
271// Retrieves the angles of a #graphene_euler_t and initializes a
272// #graphene_vec3_t with them.
273func (x *Euler) ToVec3(ResVar *Vec3) {
274
275	xEulerToVec3(x.GoPointer(), ResVar)
276
277}
278
279// Specify the order of the rotations on each axis.
280//
281// The %GRAPHENE_EULER_ORDER_DEFAULT value is special, and is used
282// as an alias for one of the other orders.
283type EulerOrder int
284
285const (
286
287	// Rotate in the default order; the
288	//   default order is one of the following enumeration values
289	EulerOrderDefaultValue EulerOrder = -1
290	// Rotate in the X, Y, and Z order. Deprecated in
291	//   Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SXYZ
292	EulerOrderXyzValue EulerOrder = 0
293	// Rotate in the Y, Z, and X order. Deprecated in
294	//   Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SYZX
295	EulerOrderYzxValue EulerOrder = 1
296	// Rotate in the Z, X, and Y order. Deprecated in
297	//   Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SZXY
298	EulerOrderZxyValue EulerOrder = 2
299	// Rotate in the X, Z, and Y order. Deprecated in
300	//   Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SXZY
301	EulerOrderXzyValue EulerOrder = 3
302	// Rotate in the Y, X, and Z order. Deprecated in
303	//   Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SYXZ
304	EulerOrderYxzValue EulerOrder = 4
305	// Rotate in the Z, Y, and X order. Deprecated in
306	//   Graphene 1.10, it's an alias for %GRAPHENE_EULER_ORDER_SZYX
307	EulerOrderZyxValue EulerOrder = 5
308	// Defines a static rotation along the X, Y, and Z axes (Since: 1.10)
309	EulerOrderSxyzValue EulerOrder = 6
310	// Defines a static rotation along the X, Y, and X axes (Since: 1.10)
311	EulerOrderSxyxValue EulerOrder = 7
312	// Defines a static rotation along the X, Z, and Y axes (Since: 1.10)
313	EulerOrderSxzyValue EulerOrder = 8
314	// Defines a static rotation along the X, Z, and X axes (Since: 1.10)
315	EulerOrderSxzxValue EulerOrder = 9
316	// Defines a static rotation along the Y, Z, and X axes (Since: 1.10)
317	EulerOrderSyzxValue EulerOrder = 10
318	// Defines a static rotation along the Y, Z, and Y axes (Since: 1.10)
319	EulerOrderSyzyValue EulerOrder = 11
320	// Defines a static rotation along the Y, X, and Z axes (Since: 1.10)
321	EulerOrderSyxzValue EulerOrder = 12
322	// Defines a static rotation along the Y, X, and Y axes (Since: 1.10)
323	EulerOrderSyxyValue EulerOrder = 13
324	// Defines a static rotation along the Z, X, and Y axes (Since: 1.10)
325	EulerOrderSzxyValue EulerOrder = 14
326	// Defines a static rotation along the Z, X, and Z axes (Since: 1.10)
327	EulerOrderSzxzValue EulerOrder = 15
328	// Defines a static rotation along the Z, Y, and X axes (Since: 1.10)
329	EulerOrderSzyxValue EulerOrder = 16
330	// Defines a static rotation along the Z, Y, and Z axes (Since: 1.10)
331	EulerOrderSzyzValue EulerOrder = 17
332	// Defines a relative rotation along the Z, Y, and X axes (Since: 1.10)
333	EulerOrderRzyxValue EulerOrder = 18
334	// Defines a relative rotation along the X, Y, and X axes (Since: 1.10)
335	EulerOrderRxyxValue EulerOrder = 19
336	// Defines a relative rotation along the Y, Z, and X axes (Since: 1.10)
337	EulerOrderRyzxValue EulerOrder = 20
338	// Defines a relative rotation along the X, Z, and X axes (Since: 1.10)
339	EulerOrderRxzxValue EulerOrder = 21
340	// Defines a relative rotation along the X, Z, and Y axes (Since: 1.10)
341	EulerOrderRxzyValue EulerOrder = 22
342	// Defines a relative rotation along the Y, Z, and Y axes (Since: 1.10)
343	EulerOrderRyzyValue EulerOrder = 23
344	// Defines a relative rotation along the Z, X, and Y axes (Since: 1.10)
345	EulerOrderRzxyValue EulerOrder = 24
346	// Defines a relative rotation along the Y, X, and Y axes (Since: 1.10)
347	EulerOrderRyxyValue EulerOrder = 25
348	// Defines a relative rotation along the Y, X, and Z axes (Since: 1.10)
349	EulerOrderRyxzValue EulerOrder = 26
350	// Defines a relative rotation along the Z, X, and Z axes (Since: 1.10)
351	EulerOrderRzxzValue EulerOrder = 27
352	// Defines a relative rotation along the X, Y, and Z axes (Since: 1.10)
353	EulerOrderRxyzValue EulerOrder = 28
354	// Defines a relative rotation along the Z, Y, and Z axes (Since: 1.10)
355	EulerOrderRzyzValue EulerOrder = 29
356)
357
358func init() {
359	core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
360	core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
361	var libs []uintptr
362	for _, libPath := range core.GetPaths("GRAPHENE") {
363		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
364		if err != nil {
365			panic(err)
366		}
367		libs = append(libs, lib)
368	}
369
370	core.PuregoSafeRegister(&xEulerGLibType, libs, "graphene_euler_get_type")
371
372	core.PuregoSafeRegister(&xEulerAlloc, libs, "graphene_euler_alloc")
373
374	core.PuregoSafeRegister(&xEulerEqual, libs, "graphene_euler_equal")
375	core.PuregoSafeRegister(&xEulerFree, libs, "graphene_euler_free")
376	core.PuregoSafeRegister(&xEulerGetAlpha, libs, "graphene_euler_get_alpha")
377	core.PuregoSafeRegister(&xEulerGetBeta, libs, "graphene_euler_get_beta")
378	core.PuregoSafeRegister(&xEulerGetGamma, libs, "graphene_euler_get_gamma")
379	core.PuregoSafeRegister(&xEulerGetOrder, libs, "graphene_euler_get_order")
380	core.PuregoSafeRegister(&xEulerGetX, libs, "graphene_euler_get_x")
381	core.PuregoSafeRegister(&xEulerGetY, libs, "graphene_euler_get_y")
382	core.PuregoSafeRegister(&xEulerGetZ, libs, "graphene_euler_get_z")
383	core.PuregoSafeRegister(&xEulerInit, libs, "graphene_euler_init")
384	core.PuregoSafeRegister(&xEulerInitFromEuler, libs, "graphene_euler_init_from_euler")
385	core.PuregoSafeRegister(&xEulerInitFromMatrix, libs, "graphene_euler_init_from_matrix")
386	core.PuregoSafeRegister(&xEulerInitFromQuaternion, libs, "graphene_euler_init_from_quaternion")
387	core.PuregoSafeRegister(&xEulerInitFromRadians, libs, "graphene_euler_init_from_radians")
388	core.PuregoSafeRegister(&xEulerInitFromVec3, libs, "graphene_euler_init_from_vec3")
389	core.PuregoSafeRegister(&xEulerInitWithOrder, libs, "graphene_euler_init_with_order")
390	core.PuregoSafeRegister(&xEulerReorder, libs, "graphene_euler_reorder")
391	core.PuregoSafeRegister(&xEulerToMatrix, libs, "graphene_euler_to_matrix")
392	core.PuregoSafeRegister(&xEulerToQuaternion, libs, "graphene_euler_to_quaternion")
393	core.PuregoSafeRegister(&xEulerToVec3, libs, "graphene_euler_to_vec3")
394
395}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close