Class ProjectedImageryStyle.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
ProjectedImageryStyle
ProjectedImageryStyle.
The default style has an opacity of 1, a sky opacity of 1, a base opacity of 0, a projection target of ProjectedImageryTarget#AllSurfaces, no orientation offset, and a projection range left at its target-dependent default.
- Since:
- 2026.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbaseOpacity(double baseOpacity) Sets the opacity of the base layer used when projecting on the closest surface.build()Returns a new projected imagery style, based on the properties set on this builder.voidclose()protected voidfinalize()maxRange(double maxRange) Sets the maximum projection distance, in meters.opacity(double opacity) Sets the opacity of the projected imagery.orientationOffset(double yaw, double pitch, double roll) Sets an additional orientation offset, in degrees, applied on top of each projection's own orientation.projectionTarget(ProjectedImageryTarget projectionTarget) Sets theProjectedImageryTargetthat determines onto which surfaces the imagery is projected.skyOpacity(double skyOpacity) Sets the opacity of the sky, the part of the projection that does not hit any surface.
-
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 new projected imagery style, based on the properties set on this builder.- Returns:
- a new projected imagery style.
-
opacity
@NotNull public ProjectedImageryStyle.Builder opacity(double opacity) throws IllegalArgumentException Sets the opacity of the projected imagery.This parameter is optional. If not set, the default is 1.
- Parameters:
opacity- the alpha value. Must be in the range[0, 1](0 is fully transparent, 1 is fully opaque).- Returns:
- this builder.
- Throws:
IllegalArgumentException- when opacity < 0 or opacity > 1.
-
skyOpacity
@NotNull public ProjectedImageryStyle.Builder skyOpacity(double skyOpacity) throws IllegalArgumentException Sets the opacity of the sky, the part of the projection that does not hit any surface.This parameter is optional. If not set, the default is 1.
- Parameters:
skyOpacity- the sky alpha value. Must be in the range[0, 1].- Returns:
- this builder.
- Throws:
IllegalArgumentException- when skyOpacity < 0 or skyOpacity > 1.
-
projectionTarget
@NotNull public ProjectedImageryStyle.Builder projectionTarget(@NotNull ProjectedImageryTarget projectionTarget) Sets theProjectedImageryTargetthat determines onto which surfaces the imagery is projected.This parameter is optional. If not set, the default is
ProjectedImageryTarget#AllSurfaces.- Parameters:
projectionTarget- the projection target.- Returns:
- this builder.
-
baseOpacity
@NotNull public ProjectedImageryStyle.Builder baseOpacity(double baseOpacity) throws IllegalArgumentException Sets the opacity of the base layer used when projecting on the closest surface.When the
ProjectedImageryTargetisProjectedImageryTarget#ClosestSurface, the color of the closest projection in the line of sight (assumed to have the best view of that location) is drawn as a base layer, weighted by this opacity, and the selected projections in the line of sight are painted on top of it. This fills surfaces that the closest projection sees but that are occluded from the others. A value of 0 (the default) disables the base layer.This parameter is optional. It has no effect when the projection target is
ProjectedImageryTarget#AllSurfaces.- Parameters:
baseOpacity- the base layer alpha value. Must be in the range[0, 1].- Returns:
- this builder.
- Throws:
IllegalArgumentException- when baseOpacity < 0 or baseOpacity > 1.- See Also:
-
orientationOffset
@NotNull public ProjectedImageryStyle.Builder orientationOffset(double yaw, double pitch, double roll) Sets an additional orientation offset, in degrees, applied on top of each projection's own orientation.This parameter is optional. The default is no offset (0, 0, 0).
- Parameters:
yaw- the yaw offset, in degrees.pitch- the pitch offset, in degrees.roll- the roll offset, in degrees.- Returns:
- this builder.
-
maxRange
@NotNull public ProjectedImageryStyle.Builder maxRange(double maxRange) throws IllegalArgumentException Sets the maximum projection distance, in meters.This parameter is optional. The default is 0, which applies a target-dependent default range: 100 km when the projection target is
ProjectedImageryTarget#AllSurfacesand 1 km when it isProjectedImageryTarget#ClosestSurface.- Parameters:
maxRange- the maximum projection distance, in meters. Must be greater than or equal to 0.- Returns:
- this builder.
- Throws:
IllegalArgumentException- when maxRange < 0.
-