v0.2.1 c0399be

graphene-vec3.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// A structure capable of holding a vector with three dimensions: x, y, and z.
15//
16// The contents of the #graphene_vec3_t structure are private and should
17// never be accessed directly.
18type Vec3 struct {
19	_ structs.HostLayout
20
21	Value uintptr
22}
23
24var xVec3GLibType func() types.GType
25
26func Vec3GLibType() types.GType {
27	return xVec3GLibType()
28}
29
30func (x *Vec3) GoPointer() uintptr {
31	return uintptr(unsafe.Pointer(x))
32}
33
34var xVec3Alloc func() *Vec3
35
36// Allocates a new #graphene_vec3_t structure.
37//
38// The contents of the returned structure are undefined.
39//
40// Use graphene_vec3_init() to initialize the vector.
41func Vec3Alloc() *Vec3 {
42
43	cret := xVec3Alloc()
44	return cret
45}
46
47var xVec3Add func(uintptr, *Vec3, *Vec3)
48
49// Adds each component of the two given vectors.
50func (x *Vec3) Add(BVar *Vec3, ResVar *Vec3) {
51
52	xVec3Add(x.GoPointer(), BVar, ResVar)
53
54}
55
56var xVec3Cross func(uintptr, *Vec3, *Vec3)
57
58// Computes the cross product of the two given vectors.
59func (x *Vec3) Cross(BVar *Vec3, ResVar *Vec3) {
60
61	xVec3Cross(x.GoPointer(), BVar, ResVar)
62
63}
64
65var xVec3Divide func(uintptr, *Vec3, *Vec3)
66
67// Divides each component of the first operand @a by the corresponding
68// component of the second operand @b, and places the results into the
69// vector @res.
70func (x *Vec3) Divide(BVar *Vec3, ResVar *Vec3) {
71
72	xVec3Divide(x.GoPointer(), BVar, ResVar)
73
74}
75
76var xVec3Dot func(uintptr, *Vec3) float32
77
78// Computes the dot product of the two given vectors.
79func (x *Vec3) Dot(BVar *Vec3) float32 {
80
81	cret := xVec3Dot(x.GoPointer(), BVar)
82	return cret
83}
84
85var xVec3Equal func(uintptr, *Vec3) bool
86
87// Checks whether the two given #graphene_vec3_t are equal.
88func (x *Vec3) Equal(V2Var *Vec3) bool {
89
90	cret := xVec3Equal(x.GoPointer(), V2Var)
91	return cret
92}
93
94var xVec3Free func(uintptr)
95
96// Frees the resources allocated by @v
97func (x *Vec3) Free() {
98
99	xVec3Free(x.GoPointer())
100
101}
102
103var xVec3GetX func(uintptr) float32
104
105// Retrieves the first component of the given vector @v.
106func (x *Vec3) GetX() float32 {
107
108	cret := xVec3GetX(x.GoPointer())
109	return cret
110}
111
112var xVec3GetXy func(uintptr, *Vec2)
113
114// Creates a #graphene_vec2_t that contains the first and second
115// components of the given #graphene_vec3_t.
116func (x *Vec3) GetXy(ResVar *Vec2) {
117
118	xVec3GetXy(x.GoPointer(), ResVar)
119
120}
121
122var xVec3GetXy0 func(uintptr, *Vec3)
123
124// Creates a #graphene_vec3_t that contains the first two components of
125// the given #graphene_vec3_t, and the third component set to 0.
126func (x *Vec3) GetXy0(ResVar *Vec3) {
127
128	xVec3GetXy0(x.GoPointer(), ResVar)
129
130}
131
132var xVec3GetXyz0 func(uintptr, *Vec4)
133
134// Converts a #graphene_vec3_t in a #graphene_vec4_t using 0.0
135// as the value for the fourth component of the resulting vector.
136func (x *Vec3) GetXyz0(ResVar *Vec4) {
137
138	xVec3GetXyz0(x.GoPointer(), ResVar)
139
140}
141
142var xVec3GetXyz1 func(uintptr, *Vec4)
143
144// Converts a #graphene_vec3_t in a #graphene_vec4_t using 1.0
145// as the value for the fourth component of the resulting vector.
146func (x *Vec3) GetXyz1(ResVar *Vec4) {
147
148	xVec3GetXyz1(x.GoPointer(), ResVar)
149
150}
151
152var xVec3GetXyzw func(uintptr, float32, *Vec4)
153
154// Converts a #graphene_vec3_t in a #graphene_vec4_t using @w as
155// the value of the fourth component of the resulting vector.
156func (x *Vec3) GetXyzw(WVar float32, ResVar *Vec4) {
157
158	xVec3GetXyzw(x.GoPointer(), WVar, ResVar)
159
160}
161
162var xVec3GetY func(uintptr) float32
163
164// Retrieves the second component of the given vector @v.
165func (x *Vec3) GetY() float32 {
166
167	cret := xVec3GetY(x.GoPointer())
168	return cret
169}
170
171var xVec3GetZ func(uintptr) float32
172
173// Retrieves the third component of the given vector @v.
174func (x *Vec3) GetZ() float32 {
175
176	cret := xVec3GetZ(x.GoPointer())
177	return cret
178}
179
180var xVec3Init func(uintptr, float32, float32, float32) *Vec3
181
182// Initializes a #graphene_vec3_t using the given values.
183//
184// This function can be called multiple times.
185func (x *Vec3) Init(XVar float32, YVar float32, ZVar float32) *Vec3 {
186
187	cret := xVec3Init(x.GoPointer(), XVar, YVar, ZVar)
188	return cret
189}
190
191var xVec3InitFromFloat func(uintptr, *[3]float32) *Vec3
192
193// Initializes a #graphene_vec3_t with the values from an array.
194func (x *Vec3) InitFromFloat(SrcVar [3]float32) *Vec3 {
195
196	cret := xVec3InitFromFloat(x.GoPointer(), &SrcVar)
197	return cret
198}
199
200var xVec3InitFromVec3 func(uintptr, *Vec3) *Vec3
201
202// Initializes a #graphene_vec3_t with the values of another
203// #graphene_vec3_t.
204func (x *Vec3) InitFromVec3(SrcVar *Vec3) *Vec3 {
205
206	cret := xVec3InitFromVec3(x.GoPointer(), SrcVar)
207	return cret
208}
209
210var xVec3Interpolate func(uintptr, *Vec3, float64, *Vec3)
211
212// Linearly interpolates @v1 and @v2 using the given @factor.
213func (x *Vec3) Interpolate(V2Var *Vec3, FactorVar float64, ResVar *Vec3) {
214
215	xVec3Interpolate(x.GoPointer(), V2Var, FactorVar, ResVar)
216
217}
218
219var xVec3Length func(uintptr) float32
220
221// Retrieves the length of the given vector @v.
222func (x *Vec3) Length() float32 {
223
224	cret := xVec3Length(x.GoPointer())
225	return cret
226}
227
228var xVec3Max func(uintptr, *Vec3, *Vec3)
229
230// Compares each component of the two given vectors and creates a
231// vector that contains the maximum values.
232func (x *Vec3) Max(BVar *Vec3, ResVar *Vec3) {
233
234	xVec3Max(x.GoPointer(), BVar, ResVar)
235
236}
237
238var xVec3Min func(uintptr, *Vec3, *Vec3)
239
240// Compares each component of the two given vectors and creates a
241// vector that contains the minimum values.
242func (x *Vec3) Min(BVar *Vec3, ResVar *Vec3) {
243
244	xVec3Min(x.GoPointer(), BVar, ResVar)
245
246}
247
248var xVec3Multiply func(uintptr, *Vec3, *Vec3)
249
250// Multiplies each component of the two given vectors.
251func (x *Vec3) Multiply(BVar *Vec3, ResVar *Vec3) {
252
253	xVec3Multiply(x.GoPointer(), BVar, ResVar)
254
255}
256
257var xVec3Near func(uintptr, *Vec3, float32) bool
258
259// Compares the two given #graphene_vec3_t vectors and checks
260// whether their values are within the given @epsilon.
261func (x *Vec3) Near(V2Var *Vec3, EpsilonVar float32) bool {
262
263	cret := xVec3Near(x.GoPointer(), V2Var, EpsilonVar)
264	return cret
265}
266
267var xVec3Negate func(uintptr, *Vec3)
268
269// Negates the given #graphene_vec3_t.
270func (x *Vec3) Negate(ResVar *Vec3) {
271
272	xVec3Negate(x.GoPointer(), ResVar)
273
274}
275
276var xVec3Normalize func(uintptr, *Vec3)
277
278// Normalizes the given #graphene_vec3_t.
279func (x *Vec3) Normalize(ResVar *Vec3) {
280
281	xVec3Normalize(x.GoPointer(), ResVar)
282
283}
284
285var xVec3Scale func(uintptr, float32, *Vec3)
286
287// Multiplies all components of the given vector with the given scalar @factor.
288func (x *Vec3) Scale(FactorVar float32, ResVar *Vec3) {
289
290	xVec3Scale(x.GoPointer(), FactorVar, ResVar)
291
292}
293
294var xVec3Subtract func(uintptr, *Vec3, *Vec3)
295
296// Subtracts from each component of the first operand @a the
297// corresponding component of the second operand @b and places
298// each result into the components of @res.
299func (x *Vec3) Subtract(BVar *Vec3, ResVar *Vec3) {
300
301	xVec3Subtract(x.GoPointer(), BVar, ResVar)
302
303}
304
305var xVec3ToFloat func(uintptr, *[3]float32)
306
307// Copies the components of a #graphene_vec3_t into the given array.
308func (x *Vec3) ToFloat(DestVar *[3]float32) {
309
310	xVec3ToFloat(x.GoPointer(), DestVar)
311
312}
313
314var xVec3One func() *Vec3
315
316// Provides a constant pointer to a vector with three components,
317// all sets to 1.
318func Vec3One() *Vec3 {
319
320	cret := xVec3One()
321	return cret
322}
323
324var xVec3XAxis func() *Vec3
325
326// Provides a constant pointer to a vector with three components
327// with values set to (1, 0, 0).
328func Vec3XAxis() *Vec3 {
329
330	cret := xVec3XAxis()
331	return cret
332}
333
334var xVec3YAxis func() *Vec3
335
336// Provides a constant pointer to a vector with three components
337// with values set to (0, 1, 0).
338func Vec3YAxis() *Vec3 {
339
340	cret := xVec3YAxis()
341	return cret
342}
343
344var xVec3ZAxis func() *Vec3
345
346// Provides a constant pointer to a vector with three components
347// with values set to (0, 0, 1).
348func Vec3ZAxis() *Vec3 {
349
350	cret := xVec3ZAxis()
351	return cret
352}
353
354var xVec3Zero func() *Vec3
355
356// Provides a constant pointer to a vector with three components,
357// all sets to 0.
358func Vec3Zero() *Vec3 {
359
360	cret := xVec3Zero()
361	return cret
362}
363
364func init() {
365	core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
366	core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
367	var libs []uintptr
368	for _, libPath := range core.GetPaths("GRAPHENE") {
369		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
370		if err != nil {
371			panic(err)
372		}
373		libs = append(libs, lib)
374	}
375
376	core.PuregoSafeRegister(&xVec3One, libs, "graphene_vec3_one")
377	core.PuregoSafeRegister(&xVec3XAxis, libs, "graphene_vec3_x_axis")
378	core.PuregoSafeRegister(&xVec3YAxis, libs, "graphene_vec3_y_axis")
379	core.PuregoSafeRegister(&xVec3ZAxis, libs, "graphene_vec3_z_axis")
380	core.PuregoSafeRegister(&xVec3Zero, libs, "graphene_vec3_zero")
381
382	core.PuregoSafeRegister(&xVec3GLibType, libs, "graphene_vec3_get_type")
383
384	core.PuregoSafeRegister(&xVec3Alloc, libs, "graphene_vec3_alloc")
385
386	core.PuregoSafeRegister(&xVec3Add, libs, "graphene_vec3_add")
387	core.PuregoSafeRegister(&xVec3Cross, libs, "graphene_vec3_cross")
388	core.PuregoSafeRegister(&xVec3Divide, libs, "graphene_vec3_divide")
389	core.PuregoSafeRegister(&xVec3Dot, libs, "graphene_vec3_dot")
390	core.PuregoSafeRegister(&xVec3Equal, libs, "graphene_vec3_equal")
391	core.PuregoSafeRegister(&xVec3Free, libs, "graphene_vec3_free")
392	core.PuregoSafeRegister(&xVec3GetX, libs, "graphene_vec3_get_x")
393	core.PuregoSafeRegister(&xVec3GetXy, libs, "graphene_vec3_get_xy")
394	core.PuregoSafeRegister(&xVec3GetXy0, libs, "graphene_vec3_get_xy0")
395	core.PuregoSafeRegister(&xVec3GetXyz0, libs, "graphene_vec3_get_xyz0")
396	core.PuregoSafeRegister(&xVec3GetXyz1, libs, "graphene_vec3_get_xyz1")
397	core.PuregoSafeRegister(&xVec3GetXyzw, libs, "graphene_vec3_get_xyzw")
398	core.PuregoSafeRegister(&xVec3GetY, libs, "graphene_vec3_get_y")
399	core.PuregoSafeRegister(&xVec3GetZ, libs, "graphene_vec3_get_z")
400	core.PuregoSafeRegister(&xVec3Init, libs, "graphene_vec3_init")
401	core.PuregoSafeRegister(&xVec3InitFromFloat, libs, "graphene_vec3_init_from_float")
402	core.PuregoSafeRegister(&xVec3InitFromVec3, libs, "graphene_vec3_init_from_vec3")
403	core.PuregoSafeRegister(&xVec3Interpolate, libs, "graphene_vec3_interpolate")
404	core.PuregoSafeRegister(&xVec3Length, libs, "graphene_vec3_length")
405	core.PuregoSafeRegister(&xVec3Max, libs, "graphene_vec3_max")
406	core.PuregoSafeRegister(&xVec3Min, libs, "graphene_vec3_min")
407	core.PuregoSafeRegister(&xVec3Multiply, libs, "graphene_vec3_multiply")
408	core.PuregoSafeRegister(&xVec3Near, libs, "graphene_vec3_near")
409	core.PuregoSafeRegister(&xVec3Negate, libs, "graphene_vec3_negate")
410	core.PuregoSafeRegister(&xVec3Normalize, libs, "graphene_vec3_normalize")
411	core.PuregoSafeRegister(&xVec3Scale, libs, "graphene_vec3_scale")
412	core.PuregoSafeRegister(&xVec3Subtract, libs, "graphene_vec3_subtract")
413	core.PuregoSafeRegister(&xVec3ToFloat, libs, "graphene_vec3_to_float")
414
415}

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