QPoint2dBufferBuilder Class

Constructs a QPoint2dBuffer using a Uint16ArrayBuilder.

extensions

Methods

Name Description
constructor(options: QPoint2dBufferBuilderOptions): QPoint2dBufferBuilder Construct a new buffer with a QPoint2dBufferBuilder.length of zero.  
finish(): QPoint2dBuffer Obtain a QPoint2dBuffer containing all of the points that have been appended by this builder.  
get(pointIndex: number, result?: QPoint2d): QPoint2d Returns the quantized point at the specified index in QPoint2dBufferBuilder.buffer.  
push(pt: Readonly<WritableXAndY>): void Append a point with the specified quantized coordinates.  
pushXY(x: number, y: number): void Append a point with the specified quantized coordinates.  
unquantize(pointIndex: number, result?: Point2d): Point2d Returns the unquantized point at the specified index in QPoint2dBufferBuilder.buffer.  

Properties

Name Type Description
buffer Readonly Uint16ArrayBuilder The buffer that holds the points.  
length Accessor ReadOnly number The number of points currently in the QPoint2dBufferBuilder.buffer.  
params Readonly QParams2d The parameters used to quantize the points in the QPoint2dBufferBuilder.buffer.  

Defined in

Last Updated: 30 November, 2023