Class GaussianSplatsStyle.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
GaussianSplatsStyle
- Since:
- 2026.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newly created Gaussian splats style, based on the properties set on this builder.voidclose()colorExpression(StyleExpression<android.graphics.Color> color) An expression to specify what colors to apply to the splats.displacementExpression(StyleExpression<Coordinate> displacement) An expression to displace the splats.enableDepth(boolean enableDepth) Indicates whether the depth of the splats should be available for use.protected voidfinalize()highPrecisionColors(boolean highPrecisionColors) Indicates whether the color rendering should use higher precision to improve the visual quality.opacityCutoff(double opacityCutoff) Splat parts with an opacity less than the opacityCutoff are discarded.resolutionScale(double resolutionScale) A factor between 0.5 and 1 to scale down the resolution of the splats.scaleExpression(StyleExpression<Double> scale) An expression to scale the size of the splats.visibilityExpression(StyleExpression<Boolean> visibility) An expression to filter the splats.
-
Constructor Details
-
Builder
Copy constructor.- Parameters:
other- the builder to copy.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
build
Returns a newly created Gaussian splats style, based on the properties set on this builder.- Returns:
- a newly created Gaussian splats style, based on the properties set on this builder.
-
colorExpression
@NotNull public GaussianSplatsStyle.Builder colorExpression(@NotNull StyleExpression<android.graphics.Color> color) An expression to specify what colors to apply to the splats.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 often, consider using
parametersin your expression. Changing the values of parameters is more efficient than replacing the whole expression.By default, no color expression is set, and the splats use their own colors.
- Parameters:
color- a color expression- Returns:
- this builder
-
visibilityExpression
@NotNull public GaussianSplatsStyle.Builder visibilityExpression(@NotNull StyleExpression<Boolean> visibility) An expression to filter the splats.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 often, consider using
parametersin your expression. Changing the values of parameters is more efficient than replacing the whole expression.By default, all splats are visible.
- Parameters:
visibility- a boolean expression- Returns:
- this builder
-
scaleExpression
An expression to scale the size of the splats.To create expressions, you must use the factory methods on
StyleExpressionFactory. The expression must be well-formed and resolve to a double value, which is applied as a multiplier on the size of each splat.If you want to update the styling often, consider using
parametersin your expression. Changing the values of parameters is more efficient than replacing the whole expression.By default, the splats are not scaled (a constant factor of 1.0).
- Parameters:
scale- a double expression- Returns:
- this builder
-
displacementExpression
@NotNull public GaussianSplatsStyle.Builder displacementExpression(@NotNull StyleExpression<Coordinate> displacement) An expression to displace the splats.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 often, consider using
parametersin your expression. Changing the values of parameters is more efficient than replacing the whole expression.By default, the splats are not displaced.
- Parameters:
displacement- a coordinate expression- Returns:
- this builder
-
opacityCutoff
@NotNull public GaussianSplatsStyle.Builder opacityCutoff(double opacityCutoff) throws IllegalArgumentException Splat parts with an opacity less than the opacityCutoff are discarded.The opacity cutoff is a value between 0 and 1, with values typically below 0.1. Increasing this value results in harsher edges around each splat. As a result, visualization performance may improve significantly, at the cost of visual quality.
- Parameters:
opacityCutoff- the opacity cutoff- Returns:
- this builder
- Throws:
IllegalArgumentException- when opacityCutoff < 0 or opacityCutoff > 1.
-
enableDepth
Indicates whether the depth of the splats should be available for use.With depth enabled, the splats are taken into account when querying the depth at a pixel (see
Map.ViewMapTransformation#viewToMap) and they can occlude other data such as meshes, point clouds and features. With depth disabled, it is recommended to keep the Gaussian splats at the top of the layer list.Depth is enabled by default. However, you may choose to disable it to increase rendering performance.
- Parameters:
enableDepth- whether the depth should be available for use- Returns:
- this builder
-
highPrecisionColors
Indicates whether the color rendering should use higher precision to improve the visual quality.Typically, some minor noise may appear in the image when this setting is disabled. Since this may lower performance, it is disabled by default.
- Parameters:
highPrecisionColors- whether high precision colors are enabled- Returns:
- this builder
-
resolutionScale
@NotNull public GaussianSplatsStyle.Builder resolutionScale(double resolutionScale) throws IllegalArgumentException A factor between 0.5 and 1 to scale down the resolution of the splats.Lower values result in a lower resolution, and thus fuzzier splats.
For example, if the viewport has a resolution of 1920x1080 and the resolutionScale is set to 0.75, then the splats will only be rendered at an internal resolution of 1440x810, and finally upscaled back to 1920x1080.
This improves performance, at the cost of visual fidelity.
- Parameters:
resolutionScale- the resolution scale factor, between 0.5 and 1- Returns:
- this builder
- Throws:
IllegalArgumentException- when resolutionScale < 0.5 or resolutionScale > 1.
-