addUnquantizedVertex Method

Add a vertex to the mesh and return its index in RealityMeshParamsBuilder.positions.

addUnquantizedVertex(position: Readonly<WritableXYAndZ>, uv: Readonly<WritableXAndY>, normal?: Readonly<WritableXYAndZ>): number

see RealityMeshParamsBuilder.addQuantizedVertex if your vertex data is already quantized.

Parameter Type Description
position Readonly<WritableXYAndZ> The 3d position, which will be quantized to the RealityMeshParamsBuilderOptions.positionRange supplied to the builder's constructor.
uv Readonly<WritableXAndY> The texture coordinates, which will be quantized to the RealityMeshParamsBuilderOptions.uvRange supplied to the builder's constructor.
normal Readonly<WritableXYAndZ>  

Returns - number

the index of the new vertex in RealityMeshParamsBuilder.positions.

Defined in

Last Updated: 20 June, 2023