v0.2.2 9100209

graphene-point3d.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 point with three components: X, Y, and Z.
15type Point3D struct {
16	_ structs.HostLayout
17
18	X float32
19
20	Y float32
21
22	Z float32
23}
24
25var xPoint3DGLibType func() types.GType
26
27func Point3DGLibType() types.GType {
28	return xPoint3DGLibType()
29}
30
31func (x *Point3D) GoPointer() uintptr {
32	return uintptr(unsafe.Pointer(x))
33}
34
35var xPoint3DAlloc func() *Point3D
36
37// Allocates a #graphene_point3d_t structure.
38func Point3DAlloc() *Point3D {
39
40	cret := xPoint3DAlloc()
41	return cret
42}
43
44var xPoint3DCross func(uintptr, *Point3D, *Point3D)
45
46// Computes the cross product of the two given #graphene_point3d_t.
47func (x *Point3D) Cross(BVar *Point3D, ResVar *Point3D) {
48
49	xPoint3DCross(x.GoPointer(), BVar, ResVar)
50
51}
52
53var xPoint3DDistance func(uintptr, *Point3D, *Vec3) float32
54
55// Computes the distance between the two given #graphene_point3d_t.
56func (x *Point3D) Distance(BVar *Point3D, DeltaVar *Vec3) float32 {
57
58	cret := xPoint3DDistance(x.GoPointer(), BVar, DeltaVar)
59	return cret
60}
61
62var xPoint3DDot func(uintptr, *Point3D) float32
63
64// Computes the dot product of the two given #graphene_point3d_t.
65func (x *Point3D) Dot(BVar *Point3D) float32 {
66
67	cret := xPoint3DDot(x.GoPointer(), BVar)
68	return cret
69}
70
71var xPoint3DEqual func(uintptr, *Point3D) bool
72
73// Checks whether two given points are equal.
74func (x *Point3D) Equal(BVar *Point3D) bool {
75
76	cret := xPoint3DEqual(x.GoPointer(), BVar)
77	return cret
78}
79
80var xPoint3DFree func(uintptr)
81
82// Frees the resources allocated via graphene_point3d_alloc().
83func (x *Point3D) Free() {
84
85	xPoint3DFree(x.GoPointer())
86
87}
88
89var xPoint3DInit func(uintptr, float32, float32, float32) *Point3D
90
91// Initializes a #graphene_point3d_t with the given coordinates.
92func (x *Point3D) Init(XVar float32, YVar float32, ZVar float32) *Point3D {
93
94	cret := xPoint3DInit(x.GoPointer(), XVar, YVar, ZVar)
95	return cret
96}
97
98var xPoint3DInitFromPoint func(uintptr, *Point3D) *Point3D
99
100// Initializes a #graphene_point3d_t using the coordinates of
101// another #graphene_point3d_t.
102func (x *Point3D) InitFromPoint(SrcVar *Point3D) *Point3D {
103
104	cret := xPoint3DInitFromPoint(x.GoPointer(), SrcVar)
105	return cret
106}
107
108var xPoint3DInitFromVec3 func(uintptr, *Vec3) *Point3D
109
110// Initializes a #graphene_point3d_t using the components
111// of a #graphene_vec3_t.
112func (x *Point3D) InitFromVec3(VVar *Vec3) *Point3D {
113
114	cret := xPoint3DInitFromVec3(x.GoPointer(), VVar)
115	return cret
116}
117
118var xPoint3DInterpolate func(uintptr, *Point3D, float64, *Point3D)
119
120// Linearly interpolates each component of @a and @b using the
121// provided @factor, and places the result in @res.
122func (x *Point3D) Interpolate(BVar *Point3D, FactorVar float64, ResVar *Point3D) {
123
124	xPoint3DInterpolate(x.GoPointer(), BVar, FactorVar, ResVar)
125
126}
127
128var xPoint3DLength func(uintptr) float32
129
130// Computes the length of the vector represented by the
131// coordinates of the given #graphene_point3d_t.
132func (x *Point3D) Length() float32 {
133
134	cret := xPoint3DLength(x.GoPointer())
135	return cret
136}
137
138var xPoint3DNear func(uintptr, *Point3D, float32) bool
139
140// Checks whether the two points are near each other, within
141// an @epsilon factor.
142func (x *Point3D) Near(BVar *Point3D, EpsilonVar float32) bool {
143
144	cret := xPoint3DNear(x.GoPointer(), BVar, EpsilonVar)
145	return cret
146}
147
148var xPoint3DNormalize func(uintptr, *Point3D)
149
150// Computes the normalization of the vector represented by the
151// coordinates of the given #graphene_point3d_t.
152func (x *Point3D) Normalize(ResVar *Point3D) {
153
154	xPoint3DNormalize(x.GoPointer(), ResVar)
155
156}
157
158var xPoint3DNormalizeViewport func(uintptr, *Rect, float32, float32, *Point3D)
159
160// Normalizes the coordinates of a #graphene_point3d_t using the
161// given viewport and clipping planes.
162//
163// The coordinates of the resulting #graphene_point3d_t will be
164// in the [ -1, 1 ] range.
165func (x *Point3D) NormalizeViewport(ViewportVar *Rect, ZNearVar float32, ZFarVar float32, ResVar *Point3D) {
166
167	xPoint3DNormalizeViewport(x.GoPointer(), ViewportVar, ZNearVar, ZFarVar, ResVar)
168
169}
170
171var xPoint3DScale func(uintptr, float32, *Point3D)
172
173// Scales the coordinates of the given #graphene_point3d_t by
174// the given @factor.
175func (x *Point3D) Scale(FactorVar float32, ResVar *Point3D) {
176
177	xPoint3DScale(x.GoPointer(), FactorVar, ResVar)
178
179}
180
181var xPoint3DToVec3 func(uintptr, *Vec3)
182
183// Stores the coordinates of a #graphene_point3d_t into a
184// #graphene_vec3_t.
185func (x *Point3D) ToVec3(VVar *Vec3) {
186
187	xPoint3DToVec3(x.GoPointer(), VVar)
188
189}
190
191var xPoint3dZero func() *Point3D
192
193// Retrieves a constant point with all three coordinates set to 0.
194func Point3dZero() *Point3D {
195
196	cret := xPoint3dZero()
197	return cret
198}
199
200func init() {
201	core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
202	core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
203	var libs []uintptr
204	for _, libPath := range core.GetPaths("GRAPHENE") {
205		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
206		if err != nil {
207			panic(err)
208		}
209		libs = append(libs, lib)
210	}
211
212	core.PuregoSafeRegister(&xPoint3dZero, libs, "graphene_point3d_zero")
213
214	core.PuregoSafeRegister(&xPoint3DGLibType, libs, "graphene_point3d_get_type")
215
216	core.PuregoSafeRegister(&xPoint3DAlloc, libs, "graphene_point3d_alloc")
217
218	core.PuregoSafeRegister(&xPoint3DCross, libs, "graphene_point3d_cross")
219	core.PuregoSafeRegister(&xPoint3DDistance, libs, "graphene_point3d_distance")
220	core.PuregoSafeRegister(&xPoint3DDot, libs, "graphene_point3d_dot")
221	core.PuregoSafeRegister(&xPoint3DEqual, libs, "graphene_point3d_equal")
222	core.PuregoSafeRegister(&xPoint3DFree, libs, "graphene_point3d_free")
223	core.PuregoSafeRegister(&xPoint3DInit, libs, "graphene_point3d_init")
224	core.PuregoSafeRegister(&xPoint3DInitFromPoint, libs, "graphene_point3d_init_from_point")
225	core.PuregoSafeRegister(&xPoint3DInitFromVec3, libs, "graphene_point3d_init_from_vec3")
226	core.PuregoSafeRegister(&xPoint3DInterpolate, libs, "graphene_point3d_interpolate")
227	core.PuregoSafeRegister(&xPoint3DLength, libs, "graphene_point3d_length")
228	core.PuregoSafeRegister(&xPoint3DNear, libs, "graphene_point3d_near")
229	core.PuregoSafeRegister(&xPoint3DNormalize, libs, "graphene_point3d_normalize")
230	core.PuregoSafeRegister(&xPoint3DNormalizeViewport, libs, "graphene_point3d_normalize_viewport")
231	core.PuregoSafeRegister(&xPoint3DScale, libs, "graphene_point3d_scale")
232	core.PuregoSafeRegister(&xPoint3DToVec3, libs, "graphene_point3d_to_vec3")
233
234}

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