bg2e-js 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bg2e-js.js +11005 -0
- package/dist/bg2e-js.js.map +1 -0
- package/package.json +17 -6
- package/app/AppController.d.ts +0 -37
- package/app/AppController.js +0 -32
- package/app/Canvas.d.ts +0 -42
- package/app/Canvas.js +0 -98
- package/app/EventBase.js +0 -8
- package/app/KeyboardEvent.js +0 -51
- package/app/MainLoop.d.ts +0 -245
- package/app/MainLoop.js +0 -251
- package/app/MouseEvent.js +0 -77
- package/app/TouchEvent.js +0 -15
- package/base/Color.js +0 -131
- package/base/Environment.js +0 -78
- package/base/Light.js +0 -176
- package/base/Material.js +0 -619
- package/base/PolyList.js +0 -336
- package/base/Texture.js +0 -545
- package/db/Bg2LoaderPlugin.js +0 -113
- package/db/DBPluginApi.js +0 -40
- package/db/Loader.js +0 -91
- package/db/LoaderPlugin.js +0 -26
- package/db/MtlParser.js +0 -7
- package/db/ObjLoaderPlugin.js +0 -51
- package/db/ObjParser.js +0 -233
- package/db/ObjWriterPlugin.js +0 -18
- package/db/VitscnjLoaderPlugin.js +0 -87
- package/db/Writer.js +0 -49
- package/db/WriterPlugin.js +0 -20
- package/debug/DebugRenderer.js +0 -138
- package/debug/WebGLTextureViewer.js +0 -67
- package/manipulation/SelectionBuffer.js +0 -65
- package/manipulation/SelectionHighlight.js +0 -69
- package/manipulation/SelectionIdAssignVisitor.js +0 -86
- package/manipulation/SelectionManager.js +0 -134
- package/manipulation/SelectionMode.js +0 -6
- package/math/Mat3.js +0 -248
- package/math/Mat4.js +0 -694
- package/math/MatrixStrategy.js +0 -23
- package/math/Quat.js +0 -60
- package/math/Vec.js +0 -728
- package/math/constants.js +0 -44
- package/math/functions.js +0 -104
- package/math/index.js +0 -74
- package/phsics/joint.js +0 -124
- package/primitives/arrow.js +0 -58
- package/primitives/cone.js +0 -137
- package/primitives/cube.js +0 -59
- package/primitives/cylinder.js +0 -215
- package/primitives/index.js +0 -13
- package/primitives/plane.js +0 -31
- package/primitives/sphere.js +0 -808
- package/render/BRDFIntegrationMap.js +0 -4
- package/render/Environment.js +0 -105
- package/render/EnvironmentRenderer.js +0 -12
- package/render/FrameBuffer.js +0 -26
- package/render/MaterialRenderer.js +0 -28
- package/render/Pipeline.js +0 -83
- package/render/PolyListRenderer.js +0 -42
- package/render/RenderBuffer.js +0 -189
- package/render/RenderQueue.js +0 -162
- package/render/RenderState.js +0 -82
- package/render/Renderer.js +0 -202
- package/render/SceneAppController.js +0 -208
- package/render/SceneRenderer.js +0 -310
- package/render/Shader.js +0 -21
- package/render/ShadowRenderer.js +0 -159
- package/render/SkyCube.js +0 -77
- package/render/SkySphere.js +0 -94
- package/render/TextureMergerRenderer.js +0 -58
- package/render/TextureRenderer.js +0 -29
- package/render/webgl/FrameBuffer.js +0 -9
- package/render/webgl/MaterialRenderer.js +0 -99
- package/render/webgl/Pipeline.js +0 -82
- package/render/webgl/PolyListRenderer.js +0 -224
- package/render/webgl/RenderBuffer.js +0 -244
- package/render/webgl/Renderer.js +0 -239
- package/render/webgl/SceneRenderer.js +0 -43
- package/render/webgl/ShaderProgram.js +0 -350
- package/render/webgl/ShadowRenderer.js +0 -6
- package/render/webgl/SkyCube.js +0 -15
- package/render/webgl/SkySphere.js +0 -14
- package/render/webgl/State.js +0 -149
- package/render/webgl/TextureRenderer.js +0 -167
- package/render/webgl/VertexBuffer.js +0 -128
- package/scene/Camera.js +0 -378
- package/scene/Chain.js +0 -43
- package/scene/ChainJoint.js +0 -55
- package/scene/Component.js +0 -146
- package/scene/ComponentMap.js +0 -99
- package/scene/Drawable.js +0 -130
- package/scene/EnvironmentComponent.js +0 -123
- package/scene/FindNodeVisitor.js +0 -55
- package/scene/LightComponent.js +0 -146
- package/scene/MatrixState.js +0 -39
- package/scene/Node.js +0 -300
- package/scene/NodeVisitor.js +0 -12
- package/scene/OrbitCameraController.js +0 -407
- package/scene/SmoothOrbitCameraController.js +0 -92
- package/scene/Transform.js +0 -74
- package/scene/index.js +0 -24
- package/shaders/BasicDiffuseColorShader.js +0 -91
- package/shaders/BasicPBRLightShader.js +0 -238
- package/shaders/DebugRenderShader.js +0 -79
- package/shaders/DepthRenderShader.js +0 -69
- package/shaders/IrradianceMapCubeShader.js +0 -99
- package/shaders/PBRLightIBLShader.js +0 -380
- package/shaders/PickSelectionShader.js +0 -75
- package/shaders/PresentDebugFramebufferShader.js +0 -90
- package/shaders/PresentTextureShader.js +0 -73
- package/shaders/SelectionHighlightShader.js +0 -98
- package/shaders/ShaderFunction.js +0 -72
- package/shaders/SkyCubeShader.js +0 -78
- package/shaders/SkySphereShader.js +0 -77
- package/shaders/SpecularMapCubeShader.js +0 -145
- package/shaders/TextureMergerShader.js +0 -127
- package/shaders/webgl_shader_lib.js +0 -187
- package/tools/BinaryResourceProvider.js +0 -15
- package/tools/ImageResourceProvider.js +0 -65
- package/tools/MaterialModifier.js +0 -228
- package/tools/Resource.js +0 -177
- package/tools/ResourceProvider.js +0 -56
- package/tools/TextResourceProvider.js +0 -24
- package/tools/TextureCache.js +0 -44
- package/tools/TextureResourceDatabase.js +0 -87
- package/tools/UserAgent.js +0 -294
- package/tools/VideoResourceProvider.js +0 -51
- package/tools/WriteStrategy.js +0 -22
- package/tools/base64.js +0 -15
- package/tools/crypto.js +0 -15
- package/tools/endiantess.js +0 -15
- package/tools/image.js +0 -15
- package/tools/index.js +0 -33
- package/tools/processType.js +0 -56
package/base/PolyList.js
DELETED
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import Vec from "../math/Vec";
|
|
2
|
-
import Mat4 from "../math/Mat4";
|
|
3
|
-
import Color from "./Color";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export const BufferType = Object.freeze({
|
|
7
|
-
VERTEX: 1 << 0,
|
|
8
|
-
NORMAL: 1 << 1,
|
|
9
|
-
TEX_COORD_0: 1 << 2,
|
|
10
|
-
TEX_COORD_1: 1 << 3,
|
|
11
|
-
TEX_COORD_2: 1 << 4,
|
|
12
|
-
COLOR: 1 << 5,
|
|
13
|
-
TANGENT: 1 << 6,
|
|
14
|
-
INDEX: 1 << 7
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const DrawMode = Object.freeze({
|
|
18
|
-
POINTS: 0,
|
|
19
|
-
TRIANGLES: 1,
|
|
20
|
-
TRIANGLE_FAN: 2,
|
|
21
|
-
TRIANGLE_STRIP: 3,
|
|
22
|
-
LINES: 4,
|
|
23
|
-
LINE_STRIP: 5
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const RenderLayer = Object.freeze({
|
|
27
|
-
LAYER_0: 0x1 << 0,
|
|
28
|
-
OPAQUE_DEFAULT: 0x1 << 0, // layer 0 is the default layer for opaque objects
|
|
29
|
-
LAYER_1: 0x1 << 1,
|
|
30
|
-
LAYER_2: 0x1 << 2,
|
|
31
|
-
LAYER_3: 0x1 << 3,
|
|
32
|
-
LAYER_4: 0x1 << 4,
|
|
33
|
-
LAYER_5: 0x1 << 5,
|
|
34
|
-
LAYER_6: 0x1 << 6,
|
|
35
|
-
LAYER_7: 0x1 << 7,
|
|
36
|
-
LAYER_8: 0x1 << 8,
|
|
37
|
-
LAYER_9: 0x1 << 9,
|
|
38
|
-
LAYER_10: 0x1 << 10,
|
|
39
|
-
LAYER_11: 0x1 << 11,
|
|
40
|
-
LAYER_12: 0x1 << 12,
|
|
41
|
-
LAYER_13: 0x1 << 13,
|
|
42
|
-
LAYER_14: 0x1 << 14,
|
|
43
|
-
LAYER_15: 0x1 << 15,
|
|
44
|
-
TRANSPARENT_DEFAULT: 0x1 << 15, // Layer 15 is the default layer for transparent objects
|
|
45
|
-
LAYER_16: 0x1 << 16,
|
|
46
|
-
LAYER_17: 0x1 << 17,
|
|
47
|
-
LAYER_18: 0x1 << 18,
|
|
48
|
-
LAYER_19: 0x1 << 19,
|
|
49
|
-
LAYER_20: 0x1 << 20,
|
|
50
|
-
LAYER_21: 0x1 << 21,
|
|
51
|
-
LAYER_22: 0x1 << 22,
|
|
52
|
-
LAYER_23: 0x1 << 23,
|
|
53
|
-
LAYER_24: 0x1 << 24,
|
|
54
|
-
LAYER_25: 0x1 << 25,
|
|
55
|
-
LAYER_26: 0x1 << 26,
|
|
56
|
-
LAYER_27: 0x1 << 27,
|
|
57
|
-
LAYER_28: 0x1 << 28,
|
|
58
|
-
LAYER_29: 0x1 << 29,
|
|
59
|
-
LAYER_30: 0x1 << 30,
|
|
60
|
-
LAYER_31: 0x1 << 31,
|
|
61
|
-
SELECTION_DEFAULT: 0x1 << 31, // Layer 31 is the default layer for mouse pick selection
|
|
62
|
-
|
|
63
|
-
ALL: 0xFFFFFFFF,
|
|
64
|
-
|
|
65
|
-
AUTO: 0
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// Process the default layer if RenderLayer is set to AUTO. To do it, you need
|
|
69
|
-
// the object material to know if the layer must be set to transparent or opaque
|
|
70
|
-
export const getLayers = (polyList,material) => {
|
|
71
|
-
return polyList.renderLayers === RenderLayer.AUTO ?
|
|
72
|
-
(material.isTransparent ? RenderLayer.TRANSPARENT_DEFAULT : RenderLayer.OPAQUE_DEFAULT) | RenderLayer.SELECTION_DEFAULT :
|
|
73
|
-
(polyList.renderLayers);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export const PolyListFrontFace = Object.freeze({
|
|
77
|
-
CW: 0,
|
|
78
|
-
CCW: 1
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
export const PolyListCullFace = Object.freeze({
|
|
82
|
-
FRONT: 0,
|
|
83
|
-
BACK: 1,
|
|
84
|
-
FRONT_AND_BACK: 2
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
function buildTangents(plist) {
|
|
88
|
-
const result = [];
|
|
89
|
-
|
|
90
|
-
const createVertex = (index) => {
|
|
91
|
-
return {
|
|
92
|
-
pos: new Vec(plist.vertex[index] * 3, plist.vertex[index + 1] * 3, plist.vertex[index + 2] * 3 ),
|
|
93
|
-
uv: new Vec(plist.texCoord0[index] * 2, plist.texCoord0[index + 1] * 2 )
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const createUV = (v1, v2) => Vec.Sub(v1.uv, v2.uv);
|
|
98
|
-
|
|
99
|
-
const calcR = (uv1, uv2) => 1.0 / (uv1.x * uv2.y - uv1.y * uv2.x);
|
|
100
|
-
|
|
101
|
-
if (plist.index.length % 3 === 0) {
|
|
102
|
-
for (let i = 0; i < plist.index.length - 2; i += 3) {
|
|
103
|
-
let v0 = createVertex(plist.index[i + 1]);
|
|
104
|
-
let v1 = createVertex(plist.index[i]);
|
|
105
|
-
let v2 = createVertex(plist.index[i + 2]);
|
|
106
|
-
|
|
107
|
-
let edge1 = Vec.Sub(v1.pos, v0.pos);
|
|
108
|
-
let edge2 = Vec.Sub(v2.pos, v0.pos);
|
|
109
|
-
|
|
110
|
-
let uv1 = createUV(v1, v0);
|
|
111
|
-
let uv2 = createUV(v2, v0);
|
|
112
|
-
let r = calcR(uv1, uv2);
|
|
113
|
-
|
|
114
|
-
if (!isFinite(r)) {
|
|
115
|
-
v0.uv.x = v0.uv.x * 1.3;
|
|
116
|
-
v0.uv.y = v0.uv.y * 0.8;
|
|
117
|
-
uv1 = createUV(v1, v0);
|
|
118
|
-
uv2 = createUV(v2, v0);
|
|
119
|
-
r = calcR(uv1, uv2);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
if (!isFinite(r)) {
|
|
123
|
-
v2.uv.x = v2.uv.x * 1.1;
|
|
124
|
-
v2.uv.y = v2.uv.y * 0.9;
|
|
125
|
-
uv1 = createUV(v1, v0);
|
|
126
|
-
uv2 = createUV(v2, v0);
|
|
127
|
-
r = calcR(uv1, uv2);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
const tangent = new Vec(
|
|
131
|
-
((edge1.x * uv2.y) - (edge2.x * uv1.y)) * r,
|
|
132
|
-
((edge1.y * uv2.y) - (edge2.y * uv1.y)) * r,
|
|
133
|
-
((edge1.z * uv2.y) - (edge2.z * uv1.y)) * r
|
|
134
|
-
);
|
|
135
|
-
tangent.normalize();
|
|
136
|
-
|
|
137
|
-
result.push(tangent.x);
|
|
138
|
-
result.push(tangent.y);
|
|
139
|
-
result.push(tangent.z);
|
|
140
|
-
|
|
141
|
-
result.push(tangent.x);
|
|
142
|
-
result.push(tangent.y);
|
|
143
|
-
result.push(tangent.z);
|
|
144
|
-
|
|
145
|
-
result.push(tangent.x);
|
|
146
|
-
result.push(tangent.y);
|
|
147
|
-
result.push(tangent.z);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
for (let i=0; i<plist.vertex.length; i+=3) {
|
|
152
|
-
result.push(0,0,1);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
console.warn("Could not generate tangents: invalid type of faces found.");
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
plist._tangent = result;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export default class PolyList {
|
|
162
|
-
constructor() {
|
|
163
|
-
// The object will be rendered in the default layer for
|
|
164
|
-
// transparent or opaque objects
|
|
165
|
-
this._renderLayers = RenderLayer.AUTO;
|
|
166
|
-
|
|
167
|
-
this._drawMode = DrawMode.TRIANGLES;
|
|
168
|
-
this._lineWidth = 1.0;
|
|
169
|
-
|
|
170
|
-
this._name = "";
|
|
171
|
-
this._groupName = "";
|
|
172
|
-
this._visible = true;
|
|
173
|
-
this._visibleToShadows = true;
|
|
174
|
-
|
|
175
|
-
this._cullFace = PolyListCullFace.BACK;
|
|
176
|
-
this._frontFace = PolyListFrontFace.CCW;
|
|
177
|
-
this._enableCullFace = true;
|
|
178
|
-
|
|
179
|
-
this._vertex = [];
|
|
180
|
-
this._normal = [];
|
|
181
|
-
this._texCoord0 = [];
|
|
182
|
-
this._texCoord1 = [];
|
|
183
|
-
this._texCoord2 = [];
|
|
184
|
-
this._color = [];
|
|
185
|
-
this._index = [];
|
|
186
|
-
|
|
187
|
-
// Internal use: the following properties will not be serialized
|
|
188
|
-
this._colorCode = Color.Black();
|
|
189
|
-
this._selected = false;
|
|
190
|
-
this._selectable = true;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
clone() {
|
|
194
|
-
const result = new PolyList();
|
|
195
|
-
result.assign(this);
|
|
196
|
-
result.name = this.name + " clone";
|
|
197
|
-
return result;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
assign(other) {
|
|
201
|
-
this.drawMode = other.drawMode;
|
|
202
|
-
this.lineWidth = other.lineWidth;
|
|
203
|
-
this.name = other.name;
|
|
204
|
-
this.groupName = other.groupName;
|
|
205
|
-
this.visible = other.visible;
|
|
206
|
-
this.visibleToShadows = other.visibleToSh
|
|
207
|
-
this.vertex = [...other.vertex];
|
|
208
|
-
this.normal = [...other.normal];
|
|
209
|
-
this.texCoord0 = [...other.texCoord0];
|
|
210
|
-
this.texCoord1 = [...other.texCoord1];
|
|
211
|
-
this.texCoord2 = [...other.texCoord2];
|
|
212
|
-
this.color = [...other.color];
|
|
213
|
-
this.index = [...other.index];
|
|
214
|
-
this.rebuildTangents();
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// render layers aren't serialized/deserialized, they are used only by the graphics engine
|
|
218
|
-
get renderLayers() { return this._renderLayers; }
|
|
219
|
-
set renderLayers(layers) { this._renderLayers = layers; }
|
|
220
|
-
enableLayer(layer) { this._renderLayers = this._renderLayers | layer; }
|
|
221
|
-
disableLayer(layer) { this._renderLayers = this._renderLayers & ~layer; }
|
|
222
|
-
|
|
223
|
-
set cullFace(v) { this._cullFace = v; }
|
|
224
|
-
get cullFace() { return this._cullFace; }
|
|
225
|
-
set frontFace(v) { this._frontFace = v; }
|
|
226
|
-
get frontFace() { return this._frontFace; }
|
|
227
|
-
set enableCullFace(v) { this._enableCullFace = v; }
|
|
228
|
-
get enableCullFace() { return this._enableCullFace; }
|
|
229
|
-
|
|
230
|
-
get drawMode() { return this._drawMode; }
|
|
231
|
-
set drawMode(m) { this._drawMode = m; }
|
|
232
|
-
get lineWidth() { return this._lineWidth; }
|
|
233
|
-
set lineWidth(w) { this._lineWidth = w; }
|
|
234
|
-
|
|
235
|
-
get name() { return this._name; }
|
|
236
|
-
set name(v) { this._name = v; }
|
|
237
|
-
get groupName() { return this._groupName; }
|
|
238
|
-
set groupName(v) { this._groupName = v; }
|
|
239
|
-
get visible() { return this._visible; }
|
|
240
|
-
set visible(v) { this._visible = v; }
|
|
241
|
-
get visibleToShadows() { return this._visibleToShadows; }
|
|
242
|
-
set visibleToShadows(v) { this._visibleToShadows = v; }
|
|
243
|
-
|
|
244
|
-
get vertex() { return this._vertex; }
|
|
245
|
-
set vertex(v) { this._vertex = v; }
|
|
246
|
-
get normal() { return this._normal; }
|
|
247
|
-
set normal(v) { this._normal = v; }
|
|
248
|
-
get texCoord0() { return this._texCoord0; }
|
|
249
|
-
set texCoord0(v) { this._texCoord0 = v; }
|
|
250
|
-
get texCoord1() { return this._texCoord1; }
|
|
251
|
-
set texCoord1(v) { this._texCoord1 = v; }
|
|
252
|
-
get texCoord2() { return this._texCoord2; }
|
|
253
|
-
set texCoord2(v) { this._texCoord2 = v; }
|
|
254
|
-
get color() { return this._color; }
|
|
255
|
-
set color(v) { this._color = v; }
|
|
256
|
-
get index() { return this._index; }
|
|
257
|
-
set index(v) { this._index = v; }
|
|
258
|
-
|
|
259
|
-
// Internal use: non serializable properties
|
|
260
|
-
set colorCode(c) {
|
|
261
|
-
this._colorCode = c;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
get colorCode() {
|
|
265
|
-
return this._colorCode;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
set selected(s) {
|
|
269
|
-
this._selected = s;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
get isSelected() {
|
|
273
|
-
return this._selected;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
get isSelectable() {
|
|
277
|
-
return this._selectable;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
set selectable(s) {
|
|
281
|
-
this._selectable = s;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// The this._renderer variable is initialized by the polyListRenderer factory
|
|
285
|
-
get renderer() {
|
|
286
|
-
return this._renderer
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
rebuildTangents() {
|
|
290
|
-
buildTangents(this);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
get tangent() {
|
|
294
|
-
if (!this.validTangents) {
|
|
295
|
-
buildTangents(this);
|
|
296
|
-
}
|
|
297
|
-
return this._tangent;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
get validTangents() {
|
|
301
|
-
return this._tangent &&
|
|
302
|
-
this._tangent.length === this._vertex.length &&
|
|
303
|
-
this._tangent.length / 3 === this._texCoord0.length / 2;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
destroy() {
|
|
307
|
-
if (this.renderer) {
|
|
308
|
-
this.renderer.destroy();
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
static ApplyTransform(plist, trx) {
|
|
313
|
-
const transform = new Mat4(trx);
|
|
314
|
-
const rotation = new Mat4(trx.mat3);
|
|
315
|
-
|
|
316
|
-
if (plist.normal.length > 0 && plist.normal.length != plist.vertex.length) {
|
|
317
|
-
throw new Error(`Unexpected number of normal coordinates found in polyList '${ plist.name }'`);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
for (let i = 0; i < plist.vertex.length - 2; i += 3) {
|
|
321
|
-
let vertex = new Vec(plist.vertex[i], plist.vertex[i+1], plist.vertex[i+2], 1.0);
|
|
322
|
-
vertex = transform.multVector(vertex);
|
|
323
|
-
plist.vertex[i] = vertex.x;
|
|
324
|
-
plist.vertex[i + 1] = vertex.y;
|
|
325
|
-
plist.vertex[i + 2] = vertex.z;
|
|
326
|
-
|
|
327
|
-
if (plist.normal.length) {
|
|
328
|
-
let normal = new Vec(plist.normal[i], plist.normal[i+1], plist.normal[i+2], 1.0);
|
|
329
|
-
normal = rotation.multVector(normal);
|
|
330
|
-
plist.normal[i] = normal.x;
|
|
331
|
-
plist.normal[i + 1] = normal.y;
|
|
332
|
-
plist.normal[i + 2] = normal.z;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|