public final class Mesh
Immutable indexed triangle mesh, independent of any GPU context. Vertices use eight packed Floats: position XYZ, normal XYZ, texture UV. Indices refer to vertices; winding is counterclockwise. Constructor copies buffers once, O(vertices + indices). GPU uploads are cached by mesh identity. Example: mesh = Mesh("triangle", vertices, indices)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | boundsbounds as Bounds3d |
Bounds copy, O(1). |
| public readonly property | indexCountindexCount as Int |
Number of indices, O(1). |
| public readonly property | namename as String |
Mesh name. |
| public readonly property | vertexCountvertexCount as Int |
Number of vertices, O(1). |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Mesh | Validates and copies geometry; normals must be finite and nonzero. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | copyIndicescopyIndices() as UInt[] |
Explicit CPU index copy, O(indices). |
| public | copyVerticescopyVertices() as Float[] |
Explicit CPU buffer copy, O(vertices). |
| public | position | Reads a position in O(1); checks its vertex index. |