public static final class PointCloudStyle.Builder extends Object implements AutoCloseable
Constructor and Description |
---|
Builder(PointCloudStyle.Builder other) |
Modifier and Type | Method and Description |
---|---|
PointCloudStyle |
build()
Returns a newly created point cloud style, based on the properties set on this builder.
|
void |
close() |
PointCloudStyle.Builder |
colorExpression(StyleExpression<android.graphics.Color> colorExpression)
An expression to specify what colors to apply to point cloud's points.
|
PointCloudStyle.Builder |
displacementExpression(StyleExpression<Coordinate> displacementExpression)
An expression to displace point cloud data.
|
protected void |
finalize() |
PointCloudStyle.Builder |
minimumPointSizePixels(double minimumPointSizePixels)
Sets the minimum point size in pixel.
|
PointCloudStyle.Builder |
pointSizeAdaptive()
When this function is used, points get a size in function of the distance to the eye and the tile geometric error.
|
PointCloudStyle.Builder |
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.
|
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.
|
PointCloudStyle.Builder |
pointSizePixels(double pixelSize)
Sets the pixel size of the point cloud's points.
|
PointCloudStyle.Builder |
pointSizePixels(StyleExpression<Double> pixelSizeExpression)
The expression that determines the pixel size of the point cloud's points.
|
PointCloudStyle.Builder |
pointSizeWorld(double worldSize)
Sets the world size of the point cloud's points, typically meters.
|
PointCloudStyle.Builder |
pointSizeWorld(StyleExpression<Double> worldSizeExpression)
The expression that determines the world size of the point cloud's points, typically expressed in meters.
|
PointCloudStyle.Builder |
visibilityExpression(StyleExpression<Boolean> visibilityExpression)
An expression to filter the point cloud's points.
|
public Builder(@NotNull PointCloudStyle.Builder other)
public void close()
close
in interface AutoCloseable
@NotNull public PointCloudStyle build()
@NotNull public PointCloudStyle.Builder colorExpression(@NotNull StyleExpression<android.graphics.Color> colorExpression)
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.
colorExpression
- a color expression@NotNull public PointCloudStyle.Builder visibilityExpression(@NotNull StyleExpression<Boolean> visibilityExpression)
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.
visibilityExpression
- the visibility expression@NotNull public PointCloudStyle.Builder displacementExpression(@NotNull StyleExpression<Coordinate> displacementExpression)
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.
displacementExpression
- a coordinate expression@NotNull public PointCloudStyle.Builder pointSizePixels(@NotNull StyleExpression<Double> pixelSizeExpression)
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.
pixelSizeExpression
- the size expression@NotNull public PointCloudStyle.Builder pointSizePixels(double pixelSize)
This is a convenience method for pointSizePixels(StyleExpression<double>)
. It delegates to this method with a StyleExpressionFactory#constant
style expression.
pixelSize
- the size@NotNull public PointCloudStyle.Builder pointSizeWorld(@NotNull StyleExpression<Double> worldSizeExpression)
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.
worldSizeExpression
- the size expression@NotNull public PointCloudStyle.Builder pointSizeWorld(double worldSize)
This is a convenience method for pointSizeWorld(StyleExpression<double>)
. It delegates to this method with a StyleExpressionFactory#constant
style expression.
worldSize
- the size@NotNull public PointCloudStyle.Builder pointSizeAdaptive(@NotNull StyleExpression<Double> scaleExpression)
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.
scaleExpression
- an additional scale factor on top op the point size that is chosen by the point cloud renderer.@NotNull public PointCloudStyle.Builder pointSizeAdaptive(double scale)
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.
scale
- an additional scale factor on top op the point size that is chosen by the point cloud renderer.@NotNull public PointCloudStyle.Builder pointSizeAdaptive()
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.
@NotNull public PointCloudStyle.Builder minimumPointSizePixels(double minimumPointSizePixels)
The default is 1.0.
minimumPointSizePixels
- the minimum point size in pixel.