v0.2.1 c0399be

graphene-sphere.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 sphere, represented by its center and radius.
15type Sphere struct {
16	_ structs.HostLayout
17
18	Center uintptr
19
20	Radius float32
21}
22
23var xSphereGLibType func() types.GType
24
25func SphereGLibType() types.GType {
26	return xSphereGLibType()
27}
28
29func (x *Sphere) GoPointer() uintptr {
30	return uintptr(unsafe.Pointer(x))
31}
32
33var xSphereAlloc func() *Sphere
34
35// Allocates a new #graphene_sphere_t.
36//
37// The contents of the newly allocated structure are undefined.
38func SphereAlloc() *Sphere {
39
40	cret := xSphereAlloc()
41	return cret
42}
43
44var xSphereContainsPoint func(uintptr, *Point3D) bool
45
46// Checks whether the given @point is contained in the volume
47// of a #graphene_sphere_t.
48func (x *Sphere) ContainsPoint(PointVar *Point3D) bool {
49
50	cret := xSphereContainsPoint(x.GoPointer(), PointVar)
51	return cret
52}
53
54var xSphereDistance func(uintptr, *Point3D) float32
55
56// Computes the distance of the given @point from the surface of
57// a #graphene_sphere_t.
58func (x *Sphere) Distance(PointVar *Point3D) float32 {
59
60	cret := xSphereDistance(x.GoPointer(), PointVar)
61	return cret
62}
63
64var xSphereEqual func(uintptr, *Sphere) bool
65
66// Checks whether two #graphene_sphere_t are equal.
67func (x *Sphere) Equal(BVar *Sphere) bool {
68
69	cret := xSphereEqual(x.GoPointer(), BVar)
70	return cret
71}
72
73var xSphereFree func(uintptr)
74
75// Frees the resources allocated by graphene_sphere_alloc().
76func (x *Sphere) Free() {
77
78	xSphereFree(x.GoPointer())
79
80}
81
82var xSphereGetBoundingBox func(uintptr, *Box)
83
84// Computes the bounding box capable of containing the
85// given #graphene_sphere_t.
86func (x *Sphere) GetBoundingBox(BoxVar *Box) {
87
88	xSphereGetBoundingBox(x.GoPointer(), BoxVar)
89
90}
91
92var xSphereGetCenter func(uintptr, *Point3D)
93
94// Retrieves the coordinates of the center of a #graphene_sphere_t.
95func (x *Sphere) GetCenter(CenterVar *Point3D) {
96
97	xSphereGetCenter(x.GoPointer(), CenterVar)
98
99}
100
101var xSphereGetRadius func(uintptr) float32
102
103// Retrieves the radius of a #graphene_sphere_t.
104func (x *Sphere) GetRadius() float32 {
105
106	cret := xSphereGetRadius(x.GoPointer())
107	return cret
108}
109
110var xSphereInit func(uintptr, *Point3D, float32) *Sphere
111
112// Initializes the given #graphene_sphere_t with the given @center and @radius.
113func (x *Sphere) Init(CenterVar *Point3D, RadiusVar float32) *Sphere {
114
115	cret := xSphereInit(x.GoPointer(), CenterVar, RadiusVar)
116	return cret
117}
118
119var xSphereInitFromPoints func(uintptr, uint, []Point3D, *Point3D) *Sphere
120
121// Initializes the given #graphene_sphere_t using the given array
122// of 3D coordinates so that the sphere includes them.
123//
124// The center of the sphere can either be specified, or will be center
125// of the 3D volume that encompasses all @points.
126func (x *Sphere) InitFromPoints(NPointsVar uint, PointsVar []Point3D, CenterVar *Point3D) *Sphere {
127
128	cret := xSphereInitFromPoints(x.GoPointer(), NPointsVar, PointsVar, CenterVar)
129	return cret
130}
131
132var xSphereInitFromVectors func(uintptr, uint, []Vec3, *Point3D) *Sphere
133
134// Initializes the given #graphene_sphere_t using the given array
135// of 3D coordinates so that the sphere includes them.
136//
137// The center of the sphere can either be specified, or will be center
138// of the 3D volume that encompasses all @vectors.
139func (x *Sphere) InitFromVectors(NVectorsVar uint, VectorsVar []Vec3, CenterVar *Point3D) *Sphere {
140
141	cret := xSphereInitFromVectors(x.GoPointer(), NVectorsVar, VectorsVar, CenterVar)
142	return cret
143}
144
145var xSphereIsEmpty func(uintptr) bool
146
147// Checks whether the sphere has a zero radius.
148func (x *Sphere) IsEmpty() bool {
149
150	cret := xSphereIsEmpty(x.GoPointer())
151	return cret
152}
153
154var xSphereTranslate func(uintptr, *Point3D, *Sphere)
155
156// Translates the center of the given #graphene_sphere_t using the @point
157// coordinates as the delta of the translation.
158func (x *Sphere) Translate(PointVar *Point3D, ResVar *Sphere) {
159
160	xSphereTranslate(x.GoPointer(), PointVar, ResVar)
161
162}
163
164func init() {
165	core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
166	core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
167	var libs []uintptr
168	for _, libPath := range core.GetPaths("GRAPHENE") {
169		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
170		if err != nil {
171			panic(err)
172		}
173		libs = append(libs, lib)
174	}
175
176	core.PuregoSafeRegister(&xSphereGLibType, libs, "graphene_sphere_get_type")
177
178	core.PuregoSafeRegister(&xSphereAlloc, libs, "graphene_sphere_alloc")
179
180	core.PuregoSafeRegister(&xSphereContainsPoint, libs, "graphene_sphere_contains_point")
181	core.PuregoSafeRegister(&xSphereDistance, libs, "graphene_sphere_distance")
182	core.PuregoSafeRegister(&xSphereEqual, libs, "graphene_sphere_equal")
183	core.PuregoSafeRegister(&xSphereFree, libs, "graphene_sphere_free")
184	core.PuregoSafeRegister(&xSphereGetBoundingBox, libs, "graphene_sphere_get_bounding_box")
185	core.PuregoSafeRegister(&xSphereGetCenter, libs, "graphene_sphere_get_center")
186	core.PuregoSafeRegister(&xSphereGetRadius, libs, "graphene_sphere_get_radius")
187	core.PuregoSafeRegister(&xSphereInit, libs, "graphene_sphere_init")
188	core.PuregoSafeRegister(&xSphereInitFromPoints, libs, "graphene_sphere_init_from_points")
189	core.PuregoSafeRegister(&xSphereInitFromVectors, libs, "graphene_sphere_init_from_vectors")
190	core.PuregoSafeRegister(&xSphereIsEmpty, libs, "graphene_sphere_is_empty")
191	core.PuregoSafeRegister(&xSphereTranslate, libs, "graphene_sphere_translate")
192
193}

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