Navigation · interface
PolyMesh
Explained in Navigation.
interface PolyMeshimport type { PolyMesh } from '@driftengine/nav';Properties
| Name | Type | Description |
|---|---|---|
verticesreadonly | Int32Array | x,z per vertex, in cell units. originX, originZ and cellSize turn them into metres. |
vertexCountreadonly | number | |
polysreadonly | Int32Array | maxVertsPerPoly slots per polygon, padded with -1. |
neighboursreadonly | Int32Array | The polygon across each edge, or -1. Same layout as polys: edge i leaves vertex i. |
polyCountreadonly | number | |
maxVertsPerPolyreadonly | number | |
polyRegionreadonly | Int32Array | Which region each polygon came from. |
originXreadonly | number | Where the mesh stands, kept with it. The field it was built from knew and the mesh used to drop it, so a query given positions in metres compared them with cell indices and answered in a mixture of the two — invisible to every test that built its field at the origin with one-unit cells, where the two are the same number. |
originZreadonly | number | |
cellSizereadonly | number |