/
sprite3d.gen.go
331 lines (261 loc) · 8.91 KB
/
sprite3d.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
package godot
import (
"github.com/shadowapex/godot-go/gdnative"
)
/*------------------------------------------------------------------------------
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Any updates should be done in
// "class.go.tmpl" so they can be included in the generated
// code.
//----------------------------------------------------------------------------*/
//func NewSprite3DFromPointer(ptr gdnative.Pointer) Sprite3D {
func newSprite3DFromPointer(ptr gdnative.Pointer) Sprite3D {
owner := gdnative.NewObjectFromPointer(ptr)
obj := Sprite3D{}
obj.SetBaseObject(owner)
return obj
}
/*
A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
*/
type Sprite3D struct {
SpriteBase3D
owner gdnative.Object
}
func (o *Sprite3D) BaseClass() string {
return "Sprite3D"
}
/*
Undocumented
Args: [], Returns: int
*/
func (o *Sprite3D) GetFrame() gdnative.Int {
//log.Println("Calling Sprite3D.GetFrame()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 0, 0)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "get_frame")
// Call the parent method.
// int
retPtr := gdnative.NewEmptyInt()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
// If we have a return type, convert it from a pointer into its actual object.
ret := gdnative.NewIntFromPointer(retPtr)
return ret
}
/*
Undocumented
Args: [], Returns: int
*/
func (o *Sprite3D) GetHframes() gdnative.Int {
//log.Println("Calling Sprite3D.GetHframes()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 0, 0)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "get_hframes")
// Call the parent method.
// int
retPtr := gdnative.NewEmptyInt()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
// If we have a return type, convert it from a pointer into its actual object.
ret := gdnative.NewIntFromPointer(retPtr)
return ret
}
/*
Undocumented
Args: [], Returns: Rect2
*/
func (o *Sprite3D) GetRegionRect() gdnative.Rect2 {
//log.Println("Calling Sprite3D.GetRegionRect()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 0, 0)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "get_region_rect")
// Call the parent method.
// Rect2
retPtr := gdnative.NewEmptyRect2()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
// If we have a return type, convert it from a pointer into its actual object.
ret := gdnative.NewRect2FromPointer(retPtr)
return ret
}
/*
Undocumented
Args: [], Returns: Texture
*/
func (o *Sprite3D) GetTexture() TextureImplementer {
//log.Println("Calling Sprite3D.GetTexture()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 0, 0)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "get_texture")
// Call the parent method.
// Texture
retPtr := gdnative.NewEmptyObject()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
// If we have a return type, convert it from a pointer into its actual object.
ret := newTextureFromPointer(retPtr)
// Check to see if we already have an instance of this object in our Go instance registry.
if instance, ok := InstanceRegistry.Get(ret.GetBaseObject().ID()); ok {
return instance.(TextureImplementer)
}
// Check to see what kind of class this is and create it. This is generally used with
// GetNode().
className := ret.GetClass()
if className != "Texture" {
actualRet := getActualClass(className, ret.GetBaseObject())
return actualRet.(TextureImplementer)
}
return &ret
}
/*
Undocumented
Args: [], Returns: int
*/
func (o *Sprite3D) GetVframes() gdnative.Int {
//log.Println("Calling Sprite3D.GetVframes()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 0, 0)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "get_vframes")
// Call the parent method.
// int
retPtr := gdnative.NewEmptyInt()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
// If we have a return type, convert it from a pointer into its actual object.
ret := gdnative.NewIntFromPointer(retPtr)
return ret
}
/*
Undocumented
Args: [], Returns: bool
*/
func (o *Sprite3D) IsRegion() gdnative.Bool {
//log.Println("Calling Sprite3D.IsRegion()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 0, 0)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "is_region")
// Call the parent method.
// bool
retPtr := gdnative.NewEmptyBool()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
// If we have a return type, convert it from a pointer into its actual object.
ret := gdnative.NewBoolFromPointer(retPtr)
return ret
}
/*
Undocumented
Args: [{ false frame int}], Returns: void
*/
func (o *Sprite3D) SetFrame(frame gdnative.Int) {
//log.Println("Calling Sprite3D.SetFrame()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 1, 1)
ptrArguments[0] = gdnative.NewPointerFromInt(frame)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "set_frame")
// Call the parent method.
// void
retPtr := gdnative.NewEmptyVoid()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
}
/*
Undocumented
Args: [{ false hframes int}], Returns: void
*/
func (o *Sprite3D) SetHframes(hframes gdnative.Int) {
//log.Println("Calling Sprite3D.SetHframes()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 1, 1)
ptrArguments[0] = gdnative.NewPointerFromInt(hframes)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "set_hframes")
// Call the parent method.
// void
retPtr := gdnative.NewEmptyVoid()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
}
/*
Undocumented
Args: [{ false enabled bool}], Returns: void
*/
func (o *Sprite3D) SetRegion(enabled gdnative.Bool) {
//log.Println("Calling Sprite3D.SetRegion()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 1, 1)
ptrArguments[0] = gdnative.NewPointerFromBool(enabled)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "set_region")
// Call the parent method.
// void
retPtr := gdnative.NewEmptyVoid()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
}
/*
Undocumented
Args: [{ false rect Rect2}], Returns: void
*/
func (o *Sprite3D) SetRegionRect(rect gdnative.Rect2) {
//log.Println("Calling Sprite3D.SetRegionRect()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 1, 1)
ptrArguments[0] = gdnative.NewPointerFromRect2(rect)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "set_region_rect")
// Call the parent method.
// void
retPtr := gdnative.NewEmptyVoid()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
}
/*
Undocumented
Args: [{ false texture Texture}], Returns: void
*/
func (o *Sprite3D) SetTexture(texture TextureImplementer) {
//log.Println("Calling Sprite3D.SetTexture()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 1, 1)
ptrArguments[0] = gdnative.NewPointerFromObject(texture.GetBaseObject())
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "set_texture")
// Call the parent method.
// void
retPtr := gdnative.NewEmptyVoid()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
}
/*
Undocumented
Args: [{ false vframes int}], Returns: void
*/
func (o *Sprite3D) SetVframes(vframes gdnative.Int) {
//log.Println("Calling Sprite3D.SetVframes()")
// Build out the method's arguments
ptrArguments := make([]gdnative.Pointer, 1, 1)
ptrArguments[0] = gdnative.NewPointerFromInt(vframes)
// Get the method bind
methodBind := gdnative.NewMethodBind("Sprite3D", "set_vframes")
// Call the parent method.
// void
retPtr := gdnative.NewEmptyVoid()
gdnative.MethodBindPtrCall(methodBind, o.GetBaseObject(), ptrArguments, retPtr)
}
// Sprite3DImplementer is an interface that implements the methods
// of the Sprite3D class.
type Sprite3DImplementer interface {
SpriteBase3DImplementer
GetFrame() gdnative.Int
GetHframes() gdnative.Int
GetRegionRect() gdnative.Rect2
GetTexture() TextureImplementer
GetVframes() gdnative.Int
IsRegion() gdnative.Bool
SetFrame(frame gdnative.Int)
SetHframes(hframes gdnative.Int)
SetRegion(enabled gdnative.Bool)
SetRegionRect(rect gdnative.Rect2)
SetTexture(texture TextureImplementer)
SetVframes(vframes gdnative.Int)
}