LuciadCPillar 2023.1.04
luciad::PointCloudStyle::Builder Class Referencefinal

A builder class for creating point cloud styles. More...

#include <luciad/layers/styles/PointCloudStyle.h>

Public Member Functions

 Builder (const Builder &other)
 
 ~Builder ()
 
PointCloudStyle build () const
 Returns a newly created point cloud style, based on the properties set on this builder. More...
 
BuildercolorExpression (StyleExpression< Color > colorExpression)
 An expression to specify what colors to apply to point cloud's points. More...
 
BuilderdisplacementExpression (StyleExpression< Coordinate > displacementExpression)
 An expression to displace point cloud data. More...
 
BuilderminimumPointSizePixels (double minimumPointSizePixels)
 Sets the minimum point size in pixel. More...
 
BuilderpointSizeAdaptive (double scale=1.0)
 When this function is used, points get a size in function of the distance to the eye and the tile geometric error. More...
 
BuilderpointSizeAdaptive (StyleExpression< double > scaleExpression)
 When this function is used, points get a size in function of the distance to the eye and the tile geometric error. More...
 
BuilderpointSizePixels (double pixelSize)
 Sets the pixel size of the point cloud's points. More...
 
BuilderpointSizePixels (StyleExpression< double > pixelSizeExpression)
 The expression that determines the pixel size of the point cloud's points. More...
 
BuilderpointSizeWorld (double worldSize)
 Sets the world size of the point cloud's points, typically meters. More...
 
BuilderpointSizeWorld (StyleExpression< double > worldSizeExpression)
 The expression that determines the world size of the point cloud's points, typically expressed in meters. More...
 
BuildervisibilityExpression (StyleExpression< bool > visibilityExpression)
 An expression to filter the point cloud's points. More...
 

Detailed Description

A builder class for creating point cloud styles.

Constructor & Destructor Documentation

◆ Builder()

luciad::PointCloudStyle::Builder::Builder ( const Builder other)

◆ ~Builder()

luciad::PointCloudStyle::Builder::~Builder ( )

Member Function Documentation

◆ build()

PointCloudStyle luciad::PointCloudStyle::Builder::build ( ) const

Returns a newly created point cloud style, based on the properties set on this builder.

Returns
a newly created point cloud style, based on the properties set on this builder.

◆ colorExpression()

Builder & luciad::PointCloudStyle::Builder::colorExpression ( StyleExpression< Color colorExpression)

An expression to specify what colors to apply to point cloud's points.

To create expressions, you must use the factory methods on StyleExpressionFactory. 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 expression. Changing the values of parameters is more efficient than replacing the whole expression.

Note that the alpha component of the color is ignored so the color will be fully opaque, unless you enable transparency.

The default is a uniform, grey color.

Parameters
colorExpressiona color expression
Returns
this builder

◆ displacementExpression()

Builder & luciad::PointCloudStyle::Builder::displacementExpression ( StyleExpression< Coordinate displacementExpression)

An expression to displace point cloud data.

To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a coordinate value. This coordinate is interpreted as a displacement vector during painting.

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.

By default, point clouds are not displaced.

Parameters
displacementExpressiona coordinate expression
Returns
this builder

◆ minimumPointSizePixels()

Builder & luciad::PointCloudStyle::Builder::minimumPointSizePixels ( double  minimumPointSizePixels)

Sets the minimum point size in pixel.

The default is 1.0.

Parameters
minimumPointSizePixelsthe minimum point size in pixel.
Returns
this builder

◆ pointSizeAdaptive() [1/2]

Builder & luciad::PointCloudStyle::Builder::pointSizeAdaptive ( double  scale = 1.0)

When this function is used, points get a size in function of the distance to the eye and the tile geometric error.

The points are given a world size adapted to the local density of the point cloud. This creates, to the largest extent possible, a visually continuous and opaque coverage.

This is a convenience method for pointSizeAdaptive(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory::constant style expression.

Parameters
scalean additional scale factor on top op the point size that is chosen by the point cloud renderer.
Returns
this builder

◆ pointSizeAdaptive() [2/2]

Builder & luciad::PointCloudStyle::Builder::pointSizeAdaptive ( StyleExpression< double >  scaleExpression)

When this function is used, points get a size in function of the distance to the eye and the tile geometric error.

The points are given a world size adapted to the local density of the point cloud. This creates, to the largest extent possible, a visually continuous and opaque coverage.

To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a double value.

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

This is the preferred point size mode for LuciadFusion OGC 3D Tiles point clouds and Hexagon Smart Point Clouds (HSPC) point clouds.

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

Parameters
scaleExpressionan additional scale factor on top op the point size that is chosen by the point cloud renderer.
Returns
this builder

◆ pointSizePixels() [1/2]

Builder & luciad::PointCloudStyle::Builder::pointSizePixels ( double  pixelSize)

Sets the pixel size of the point cloud's points.

This is a convenience method for pointSizePixels(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory::constant style expression.

Parameters
pixelSizethe size
Returns
this builder.

◆ pointSizePixels() [2/2]

Builder & luciad::PointCloudStyle::Builder::pointSizePixels ( StyleExpression< double >  pixelSizeExpression)

The expression that determines the pixel size of the point cloud's points.

To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a double value.

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

The default is a size of 1 pixels.

Parameters
pixelSizeExpressionthe size expression
Returns
this builder

◆ pointSizeWorld() [1/2]

Builder & luciad::PointCloudStyle::Builder::pointSizeWorld ( double  worldSize)

Sets the world size of the point cloud's points, typically meters.

This is a convenience method for pointSizeWorld(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory::constant style expression.

Parameters
worldSizethe size
Returns
this builder.

◆ pointSizeWorld() [2/2]

Builder & luciad::PointCloudStyle::Builder::pointSizeWorld ( StyleExpression< double >  worldSizeExpression)

The expression that determines the world size of the point cloud's points, typically expressed in meters.

To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a double value.

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

The default is a size of 1 meter.

Parameters
worldSizeExpressionthe size expression
Returns
this builder

◆ visibilityExpression()

Builder & luciad::PointCloudStyle::Builder::visibilityExpression ( StyleExpression< bool >  visibilityExpression)

An expression to filter the point cloud's points.

To create expressions, you must use the factory methods on StyleExpressionFactory. 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 expression. Changing the values of parameters is more efficient than replacing the whole expression.

By default, all points are visible.

Parameters
visibilityExpressionthe visibility expression
Returns
this builder