QPoint2dList Class

A list of QPoint2ds all quantized to the same range.

extensions

Methods

Name Description
constructor(params: QParams2d): QPoint2dList Construct an empty list set up to use the supplied quantization parameters.  
add(pt: Point2d): void Quantizes the supplied Point2d to this list's range and appends it to the list.  
clear(): void Removes all points from the list.  
fromTypedArray(range: Range2d, array: Uint16Array): void Create from a Uint16Array laid out such that array[0] corresponds to the first point's x component, array[1] to the first point's y component, and so on.  
push(qpt: QPoint2d): void Adds a previously-quantized point to this list.  
requantize(params: QParams2d): void Changes the quantization parameters and requantizes all points in the list to the new range.  
reset(params: QParams2d): void Removes all points from the list and change the quantization parameters.  
toTypedArray(): Uint16Array Extracts the current contents of the list as a Uint16Array such that the first element of the array corresponds to the first point's x component,  
unquantize(index: number, out?: Point2d): Point2d Returns the unquantized value of the point at the specified index in the list.  
fromPoints(points: Point2d[], out?: QPoint2dList): QPoint2dList Static Construct a QPoint2dList containing all points in the supplied list, quantized to the range of those points.  

Properties

Name Type Description
length Accessor ReadOnly number The number of points in the list.  
list Accessor ReadOnly undefined The list of quantized points.  
params Readonly QParams2d Parameters used to quantize the points.  

Defined in

Last Updated: 30 November, 2023