v0.2.1 c0399be

graphene-plane.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 2D plane that extends infinitely in a 3D volume.
15//
16// The contents of the `graphene_plane_t` are private, and should not be
17// modified directly.
18type Plane struct {
19	_ structs.HostLayout
20
21	Normal uintptr
22
23	Constant float32
24}
25
26var xPlaneGLibType func() types.GType
27
28func PlaneGLibType() types.GType {
29	return xPlaneGLibType()
30}
31
32func (x *Plane) GoPointer() uintptr {
33	return uintptr(unsafe.Pointer(x))
34}
35
36var xPlaneAlloc func() *Plane
37
38// Allocates a new #graphene_plane_t structure.
39//
40// The contents of the returned structure are undefined.
41func PlaneAlloc() *Plane {
42
43	cret := xPlaneAlloc()
44	return cret
45}
46
47var xPlaneDistance func(uintptr, *Point3D) float32
48
49// Computes the distance of @point from a #graphene_plane_t.
50func (x *Plane) Distance(PointVar *Point3D) float32 {
51
52	cret := xPlaneDistance(x.GoPointer(), PointVar)
53	return cret
54}
55
56var xPlaneEqual func(uintptr, *Plane) bool
57
58// Checks whether the two given #graphene_plane_t are equal.
59func (x *Plane) Equal(BVar *Plane) bool {
60
61	cret := xPlaneEqual(x.GoPointer(), BVar)
62	return cret
63}
64
65var xPlaneFree func(uintptr)
66
67// Frees the resources allocated by graphene_plane_alloc().
68func (x *Plane) Free() {
69
70	xPlaneFree(x.GoPointer())
71
72}
73
74var xPlaneGetConstant func(uintptr) float32
75
76// Retrieves the distance along the normal vector of the
77// given #graphene_plane_t from the origin.
78func (x *Plane) GetConstant() float32 {
79
80	cret := xPlaneGetConstant(x.GoPointer())
81	return cret
82}
83
84var xPlaneGetNormal func(uintptr, *Vec3)
85
86// Retrieves the normal vector pointing towards the origin of the
87// given #graphene_plane_t.
88func (x *Plane) GetNormal(NormalVar *Vec3) {
89
90	xPlaneGetNormal(x.GoPointer(), NormalVar)
91
92}
93
94var xPlaneInit func(uintptr, *Vec3, float32) *Plane
95
96// Initializes the given #graphene_plane_t using the given @normal vector
97// and @constant values.
98func (x *Plane) Init(NormalVar *Vec3, ConstantVar float32) *Plane {
99
100	cret := xPlaneInit(x.GoPointer(), NormalVar, ConstantVar)
101	return cret
102}
103
104var xPlaneInitFromPlane func(uintptr, *Plane) *Plane
105
106// Initializes the given #graphene_plane_t using the normal
107// vector and constant of another #graphene_plane_t.
108func (x *Plane) InitFromPlane(SrcVar *Plane) *Plane {
109
110	cret := xPlaneInitFromPlane(x.GoPointer(), SrcVar)
111	return cret
112}
113
114var xPlaneInitFromPoint func(uintptr, *Vec3, *Point3D) *Plane
115
116// Initializes the given #graphene_plane_t using the given normal vector
117// and an arbitrary co-planar point.
118func (x *Plane) InitFromPoint(NormalVar *Vec3, PointVar *Point3D) *Plane {
119
120	cret := xPlaneInitFromPoint(x.GoPointer(), NormalVar, PointVar)
121	return cret
122}
123
124var xPlaneInitFromPoints func(uintptr, *Point3D, *Point3D, *Point3D) *Plane
125
126// Initializes the given #graphene_plane_t using the 3 provided co-planar
127// points.
128//
129// The winding order is counter-clockwise, and determines which direction
130// the normal vector will point.
131func (x *Plane) InitFromPoints(AVar *Point3D, BVar *Point3D, CVar *Point3D) *Plane {
132
133	cret := xPlaneInitFromPoints(x.GoPointer(), AVar, BVar, CVar)
134	return cret
135}
136
137var xPlaneInitFromVec4 func(uintptr, *Vec4) *Plane
138
139// Initializes the given #graphene_plane_t using the components of
140// the given #graphene_vec4_t vector.
141func (x *Plane) InitFromVec4(SrcVar *Vec4) *Plane {
142
143	cret := xPlaneInitFromVec4(x.GoPointer(), SrcVar)
144	return cret
145}
146
147var xPlaneNegate func(uintptr, *Plane)
148
149// Negates the normal vector and constant of a #graphene_plane_t, effectively
150// mirroring the plane across the origin.
151func (x *Plane) Negate(ResVar *Plane) {
152
153	xPlaneNegate(x.GoPointer(), ResVar)
154
155}
156
157var xPlaneNormalize func(uintptr, *Plane)
158
159// Normalizes the vector of the given #graphene_plane_t,
160// and adjusts the constant accordingly.
161func (x *Plane) Normalize(ResVar *Plane) {
162
163	xPlaneNormalize(x.GoPointer(), ResVar)
164
165}
166
167var xPlaneTransform func(uintptr, *Matrix, *Matrix, *Plane)
168
169// Transforms a #graphene_plane_t @p using the given @matrix
170// and @normal_matrix.
171//
172// If @normal_matrix is %NULL, a transformation matrix for the plane
173// normal will be computed from @matrix. If you are transforming
174// multiple planes using the same @matrix it's recommended to compute
175// the normal matrix beforehand to avoid incurring in the cost of
176// recomputing it every time.
177func (x *Plane) Transform(MatrixVar *Matrix, NormalMatrixVar *Matrix, ResVar *Plane) {
178
179	xPlaneTransform(x.GoPointer(), MatrixVar, NormalMatrixVar, ResVar)
180
181}
182
183func init() {
184	core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
185	core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
186	var libs []uintptr
187	for _, libPath := range core.GetPaths("GRAPHENE") {
188		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
189		if err != nil {
190			panic(err)
191		}
192		libs = append(libs, lib)
193	}
194
195	core.PuregoSafeRegister(&xPlaneGLibType, libs, "graphene_plane_get_type")
196
197	core.PuregoSafeRegister(&xPlaneAlloc, libs, "graphene_plane_alloc")
198
199	core.PuregoSafeRegister(&xPlaneDistance, libs, "graphene_plane_distance")
200	core.PuregoSafeRegister(&xPlaneEqual, libs, "graphene_plane_equal")
201	core.PuregoSafeRegister(&xPlaneFree, libs, "graphene_plane_free")
202	core.PuregoSafeRegister(&xPlaneGetConstant, libs, "graphene_plane_get_constant")
203	core.PuregoSafeRegister(&xPlaneGetNormal, libs, "graphene_plane_get_normal")
204	core.PuregoSafeRegister(&xPlaneInit, libs, "graphene_plane_init")
205	core.PuregoSafeRegister(&xPlaneInitFromPlane, libs, "graphene_plane_init_from_plane")
206	core.PuregoSafeRegister(&xPlaneInitFromPoint, libs, "graphene_plane_init_from_point")
207	core.PuregoSafeRegister(&xPlaneInitFromPoints, libs, "graphene_plane_init_from_points")
208	core.PuregoSafeRegister(&xPlaneInitFromVec4, libs, "graphene_plane_init_from_vec4")
209	core.PuregoSafeRegister(&xPlaneNegate, libs, "graphene_plane_negate")
210	core.PuregoSafeRegister(&xPlaneNormalize, libs, "graphene_plane_normalize")
211	core.PuregoSafeRegister(&xPlaneTransform, libs, "graphene_plane_transform")
212
213}

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