addQuantizedVertex Method
Add a vertex to the mesh and return its index in RealityMeshParamsBuilder.positions.
addQuantizedVertex(position: Readonly<WritableXYAndZ>, uv: Readonly<WritableXAndY>, normal?: number): number
see RealityMeshParamsBuilder.addUnquantizedVertex if your vertex data is not already quantized.
Parameter | Type | Description |
---|---|---|
position | Readonly<WritableXYAndZ> | The 3d position, quantized to the RealityMeshParamsBuilderOptions.positionRange supplied to the builder's constructor. |
uv | Readonly<WritableXAndY> | The texture coordinates, quantized to the RealityMeshParamsBuilderOptions.uvRange supplied to the builder's constructor. |
normal | number | The unsigned 16-bit OctEncodedNormal integer representation of the normal vector, to be supplied if and only if RealityMeshParamsBuilderOptions.wantNormals was true when the builder was constructed. |
Returns - number
the index of the new vertex in RealityMeshParamsBuilder.positions.
Defined in
Last Updated: 30 November, 2023