Class PointCloudStyle.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
PointCloudStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Returns a newly created point cloud style, based on the properties set on this builder.void
close()
colorExpression
(StyleExpression<android.graphics.Color> colorExpression) An expression to specify what colors to apply to point cloud's points.displacementExpression
(StyleExpression<Coordinate> displacementExpression) An expression to displace point cloud data.protected void
finalize()
minimumPointSizePixels
(double minimumPointSizePixels) Sets the minimum point size in pixel.When this function is used, points get a size in function of the distance to the eye and the tile geometric error.pointSizeAdaptive
(double scale) When this function is used, points get a size in function of the distance to the eye and the tile geometric error.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.pointSizePixels
(double pixelSize) Sets the pixel size of the point cloud's points.pointSizePixels
(StyleExpression<Double> pixelSizeExpression) The expression that determines the pixel size of the point cloud's points.pointSizeWorld
(double worldSize) Sets the world size of the point cloud's points, typically meters.pointSizeWorld
(StyleExpression<Double> worldSizeExpression) The expression that determines the world size of the point cloud's points, typically expressed in meters.visibilityExpression
(StyleExpression<Boolean> visibilityExpression) An expression to filter the point cloud's points.
-
Constructor Details
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
build
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
@NotNull public PointCloudStyle.Builder colorExpression(@NotNull StyleExpression<android.graphics.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:
colorExpression
- a color expression- Returns:
- this builder
-
visibilityExpression
@NotNull public PointCloudStyle.Builder visibilityExpression(@NotNull StyleExpression<Boolean> 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:
visibilityExpression
- the visibility expression- Returns:
- this builder
-
displacementExpression
@NotNull public PointCloudStyle.Builder displacementExpression(@NotNull 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:
displacementExpression
- a coordinate expression- Returns:
- this builder
-
pointSizePixels
@NotNull public PointCloudStyle.Builder pointSizePixels(@NotNull 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:
pixelSizeExpression
- the size expression- Returns:
- this builder
-
pointSizePixels
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 aStyleExpressionFactory#constant
style expression.- Parameters:
pixelSize
- the size- Returns:
- this builder.
-
pointSizeWorld
@NotNull public PointCloudStyle.Builder pointSizeWorld(@NotNull 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:
worldSizeExpression
- the size expression- Returns:
- this builder
-
pointSizeWorld
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 aStyleExpressionFactory#constant
style expression.- Parameters:
worldSize
- the size- Returns:
- this builder.
-
pointSizeAdaptive
@NotNull public PointCloudStyle.Builder pointSizeAdaptive(@NotNull 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 andHexagon Smart Point Clouds (HSPC)
point clouds.Note that the points will have a maximum size that is platform-dependent, usually around 60 pixels.
- Parameters:
scaleExpression
- an additional scale factor on top op the point size that is chosen by the point cloud renderer.- Returns:
- this builder
-
pointSizeAdaptive
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 aStyleExpressionFactory#constant
style expression.- Parameters:
scale
- an additional scale factor on top op the point size that is chosen by the point cloud renderer.- Returns:
- this builder
-
pointSizeAdaptive
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 aStyleExpressionFactory#constant
style expression.- Returns:
- this builder
-
minimumPointSizePixels
Sets the minimum point size in pixel.The default is 1.0.
- Parameters:
minimumPointSizePixels
- the minimum point size in pixel.- Returns:
- this builder
-