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 3D volume delimited by 2D clip planes.
15//
16// The contents of the `graphene_frustum_t` are private, and should not be
17// modified directly.
18type Frustum struct {
19 _ structs.HostLayout
20
21 Planes [6]Plane
22}
23
24var xFrustumGLibType func() types.GType
25
26func FrustumGLibType() types.GType {
27 return xFrustumGLibType()
28}
29
30func (x *Frustum) GoPointer() uintptr {
31 return uintptr(unsafe.Pointer(x))
32}
33
34var xFrustumAlloc func() *Frustum
35
36// Allocates a new #graphene_frustum_t structure.
37//
38// The contents of the returned structure are undefined.
39func FrustumAlloc() *Frustum {
40
41 cret := xFrustumAlloc()
42 return cret
43}
44
45var xFrustumContainsPoint func(uintptr, *Point3D) bool
46
47// Checks whether a point is inside the volume defined by the given
48// #graphene_frustum_t.
49func (x *Frustum) ContainsPoint(PointVar *Point3D) bool {
50
51 cret := xFrustumContainsPoint(x.GoPointer(), PointVar)
52 return cret
53}
54
55var xFrustumEqual func(uintptr, *Frustum) bool
56
57// Checks whether the two given #graphene_frustum_t are equal.
58func (x *Frustum) Equal(BVar *Frustum) bool {
59
60 cret := xFrustumEqual(x.GoPointer(), BVar)
61 return cret
62}
63
64var xFrustumFree func(uintptr)
65
66// Frees the resources allocated by graphene_frustum_alloc().
67func (x *Frustum) Free() {
68
69 xFrustumFree(x.GoPointer())
70
71}
72
73var xFrustumGetPlanes func(uintptr, *[6]Plane)
74
75// Retrieves the planes that define the given #graphene_frustum_t.
76func (x *Frustum) GetPlanes(PlanesVar *[6]Plane) {
77
78 xFrustumGetPlanes(x.GoPointer(), PlanesVar)
79
80}
81
82var xFrustumInit func(uintptr, *Plane, *Plane, *Plane, *Plane, *Plane, *Plane) *Frustum
83
84// Initializes the given #graphene_frustum_t using the provided
85// clipping planes.
86func (x *Frustum) Init(P0Var *Plane, P1Var *Plane, P2Var *Plane, P3Var *Plane, P4Var *Plane, P5Var *Plane) *Frustum {
87
88 cret := xFrustumInit(x.GoPointer(), P0Var, P1Var, P2Var, P3Var, P4Var, P5Var)
89 return cret
90}
91
92var xFrustumInitFromFrustum func(uintptr, *Frustum) *Frustum
93
94// Initializes the given #graphene_frustum_t using the clipping
95// planes of another #graphene_frustum_t.
96func (x *Frustum) InitFromFrustum(SrcVar *Frustum) *Frustum {
97
98 cret := xFrustumInitFromFrustum(x.GoPointer(), SrcVar)
99 return cret
100}
101
102var xFrustumInitFromMatrix func(uintptr, *Matrix) *Frustum
103
104// Initializes a #graphene_frustum_t using the given @matrix.
105func (x *Frustum) InitFromMatrix(MatrixVar *Matrix) *Frustum {
106
107 cret := xFrustumInitFromMatrix(x.GoPointer(), MatrixVar)
108 return cret
109}
110
111var xFrustumIntersectsBox func(uintptr, *Box) bool
112
113// Checks whether the given @box intersects a plane of
114// a #graphene_frustum_t.
115func (x *Frustum) IntersectsBox(BoxVar *Box) bool {
116
117 cret := xFrustumIntersectsBox(x.GoPointer(), BoxVar)
118 return cret
119}
120
121var xFrustumIntersectsSphere func(uintptr, *Sphere) bool
122
123// Checks whether the given @sphere intersects a plane of
124// a #graphene_frustum_t.
125func (x *Frustum) IntersectsSphere(SphereVar *Sphere) bool {
126
127 cret := xFrustumIntersectsSphere(x.GoPointer(), SphereVar)
128 return cret
129}
130
131func init() {
132 core.SetPackageName("GRAPHENE", "graphene-gobject-1.0")
133 core.SetSharedLibraries("GRAPHENE", []string{"libgraphene-1.0.so.0"})
134 var libs []uintptr
135 for _, libPath := range core.GetPaths("GRAPHENE") {
136 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
137 if err != nil {
138 panic(err)
139 }
140 libs = append(libs, lib)
141 }
142
143 core.PuregoSafeRegister(&xFrustumGLibType, libs, "graphene_frustum_get_type")
144
145 core.PuregoSafeRegister(&xFrustumAlloc, libs, "graphene_frustum_alloc")
146
147 core.PuregoSafeRegister(&xFrustumContainsPoint, libs, "graphene_frustum_contains_point")
148 core.PuregoSafeRegister(&xFrustumEqual, libs, "graphene_frustum_equal")
149 core.PuregoSafeRegister(&xFrustumFree, libs, "graphene_frustum_free")
150 core.PuregoSafeRegister(&xFrustumGetPlanes, libs, "graphene_frustum_get_planes")
151 core.PuregoSafeRegister(&xFrustumInit, libs, "graphene_frustum_init")
152 core.PuregoSafeRegister(&xFrustumInitFromFrustum, libs, "graphene_frustum_init_from_frustum")
153 core.PuregoSafeRegister(&xFrustumInitFromMatrix, libs, "graphene_frustum_init_from_matrix")
154 core.PuregoSafeRegister(&xFrustumIntersectsBox, libs, "graphene_frustum_intersects_box")
155 core.PuregoSafeRegister(&xFrustumIntersectsSphere, libs, "graphene_frustum_intersects_sphere")
156
157}