This is the general interface that describes a PointCloud style object.

The PointCloud style object defines styling expressions used by TileSet3DLayer layer to style PointCloud data. All properties are optional.

Since

2018.0

Hierarchy

  • PointCloudStyle

Properties

colorExpression?: null | Expression<string>

An expression to specify what colors to apply to PointClouds points.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a color value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

Note that alpha component in color is ignored, color will be fully opaque.

Default

<code>null</code> If not set, points use colors as defined in the PointCloud data.
displacementExpression?: null | Expression<Vector3>

An expression to displace points.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a point value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

  // Example of a displacement expression that pushes down everything inside a shape.
var _ = ExpressionFactory;
var shape = _.orientedBox(layer.orientedBox);
meshStyle.displacementExpression = _.pushDown(shape);

Default

null points are not displaced by default.

Since

2022.0

gapFill?: number

Enable a graphical post-processing effect to intelligently fill or "in-paint" small holes or gaps between your points.

This helps creating a visually closed surface. It works best if you already have high-density point cloud: you can use a small point size to retain visual detail and reduce overlap, but still avoid see-through effects.

The effect works well for 1, 2 or 3 pixels. You can go higher, but depending on your dataset the quality can degrade.

The effect generally has only a little overhead and impact on performance.

The default is 0, disabled.

Since

2022.0

This option influences how points are drawn, specifically when they overlap.

  • When using DISC, overlap can result in a more pixelated, low-resolution display even if you have high point density.
  • When using SPHERE, overlap results in a high quality visual coverage of your data, but at the cost of performance.

The visual effect is most noticeable if you have large points (> 4 pixels) and a high point density. When you have small points (< 5 pixels), we recommend to use DISC.

The default is DISC for HSPC, SPHERE for OGC 3D Tiles.

Since

2022.0

pointSize?: null | {
    mode: PIXEL_SIZE;
    pixelSize?: number;
} | {
    minimumPixelSize?: number;
    mode: WORLD_SIZE;
    worldSize: number;
} | {
    minimumPixelSize?: number;
    mode: ADAPTIVE_WORLD_SIZE;
    worldScale?: number;
}

Specify the point cloud dot size.

Choose one of the following modes:

    PIXEL_SIZE: the dots have a fixed size in pixels, specified by pixelSize. The default is 3 pixels.
    WORLD_SIZE: the dots have a fixed size in meters, specified by worldSize. Additionally, you can specify a minimumPixelSize, so your points are never too small.
    ADAPTIVE_WORLD_SIZE: the dots have size in meters, computed from the tile's density. Additionally, you can specify a minimumPixelSize, so your points are never too small. You can tune the computed world size with the worldScale parameter. This is the preferred mode for LuciadFusion OGC 3D Tiles point clouds as well as HSPC point clouds.

Any scaleExpression is applied on top of the base size given here.

Note that the points will have a maximum size that is platform-dependent, usually around 60 pixels.

Type declaration

Type declaration

  • Optional minimumPixelSize?: number
  • mode: WORLD_SIZE
  • worldSize: number

Type declaration

Since

2022.0

scaleExpression?: null | Expression<number>

The expression that determines the scale factor to apply to PointClouds points.

  • Scale 1 corresponds to the default size of the point that is calculated based on the pointSize value.
  • Scale is smaller than 1 will shrink the point size.
  • Scale is greater than 1 will enlarge the point size.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a number value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

Default

1 If not set. The point size is not rescaled by the expression.
scalingMode?: null | ScalingMode

The scaling mode identifies the way point cloud data points are scaled for visualization. Note: The initial point size, that is calculated based on the scaling mode, is additionally modified by the results of the scaleExpression. The scale expression is used as a multiplier on top of internal point size of 3.

Default

ScalingMode.ADAPTIVE_WORLD_SIZE By default OGC 3D Tiles are scaled using {@link ScalingMode.PIXEL_SIZE}.

Deprecated

Use pointSize instead.

visibilityExpression?: null | Expression<boolean>

An expression to filter PointClouds points.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a boolean value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

Default

true PointCloud points are visible by default.