Class TileSet3DLayer.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
TileSet3DLayer
Builder for the TileSet3DLayer class.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattributes(List<@NotNull String> attributes) List of attributes that can be used in the styleexpressions.build()Returns a layer, based on the properties set on this builder.voidclose()fadingTime(Duration time) The time tiles will take to fade in / out when changing their visibility If set to 0, fading of tiles is disabled.protected voidfinalize()gaussianSplatsStyle(GaussianSplatsStyle gaussianSplatsStyle) Sets the style to use for Gaussian splats.Sets the style to use for mesh data.model(ITileSet3DModel model) Sets the 3D tiles model of the layer.pointCloudStyle(PointCloudStyle pointCloudStyle) Sets the style to use for point cloud data.qualityFactor(double qualityFactor) Sets the quality factor for the layer.textureCompressionEnabled(boolean enabled) Configure whether to use GPU-compressed textures or not for tiled mesh data.Sets the title to use for the layer.transformation(Matrix4x4 transformation) Set an additional transformation to be applied to the tileset.transparencyEnabled(boolean enabled) Indicates whether transparent surfaces should be painted transparently.visible(boolean visible) Sets whether the layer should be visible initially.
-
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 layer, based on the properties set on this builder.- Returns:
- a layer, based on the properties set on this builder.
- Throws:
IllegalStateException- If not all mandatory parameters are set.
-
title
Sets the title to use for the layer.If not set, the title from the
ModelMetadatais used.- Parameters:
title- the title for the layer.- Returns:
- this builder.
-
visible
Sets whether the layer should be visible initially.Default is
true.- Parameters:
visible- the visibility.- Returns:
- this builder.
-
model
@NotNull public TileSet3DLayer.Builder model(@Nullable ITileSet3DModel model) throws NullPointerException, IllegalArgumentException Sets the 3D tiles model of the layer.Calling this function is mandatory.
Cannot be
null.This model must be georeferenced. This means that it must either have a
non-Cartesianreference, or have a non-nullgeolocation.- Parameters:
model- the 3D tiles model of the layer.- Returns:
- this builder.
- Throws:
NullPointerException- when the model isnull.IllegalArgumentException- when the model is not georeferenced.
-
qualityFactor
@NotNull public TileSet3DLayer.Builder qualityFactor(double qualityFactor) throws IllegalArgumentException Sets the quality factor for the layer.It is used to decide if a given tile should be displayed at certain scales. Must be a non-zero, positive value. Higher values load more tiles. The default value is 1.0.
- Parameters:
qualityFactor- the quality factor.- Returns:
- this builder.
- Throws:
IllegalArgumentException- if the factor is not strictly positive.
-
fadingTime
The time tiles will take to fade in / out when changing their visibility If set to 0, fading of tiles is disabled.They appear as soon as they are available. The longer it is, the longer tiles will be going from fully transparent to fully visible. Default value is 200. Maximum value is 86400000 (i.e. a day).
- Parameters:
time- the fading time in milliseconds.- Returns:
- this builder.
-
pointCloudStyle
Sets the style to use for point cloud data.- Parameters:
pointCloudStyle- the style to use- Returns:
- this builder
-
meshStyle
Sets the style to use for mesh data.- Parameters:
meshStyle- the style to use- Returns:
- this builder
-
gaussianSplatsStyle
@NotNull public TileSet3DLayer.Builder gaussianSplatsStyle(@NotNull GaussianSplatsStyle gaussianSplatsStyle) Sets the style to use for Gaussian splats.- Parameters:
gaussianSplatsStyle- the style to use- Returns:
- this builder
- Since:
- 2026.1
-
transparencyEnabled
Indicates whether transparent surfaces should be painted transparently.Enable this if you know your data has transparency, and you want to see it. The transparency can originate from transparent pixels in an rgba texture, transparent colors in a vertex attribute, or transparent colors from a colorExpression.
Note that this can have a significant performance impact, and as such it is disabled by default. When disabled, transparent surfaces will just be opaque.
- Parameters:
enabled- true to enable transparency- Returns:
- this builder
-
textureCompressionEnabled
Configure whether to use GPU-compressed textures or not for tiled mesh data.This can greatly reduce the amount of GPU memory needed and improve performance and stability, and is enabled by default. Enable this if you want to save resources displaying meshes with large textures. Disable when displaying meshes with lookup textures, such as CAD models.
If your environment does not support GPU texture compression, this flag has no effect.
- Parameters:
enabled- true to enable texture compression- Returns:
- this builder
-
attributes
List of attributes that can be used in the styleexpressions.These attributes must be present in the source data set.
You can discover which attributes you can use in the documentation of the model decoder of the format that is used. For example:
- Parameters:
attributes- a list of attributes that can be used- Returns:
- this builder
-
transformation
@NotNull public TileSet3DLayer.Builder transformation(@NotNull Matrix4x4 transformation) throws IllegalArgumentException Set an additional transformation to be applied to the tileset.This can be used to translate, rotate, and/or scale the tileset as a whole. You can chain transformations together by multiplying their matrices right-to-left. This transformation is applied in world space, meaning in
the reference of the map.By default, this is the identity matrix, meaning that no additional transformation is applied.
- Parameters:
transformation- the transformation- Returns:
- this builder
- Throws:
IllegalArgumentException- if the matrix is not a valid affine transformation- Since:
- 2026.1
-