QPoint3d Class

Represents a Point3d compressed such that each component x, y, and z is quantized to the 16-bit integer range [0, 0xffff]. These are primarily used to reduce the space required for coordinates used by RenderGraphics.

@see - QParams3d to define quantization parameters for a range of points.

  • QPoint3dList for a list of points all quantized to the same range.

Methods

Name Description
constructor(): QPoint3d Construct with all components initialized to zero.  
clone(out?: QPoint3d): QPoint3d Create a copy of this point.  
compare(rhs: QPoint3d): number Perform ordinal comparison to another point.  
copyFrom(src: QPoint3d): void Set this points components from src.  
equals(other: QPoint3d): boolean Return true if this point's components are identical to the other point's components.  
init(pos: Readonly<WritableXYAndZ>, params: QParams3d): void Initialize this point by quantizing the supplied { x, y, z } using the specified params  
setFromScalars(x: number, y: number, z: number): void Sets the x, y, and z components directly.  
unquantize(params: QParams3d, out?: Point3d): Point3d Returns a Point3d unquantized according to the supplied params.  
create(pos: Point3d, params: QParams3d): QPoint3d Static Creates a quantized point from the supplied Point3d using the specified params  
fromScalars(x: number, y: number, z: number, out?: QPoint3d): QPoint3d Static Creates a QPoint3d directly from x, y, and z components.  

Properties

Name Type Description
x Accessor number The quantized x component.  
y Accessor number The quantized y component.  
z Accessor number The quantized z component.  

Defined in

Last Updated: 16 April, 2024