This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zzz_SphericalHarmonics.go
287 lines (236 loc) · 8.89 KB
/
zzz_SphericalHarmonics.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
// Code generated by docs2go. DO NOT EDIT.
package babylon
import (
"syscall/js"
)
// SphericalHarmonics represents a babylon.js SphericalHarmonics.
// Class representing spherical harmonics coefficients to the 3rd degree
type SphericalHarmonics struct {
p js.Value
ctx js.Value
}
// JSObject returns the underlying js.Value.
func (s *SphericalHarmonics) JSObject() js.Value { return s.p }
// SphericalHarmonics returns a SphericalHarmonics JavaScript class.
func (ba *Babylon) SphericalHarmonics() *SphericalHarmonics {
p := ba.ctx.Get("SphericalHarmonics")
return SphericalHarmonicsFromJSObject(p, ba.ctx)
}
// SphericalHarmonicsFromJSObject returns a wrapped SphericalHarmonics JavaScript class.
func SphericalHarmonicsFromJSObject(p js.Value, ctx js.Value) *SphericalHarmonics {
return &SphericalHarmonics{p: p, ctx: ctx}
}
// SphericalHarmonicsArrayToJSArray returns a JavaScript Array for the wrapped array.
func SphericalHarmonicsArrayToJSArray(array []*SphericalHarmonics) []interface{} {
var result []interface{}
for _, v := range array {
result = append(result, v.JSObject())
}
return result
}
// AddLight calls the AddLight method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#addlight
func (s *SphericalHarmonics) AddLight(direction *Vector3, color *Color3, deltaSolidAngle float64) {
args := make([]interface{}, 0, 3+0)
if direction == nil {
args = append(args, js.Null())
} else {
args = append(args, direction.JSObject())
}
if color == nil {
args = append(args, js.Null())
} else {
args = append(args, color.JSObject())
}
args = append(args, deltaSolidAngle)
s.p.Call("addLight", args...)
}
// ConvertIncidentRadianceToIrradiance calls the ConvertIncidentRadianceToIrradiance method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#convertincidentradiancetoirradiance
func (s *SphericalHarmonics) ConvertIncidentRadianceToIrradiance() {
s.p.Call("convertIncidentRadianceToIrradiance")
}
// ConvertIrradianceToLambertianRadiance calls the ConvertIrradianceToLambertianRadiance method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#convertirradiancetolambertianradiance
func (s *SphericalHarmonics) ConvertIrradianceToLambertianRadiance() {
s.p.Call("convertIrradianceToLambertianRadiance")
}
// FromArray calls the FromArray method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#fromarray
func (s *SphericalHarmonics) FromArray(data js.Value) *SphericalHarmonics {
args := make([]interface{}, 0, 1+0)
args = append(args, data)
retVal := s.p.Call("FromArray", args...)
return SphericalHarmonicsFromJSObject(retVal, s.ctx)
}
// FromPolynomial calls the FromPolynomial method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#frompolynomial
func (s *SphericalHarmonics) FromPolynomial(polynomial *SphericalPolynomial) *SphericalHarmonics {
args := make([]interface{}, 0, 1+0)
if polynomial == nil {
args = append(args, js.Null())
} else {
args = append(args, polynomial.JSObject())
}
retVal := s.p.Call("FromPolynomial", args...)
return SphericalHarmonicsFromJSObject(retVal, s.ctx)
}
// PreScaleForRendering calls the PreScaleForRendering method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#prescaleforrendering
func (s *SphericalHarmonics) PreScaleForRendering() {
s.p.Call("preScaleForRendering")
}
// ScaleInPlace calls the ScaleInPlace method on the SphericalHarmonics object.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#scaleinplace
func (s *SphericalHarmonics) ScaleInPlace(scale float64) {
args := make([]interface{}, 0, 1+0)
args = append(args, scale)
s.p.Call("scaleInPlace", args...)
}
// L00 returns the L00 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l00
func (s *SphericalHarmonics) L00() *Vector3 {
retVal := s.p.Get("l00")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL00 sets the L00 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l00
func (s *SphericalHarmonics) SetL00(l00 *Vector3) *SphericalHarmonics {
s.p.Set("l00", l00.JSObject())
return s
}
// L10 returns the L10 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l10
func (s *SphericalHarmonics) L10() *Vector3 {
retVal := s.p.Get("l10")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL10 sets the L10 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l10
func (s *SphericalHarmonics) SetL10(l10 *Vector3) *SphericalHarmonics {
s.p.Set("l10", l10.JSObject())
return s
}
// L11 returns the L11 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l11
func (s *SphericalHarmonics) L11() *Vector3 {
retVal := s.p.Get("l11")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL11 sets the L11 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l11
func (s *SphericalHarmonics) SetL11(l11 *Vector3) *SphericalHarmonics {
s.p.Set("l11", l11.JSObject())
return s
}
// L1_1 returns the L1_1 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l1_1
func (s *SphericalHarmonics) L1_1() *Vector3 {
retVal := s.p.Get("l1_1")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL1_1 sets the L1_1 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l1_1
func (s *SphericalHarmonics) SetL1_1(l1_1 *Vector3) *SphericalHarmonics {
s.p.Set("l1_1", l1_1.JSObject())
return s
}
// L20 returns the L20 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l20
func (s *SphericalHarmonics) L20() *Vector3 {
retVal := s.p.Get("l20")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL20 sets the L20 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l20
func (s *SphericalHarmonics) SetL20(l20 *Vector3) *SphericalHarmonics {
s.p.Set("l20", l20.JSObject())
return s
}
// L21 returns the L21 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l21
func (s *SphericalHarmonics) L21() *Vector3 {
retVal := s.p.Get("l21")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL21 sets the L21 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l21
func (s *SphericalHarmonics) SetL21(l21 *Vector3) *SphericalHarmonics {
s.p.Set("l21", l21.JSObject())
return s
}
// L22 returns the L22 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l22
func (s *SphericalHarmonics) L22() *Vector3 {
retVal := s.p.Get("l22")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL22 sets the L22 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l22
func (s *SphericalHarmonics) SetL22(l22 *Vector3) *SphericalHarmonics {
s.p.Set("l22", l22.JSObject())
return s
}
// L2_1 returns the L2_1 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l2_1
func (s *SphericalHarmonics) L2_1() *Vector3 {
retVal := s.p.Get("l2_1")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL2_1 sets the L2_1 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l2_1
func (s *SphericalHarmonics) SetL2_1(l2_1 *Vector3) *SphericalHarmonics {
s.p.Set("l2_1", l2_1.JSObject())
return s
}
// L2_2 returns the L2_2 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l2_2
func (s *SphericalHarmonics) L2_2() *Vector3 {
retVal := s.p.Get("l2_2")
return Vector3FromJSObject(retVal, s.ctx)
}
// SetL2_2 sets the L2_2 property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#l2_2
func (s *SphericalHarmonics) SetL2_2(l2_2 *Vector3) *SphericalHarmonics {
s.p.Set("l2_2", l2_2.JSObject())
return s
}
// PreScaled returns the PreScaled property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#prescaled
func (s *SphericalHarmonics) PreScaled() bool {
retVal := s.p.Get("preScaled")
return retVal.Bool()
}
// SetPreScaled sets the PreScaled property of class SphericalHarmonics.
//
// https://doc.babylonjs.com/api/classes/babylon.sphericalharmonics#prescaled
func (s *SphericalHarmonics) SetPreScaled(preScaled bool) *SphericalHarmonics {
s.p.Set("preScaled", preScaled)
return s
}