interface.RenderStatePointCloud
API > RenderStatePointCloud
Interface: RenderStatePointCloud
Point cloud related render state.
Remarks
The sizes are cumulative and computed as follows:
effective_point_pixel_size = max(1, pixelSize + projectedSizeOf(metricSize + tolerance * toleranceFactor))
.
Metric size is projected as a 3D sphere at the point origo to deterine pixel size.
The term pixel refers to the size of a pixel in the target canvas element, which resolution may differ from that of the render buffer.
Properties
deviation
readonly
deviation:object
Point deviation state.
Remarks
Deviation is pre-computed for some point clouds as a signed, linear distance from the point to some reference/baseline geometry. This is useful to visualize as-built deviances, e.g. in tunnel projects, and whether they are within tolerance and not. Several channels of deviation may be computed.
This state will not have any effect on geometry that does not have pre-computed deviance data baked into it.
Type declaration
deviation.colorGradient
readonly
colorGradient:RenderStateColorGradient
\<RGBA
>Color gradient to use for visualizing deviation and tolerances.
Remarks
May define different gradients for negative and positive numbers.
deviation.index
readonly
index:number
Index of deviation channel (0-3).
Remarks
This index specifies which deviation channel to currently render on screen and into pick buffers.
deviation.mixFactor
readonly
mixFactor:number
Mix factor [0.0, 1.0], where 0 is 100% original vertex color and 1 is 100% color gradient color
deviation.undefinedColor
undefinedColor?:
RGBA
The color of undefined points
deviation.visibleRangeEnd
readonly
visibleRangeEnd:number
Points with deviation above this value are hidden.
Default
Number.MAX_SAFE_INTEGER
deviation.visibleRangeStart
readonly
visibleRangeStart:number
Points with deviation below this value are hidden.
Default
Number.MIN_SAFE_INTEGER
Source
@novorender/core3d/state/index.ts:417
size
readonly
size:object
Point size state.
Type declaration
size.maxPixel
readonly
maxPixel:undefined
|number
Max point size in pixels.
size.metric
readonly
metric:undefined
|number
Point size in meters.
size.pixel
readonly
pixel:undefined
|number
Point size in pixels.
size.toleranceFactor
readonly
toleranceFactor:number
The scaling factor for applying the tolerance of the current level of detail to point size.
Remarks
Different levels of detail (LOD) will have different point densities. Taking this difference into account may result in a more uniform point coverage and visually pleasing result. The tolerance of each LOD reflects the point merging distance threshold in meters used to reduce # points, or 0 for the original level of detail.
Source
@novorender/core3d/state/index.ts:390
useProjectedPosition
readonly
useProjectedPosition:boolean
Use pre-computed projected point cloud positions instead of original.
Remarks
This is currently used to render an unwrapped 2D variant of tunnels.