@galacean/engine-core 2.0.0-alpha.56 → 2.0.0-alpha.58
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/main.js +13833 -11865
- package/dist/main.js.map +1 -1
- package/dist/module.js +13833 -11866
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/BasicResources.d.ts +8 -2
- package/types/Camera.d.ts +6 -0
- package/types/Engine.d.ts +10 -5
- package/types/SystemInfo.d.ts +3 -4
- package/types/graphic/Primitive.d.ts +2 -2
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +2 -2
- package/types/material/Material.d.ts +1 -0
- package/types/mesh/MeshTangentUtils.d.ts +9 -0
- package/types/mesh/ModelMesh.d.ts +5 -8
- package/types/mesh/PrimitiveMesh.d.ts +229 -101
- package/types/mesh/PrimitiveMeshOptions.d.ts +415 -0
- package/types/mesh/enums/PrimitiveMeshCapMode.d.ts +21 -0
- package/types/mesh/index.d.ts +2 -0
- package/types/mesh/primitive/MeshPathUtils.d.ts +13 -0
- package/types/mesh/primitive/PolygonUtils.d.ts +44 -0
- package/types/mesh/primitive/PrimitiveMeshBuilder.d.ts +25 -0
- package/types/mesh/primitive/PrimitiveMeshRestorer.d.ts +15 -0
- package/types/mesh/primitive/SubdivisionUtils.d.ts +9 -0
- package/types/particle/ParticleSubEmitterSpawnState.d.ts +2 -1
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +2 -6
- package/types/physics/CharacterController.d.ts +3 -3
- package/types/physics/Collider.d.ts +3 -2
- package/types/physics/PhysicsMaterial.d.ts +9 -3
- package/types/physics/shape/ColliderShape.d.ts +18 -7
- package/types/physics/shape/MeshColliderShape.d.ts +7 -12
- package/types/postProcess/FinalPass.d.ts +2 -1
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +78 -0
- package/types/renderingHardwareInterface/IPlatformPrimitive.d.ts +6 -0
- package/types/renderingHardwareInterface/IPlatformShaderProgram.d.ts +4 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +1 -1
- package/types/renderingHardwareInterface/index.d.ts +3 -0
- package/types/shader/BuiltinShaders.d.ts +27 -0
- package/types/shader/Shader.d.ts +0 -2
- package/types/shader/ShaderProgram.d.ts +2 -1
- package/types/shader/index.d.ts +1 -0
- package/types/shader/state/BlendState.d.ts +1 -1
- package/types/shader/state/DepthState.d.ts +1 -1
- package/types/shader/state/RasterState.d.ts +1 -1
- package/types/shader/state/StencilState.d.ts +1 -1
- package/types/texture/Texture.d.ts +25 -12
- package/types/texture/TextureUtils.d.ts +1 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +0 -108
|
@@ -1,146 +1,274 @@
|
|
|
1
|
+
import { Vector2, Vector3 } from "@galacean/engine-math";
|
|
1
2
|
import { Engine } from "../Engine";
|
|
2
|
-
import { Buffer } from "../graphic/Buffer";
|
|
3
3
|
import { ModelMesh } from "./ModelMesh";
|
|
4
|
+
import type { SphereMeshOptions, CuboidMeshOptions, PlaneMeshOptions, CylinderMeshOptions, TruncatedConeMeshOptions, ConeMeshOptions, CapsuleMeshOptions, TorusMeshOptions, CircleMeshOptions, RingMeshOptions, RegularPolyhedronMeshOptions, RevolvedSurfaceMeshOptions, TubeMeshOptions, PolygonMeshOptions, LinearExtrudedPolygonMeshOptions, PathExtrudedPolygonMeshOptions, TorusKnotMeshOptions, RoundedCuboidMeshOptions, PolygonShape } from "./PrimitiveMeshOptions";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Creates primitive meshes in local space. Angle ranges use degrees.
|
|
7
|
+
* Meshes have one sub-mesh unless material grouping is enabled.
|
|
8
|
+
* @remarks
|
|
9
|
+
* Input arrays and vectors are copied. Changing them later does not update the mesh.
|
|
10
|
+
* Device restoration uses the original creation inputs; later mesh edits are not backed up.
|
|
6
11
|
*/
|
|
7
12
|
export declare class PrimitiveMesh {
|
|
8
|
-
private static _tempVec30;
|
|
9
13
|
private static readonly _sphereSeedPositions;
|
|
10
14
|
private static readonly _sphereSeedCells;
|
|
11
|
-
private static
|
|
12
|
-
private static
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* @param
|
|
19
|
-
* @
|
|
15
|
+
private static readonly _goldenRatio;
|
|
16
|
+
private static readonly _inverseGoldenRatio;
|
|
17
|
+
private static readonly _regularPolyhedra;
|
|
18
|
+
/**
|
|
19
|
+
* Create a sphere or an open spherical section from a subdivided cube.
|
|
20
|
+
* U follows the horizontal angle interval and V follows the vertical angle interval, each scaled to 0–1.
|
|
21
|
+
* The horizontal start marks the U seam; V increases from the upper to the lower boundary.
|
|
22
|
+
* @param engine - The engine that owns the mesh
|
|
23
|
+
* @param radius - The radius in local units
|
|
24
|
+
* @param options - Optional mesh generation settings
|
|
25
|
+
* @returns The generated mesh
|
|
26
|
+
*/
|
|
27
|
+
static createSphere(engine: Engine, radius: number, options?: SphereMeshOptions): ModelMesh;
|
|
28
|
+
/**
|
|
29
|
+
* Create an axis-aligned cuboid centered at the origin.
|
|
30
|
+
* @remarks
|
|
31
|
+
* Each face spans 0–1 in U/V. Face directions (+U, +V) are:
|
|
32
|
+
* +Y: (+X, +Z); -Y: (+X, -Z); -X: (+Z, -Y);
|
|
33
|
+
* +X: (-Z, -Y); +Z: (+X, -Y); -Z: (-X, -Y).
|
|
34
|
+
* @param engine - The engine that owns the mesh
|
|
35
|
+
* @param width - The full size along X in local units
|
|
36
|
+
* @param height - The full size along Y in local units
|
|
37
|
+
* @param depth - The full size along Z in local units
|
|
38
|
+
* @param options - Optional mesh generation settings
|
|
39
|
+
* @returns The generated mesh
|
|
40
|
+
*/
|
|
41
|
+
static createCuboid(engine: Engine, width: number, height: number, depth: number, options?: CuboidMeshOptions): ModelMesh;
|
|
42
|
+
/**
|
|
43
|
+
* Create a plane in XZ facing +Y, centered at the origin.
|
|
44
|
+
* UVs span 0–1, with U along +X and V along +Z.
|
|
45
|
+
* @param engine - The engine that owns the mesh
|
|
46
|
+
* @param width - The full size along X in local units
|
|
47
|
+
* @param depth - The full size along Z in local units
|
|
48
|
+
* @param options - Optional mesh generation settings
|
|
49
|
+
* @returns The generated mesh
|
|
20
50
|
*/
|
|
21
|
-
static
|
|
51
|
+
static createPlane(engine: Engine, width: number, depth: number, options?: PlaneMeshOptions): ModelMesh;
|
|
22
52
|
/**
|
|
23
|
-
* Create a
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* @param
|
|
27
|
-
* @param
|
|
28
|
-
* @param
|
|
29
|
-
* @
|
|
53
|
+
* Create a cylinder centered on Y with equal end radii.
|
|
54
|
+
* U spans the angular range from 0 to 1; V runs from 0 at the top to 1 at the bottom.
|
|
55
|
+
* The default side seam is at -Z. Both caps use planar UVs with U along +X and V along -Z.
|
|
56
|
+
* @param engine - The engine that owns the mesh
|
|
57
|
+
* @param radius - The radius in local units
|
|
58
|
+
* @param height - The full size along Y in local units
|
|
59
|
+
* @param options - Optional mesh generation settings
|
|
60
|
+
* @returns The generated mesh
|
|
30
61
|
*/
|
|
31
|
-
static
|
|
62
|
+
static createCylinder(engine: Engine, radius: number, height: number, options?: CylinderMeshOptions): ModelMesh;
|
|
32
63
|
/**
|
|
33
|
-
* Create a
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
* @
|
|
64
|
+
* Create a truncated cone centered on Y with independently sized ends.
|
|
65
|
+
* U spans the angular range from 0 to 1; V runs from 0 at the top to 1 at the bottom.
|
|
66
|
+
* The default side seam is at -Z. Both caps use planar UVs with U along +X and V along -Z.
|
|
67
|
+
* @param engine - The engine that owns the mesh
|
|
68
|
+
* @param topRadius - The top radius in local units
|
|
69
|
+
* @param bottomRadius - The bottom radius in local units
|
|
70
|
+
* @param height - The full size along Y in local units
|
|
71
|
+
* @param options - Optional mesh generation settings
|
|
72
|
+
* @returns The generated mesh
|
|
40
73
|
*/
|
|
41
|
-
static
|
|
74
|
+
static createTruncatedCone(engine: Engine, topRadius: number, bottomRadius: number, height: number, options?: TruncatedConeMeshOptions): ModelMesh;
|
|
42
75
|
/**
|
|
43
|
-
* Create a
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
50
|
-
* @returns
|
|
76
|
+
* Create a cone centered on Y with its tip at the top.
|
|
77
|
+
* U spans the angular range from 0 to 1; V runs from 0 at the tip to 1 at the base.
|
|
78
|
+
* The default side seam is at -Z. The base uses planar UVs with U along +X and V along -Z.
|
|
79
|
+
* @param engine - The engine that owns the mesh
|
|
80
|
+
* @param radius - The bottom radius in local units
|
|
81
|
+
* @param height - The full size along Y in local units
|
|
82
|
+
* @param options - Optional mesh generation settings
|
|
83
|
+
* @returns The generated mesh
|
|
51
84
|
*/
|
|
52
|
-
static
|
|
85
|
+
static createCone(engine: Engine, radius: number, height: number, options?: ConeMeshOptions): ModelMesh;
|
|
53
86
|
/**
|
|
54
|
-
* Create a
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
60
|
-
* @param
|
|
61
|
-
* @
|
|
62
|
-
* @returns Cylinder model mesh
|
|
87
|
+
* Create a capsule centered on Y.
|
|
88
|
+
* U runs around Y from -Z towards -X. V runs from 0 at the top to 1 at the bottom,
|
|
89
|
+
* proportional to surface length along the hemispheres and cylinder.
|
|
90
|
+
* @param engine - The engine that owns the mesh
|
|
91
|
+
* @param radius - The radius of the cylinder and hemispherical ends in local units
|
|
92
|
+
* @param cylinderHeight - The straight cylindrical section height in local units; total height is `cylinderHeight + 2 * radius`
|
|
93
|
+
* @param options - Optional mesh generation settings
|
|
94
|
+
* @returns The generated mesh
|
|
63
95
|
*/
|
|
64
|
-
static
|
|
96
|
+
static createCapsule(engine: Engine, radius: number, cylinderHeight: number, options?: CapsuleMeshOptions): ModelMesh;
|
|
65
97
|
/**
|
|
66
|
-
* Create a torus
|
|
67
|
-
*
|
|
68
|
-
* @param
|
|
69
|
-
* @param
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
* @
|
|
73
|
-
* @param noLongerAccessible - No longer access the vertices of the mesh after creation
|
|
74
|
-
* @returns Torus model mesh
|
|
98
|
+
* Create a torus centered in XY around Z.
|
|
99
|
+
* U spans the ring angle interval and V spans the tube angle interval, each scaled to 0–1.
|
|
100
|
+
* @param engine - The engine that owns the mesh
|
|
101
|
+
* @param radius - The distance from the origin to the tube centerline in local units
|
|
102
|
+
* @param tubeRadius - The radius of the tube cross-section in local units
|
|
103
|
+
* @param options - Optional mesh generation settings
|
|
104
|
+
* @returns The generated mesh
|
|
75
105
|
*/
|
|
76
|
-
static createTorus(engine: Engine, radius
|
|
106
|
+
static createTorus(engine: Engine, radius: number, tubeRadius: number, options?: TorusMeshOptions): ModelMesh;
|
|
77
107
|
/**
|
|
78
|
-
* Create a
|
|
79
|
-
*
|
|
80
|
-
* @param
|
|
81
|
-
* @param
|
|
82
|
-
* @param
|
|
83
|
-
* @
|
|
84
|
-
* @param noLongerAccessible - No longer access the vertices of the mesh after creation
|
|
85
|
-
* @returns Cone model mesh
|
|
108
|
+
* Create a filled disk or sector in XY facing +Z.
|
|
109
|
+
* UVs project X/Y onto the full disk's bounding square; angular cuts do not rescale them.
|
|
110
|
+
* @param engine - The engine that owns the mesh
|
|
111
|
+
* @param radius - The radius in local units
|
|
112
|
+
* @param options - Optional mesh generation settings
|
|
113
|
+
* @returns The generated mesh
|
|
86
114
|
*/
|
|
87
|
-
static
|
|
115
|
+
static createCircle(engine: Engine, radius: number, options?: CircleMeshOptions): ModelMesh;
|
|
88
116
|
/**
|
|
89
|
-
* Create a
|
|
90
|
-
*
|
|
91
|
-
* @param
|
|
92
|
-
* @param
|
|
93
|
-
* @param
|
|
94
|
-
* @param
|
|
95
|
-
* @
|
|
96
|
-
* @returns Capsule model mesh
|
|
117
|
+
* Create a ring or ring sector in XY facing +Z.
|
|
118
|
+
* UVs project X/Y onto the outer disk's bounding square; angular cuts do not rescale them.
|
|
119
|
+
* @param engine - The engine that owns the mesh
|
|
120
|
+
* @param outerRadius - The outer radius in local units
|
|
121
|
+
* @param innerRadius - The inner radius in local units
|
|
122
|
+
* @param options - Optional mesh generation settings
|
|
123
|
+
* @returns The generated mesh
|
|
97
124
|
*/
|
|
98
|
-
static
|
|
125
|
+
static createRing(engine: Engine, outerRadius: number, innerRadius: number, options?: RingMeshOptions): ModelMesh;
|
|
99
126
|
/**
|
|
100
|
-
*
|
|
127
|
+
* Create a regular tetrahedron or its spherical subdivision.
|
|
128
|
+
* UVs use spherical projection around Y, with the U seam at +X and V from 0 at +Y to 1 at -Y.
|
|
129
|
+
* Triangles crossing the U seam may use values above 1.
|
|
130
|
+
* @param engine - The engine that owns the mesh
|
|
131
|
+
* @param radius - The distance from the origin to each vertex in local units
|
|
132
|
+
* @param options - Optional mesh generation settings
|
|
133
|
+
* @returns The generated mesh
|
|
101
134
|
*/
|
|
102
|
-
static
|
|
135
|
+
static createTetrahedron(engine: Engine, radius: number, options?: RegularPolyhedronMeshOptions): ModelMesh;
|
|
103
136
|
/**
|
|
104
|
-
*
|
|
137
|
+
* Create a regular octahedron or its spherical subdivision.
|
|
138
|
+
* UVs use spherical projection around Y, with the U seam at +X and V from 0 at +Y to 1 at -Y.
|
|
139
|
+
* Triangles crossing the U seam may use values above 1.
|
|
140
|
+
* @param engine - The engine that owns the mesh
|
|
141
|
+
* @param radius - The distance from the origin to each vertex in local units
|
|
142
|
+
* @param options - Optional mesh generation settings
|
|
143
|
+
* @returns The generated mesh
|
|
105
144
|
*/
|
|
106
|
-
static
|
|
145
|
+
static createOctahedron(engine: Engine, radius: number, options?: RegularPolyhedronMeshOptions): ModelMesh;
|
|
107
146
|
/**
|
|
108
|
-
*
|
|
147
|
+
* Create a regular icosahedron or its spherical subdivision.
|
|
148
|
+
* UVs use spherical projection around Y, with the U seam at +X and V from 0 at +Y to 1 at -Y.
|
|
149
|
+
* Triangles crossing the U seam may use values above 1.
|
|
150
|
+
* @param engine - The engine that owns the mesh
|
|
151
|
+
* @param radius - The distance from the origin to each vertex in local units
|
|
152
|
+
* @param options - Optional mesh generation settings
|
|
153
|
+
* @returns The generated mesh
|
|
109
154
|
*/
|
|
110
|
-
static
|
|
155
|
+
static createIcosahedron(engine: Engine, radius: number, options?: RegularPolyhedronMeshOptions): ModelMesh;
|
|
111
156
|
/**
|
|
112
|
-
*
|
|
157
|
+
* Create a regular dodecahedron or its spherical subdivision.
|
|
158
|
+
* UVs use spherical projection around Y, with the U seam at +X and V from 0 at +Y to 1 at -Y.
|
|
159
|
+
* Triangles crossing the U seam may use values above 1.
|
|
160
|
+
* @param engine - The engine that owns the mesh
|
|
161
|
+
* @param radius - The distance from the origin to each vertex in local units
|
|
162
|
+
* @param options - Optional mesh generation settings
|
|
163
|
+
* @returns The generated mesh
|
|
113
164
|
*/
|
|
114
|
-
|
|
165
|
+
static createDodecahedron(engine: Engine, radius: number, options?: RegularPolyhedronMeshOptions): ModelMesh;
|
|
115
166
|
/**
|
|
116
|
-
*
|
|
167
|
+
* Create a surface of revolution by rotating a radius-height profile around Y.
|
|
168
|
+
* No end caps are added automatically.
|
|
169
|
+
* Define inner walls and closed ends in the profile when needed.
|
|
170
|
+
* U spans the revolution from 0 to 1; V advances uniformly by profile point index from 0 to 1.
|
|
171
|
+
* @param engine - The engine that owns the mesh
|
|
172
|
+
* @param profile - The profile points in input order, with at least two points; X is radius and Y is height. Repeat the first point to close the profile
|
|
173
|
+
* @param options - Optional mesh generation settings
|
|
174
|
+
* @returns The generated mesh
|
|
117
175
|
*/
|
|
118
|
-
|
|
176
|
+
static createRevolvedSurface(engine: Engine, profile: readonly Vector2[], options?: RevolvedSurfaceMeshOptions): ModelMesh;
|
|
119
177
|
/**
|
|
120
|
-
*
|
|
178
|
+
* Sweep a circular cross-section along a path without end caps.
|
|
179
|
+
* U measures normalized path distance; V runs around the generated path frame from 0 to 1.
|
|
180
|
+
* @param engine - The engine that owns the mesh
|
|
181
|
+
* @param path - The centerline points, resampled at equal distances along the polyline; at least two distinct points are required
|
|
182
|
+
* @param radius - The radius of the cross-section in local units
|
|
183
|
+
* @param options - Optional mesh generation settings
|
|
184
|
+
* @returns The generated mesh
|
|
121
185
|
*/
|
|
122
|
-
static
|
|
186
|
+
static createTube(engine: Engine, path: readonly Vector3[], radius: number, options?: TubeMeshOptions): ModelMesh;
|
|
123
187
|
/**
|
|
124
|
-
*
|
|
188
|
+
* Create a zero-thickness polygon mesh in the XY plane, facing +Z.
|
|
189
|
+
* UVs use the local X/Y coordinates directly, without normalization.
|
|
190
|
+
* @param engine - The engine that owns the mesh
|
|
191
|
+
* @param shapes - A contour, a polygon with holes, or an array of polygons; closing points need not be repeated
|
|
192
|
+
* @param options - Optional mesh generation settings
|
|
193
|
+
* @returns The triangulated polygon mesh without side walls
|
|
125
194
|
*/
|
|
126
|
-
static
|
|
195
|
+
static createPolygon(engine: Engine, shapes: readonly Vector2[] | PolygonShape | readonly PolygonShape[], options?: PolygonMeshOptions): ModelMesh;
|
|
127
196
|
/**
|
|
128
|
-
*
|
|
197
|
+
* Extrude polygon contours along +Z.
|
|
198
|
+
* Caps use their local X/Y coordinates as UVs. Wall U measures the original contour length;
|
|
199
|
+
* V follows the generated extrusion layers from 0 to 1, including bevel layers.
|
|
200
|
+
* @param engine - The engine that owns the mesh
|
|
201
|
+
* @param shapes - A contour, a polygon with holes, or an array of polygons; closing points need not be repeated
|
|
202
|
+
* @param depth - The total extrusion depth in local units, including both end bevels
|
|
203
|
+
* @param options - Optional linear extrusion settings
|
|
204
|
+
* @returns The mesh with side walls and both end caps
|
|
129
205
|
*/
|
|
130
|
-
static
|
|
206
|
+
static createExtrudedPolygon(engine: Engine, shapes: readonly Vector2[] | PolygonShape | readonly PolygonShape[], depth: number, options?: LinearExtrudedPolygonMeshOptions): ModelMesh;
|
|
131
207
|
/**
|
|
132
|
-
*
|
|
208
|
+
* Extrude polygon contours along a spatial path.
|
|
209
|
+
* @remarks
|
|
210
|
+
* Open paths generate both end caps; closed paths join the end cross-sections without caps.
|
|
211
|
+
* Caps use cross-section X/Y coordinates as UVs. Wall U measures the contour length;
|
|
212
|
+
* V follows the path from 0 to 1.
|
|
213
|
+
* @param engine - The engine that owns the mesh
|
|
214
|
+
* @param shapes - A contour, a polygon with holes, or an array of polygons; closing points need not be repeated
|
|
215
|
+
* @param path - The extrusion path in local coordinates, with at least two distinct points
|
|
216
|
+
* @param options - Optional path extrusion settings
|
|
217
|
+
* @returns The mesh swept along the path
|
|
133
218
|
*/
|
|
134
|
-
static
|
|
219
|
+
static createExtrudedPolygon(engine: Engine, shapes: readonly Vector2[] | PolygonShape | readonly PolygonShape[], path: readonly Vector3[], options?: PathExtrudedPolygonMeshOptions): ModelMesh;
|
|
135
220
|
/**
|
|
136
|
-
*
|
|
221
|
+
* Create a closed torus knot. At least one of `axisTurns` and `crossSectionTurns` must be nonzero.
|
|
222
|
+
* U follows the knot parameter from 0 to 1; V runs around the generated tube cross-section from 0 to 1.
|
|
223
|
+
* @param engine - The engine that owns the mesh
|
|
224
|
+
* @param radius - The base radius of the torus in local units
|
|
225
|
+
* @param tubeRadius - The radius of the tube cross-section in local units
|
|
226
|
+
* @param axisTurns - The signed integer revolution count around the torus axis; negative values reverse the winding
|
|
227
|
+
* @param crossSectionTurns - The signed integer revolution count around the torus cross-section; negative values reverse the winding
|
|
228
|
+
* @param options - Optional mesh generation settings
|
|
229
|
+
* @returns The generated mesh
|
|
137
230
|
*/
|
|
138
|
-
static
|
|
231
|
+
static createTorusKnot(engine: Engine, radius: number, tubeRadius: number, axisTurns: number, crossSectionTurns: number, options?: TorusKnotMeshOptions): ModelMesh;
|
|
139
232
|
/**
|
|
140
|
-
*
|
|
233
|
+
* Create an axis-aligned cuboid with rounded edges and corners.
|
|
234
|
+
* @remarks
|
|
235
|
+
* UVs preserve the face orientations of {@link PrimitiveMesh.createCuboid} and account for rounded edge length.
|
|
236
|
+
* @param engine - The engine that owns the mesh
|
|
237
|
+
* @param width - The full size along X in local units
|
|
238
|
+
* @param height - The full size along Y in local units
|
|
239
|
+
* @param depth - The full size along Z in local units
|
|
240
|
+
* @param cornerRadius - The edge and corner radius in local units, clamped to half the smallest dimension
|
|
241
|
+
* @param options - Optional mesh generation settings
|
|
242
|
+
* @returns The generated mesh
|
|
141
243
|
*/
|
|
142
|
-
static
|
|
143
|
-
private static
|
|
144
|
-
private static
|
|
145
|
-
private static
|
|
244
|
+
static createRoundedCuboid(engine: Engine, width: number, height: number, depth: number, cornerRadius: number, options?: RoundedCuboidMeshOptions): ModelMesh;
|
|
245
|
+
private static _createPlaneData;
|
|
246
|
+
private static _createCuboidData;
|
|
247
|
+
private static _createCylinderData;
|
|
248
|
+
private static _createCapsuleData;
|
|
249
|
+
private static _createTorusData;
|
|
250
|
+
private static _createCircleData;
|
|
251
|
+
private static _createRingData;
|
|
252
|
+
private static _createRoundedCuboidData;
|
|
253
|
+
private static _createRevolvedSurfaceData;
|
|
254
|
+
private static _createTubeData;
|
|
255
|
+
private static _createTubeSurfaceData;
|
|
256
|
+
private static _createTorusKnotData;
|
|
257
|
+
private static _createRegularPolyhedronData;
|
|
258
|
+
private static _addPolyhedronFace;
|
|
259
|
+
private static _createPolygonData;
|
|
260
|
+
private static _createExtrudedPolygonData;
|
|
261
|
+
private static _insetContour;
|
|
262
|
+
private static _createSphereData;
|
|
263
|
+
private static _createSphereSectionData;
|
|
264
|
+
private static _clipSpherePolygon;
|
|
265
|
+
private static _createSphereSurfaceData;
|
|
266
|
+
private static _replacePoleUV;
|
|
267
|
+
private static _createMesh;
|
|
268
|
+
private static _polygons;
|
|
269
|
+
private static _setBounds;
|
|
270
|
+
private static _copy;
|
|
271
|
+
private static _createArcSamples;
|
|
272
|
+
private static _getSegmentCount;
|
|
273
|
+
private static _normalizeVector;
|
|
146
274
|
}
|