QPoint2dBufferBuilder Class

Constructs a QPoint2dBuffer using a Uint16ArrayBuilder.

Methods

Name Description
constructor(options: QPoint2dBufferBuilderOptions): QPoint2dBufferBuilder Construct a new buffer with a 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 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 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 buffer.  
params Readonly QParams2d The parameters used to quantize the points in the buffer.  

Defined in

Last Updated: 14 November, 2024