LuciadCPillar 2023.1.03
luciad::TileSet3DLayer::Builder Class Referencefinal

Builder for the luciad::TileSet3DLayer class. More...

#include <luciad/layers/tileset3d/TileSet3DLayer.h>

Public Member Functions

 Builder (Builder &&other) noexcept
 
 Builder (const Builder &other)
 
 ~Builder ()
 
Builderattributes (std::vector< std::string > attributes)
 List of attributes that can be used in the style expressions. More...
 
std::shared_ptr< TileSet3DLayerbuild () const
 Returns a layer, based on the properties set on this builder. More...
 
BuilderfadingTime (std::chrono::milliseconds time)
 The time tiles will take to fade in / out when changing their visibility If set to 0, fading of tiles is disabled. More...
 
BuildermeshStyle (MeshStyle meshStyle)
 Sets the style to use for mesh data. More...
 
Buildermodel (std::shared_ptr< ITileSet3DModel > model)
 Sets the 3D tiles model of the layer. More...
 
Builderoperator= (Builder other) noexcept
 
BuilderpointCloudStyle (PointCloudStyle pointCloudStyle)
 Sets the style to use for point cloud data. More...
 
BuilderqualityFactor (double qualityFactor)
 Sets the quality factor for the layer. More...
 
BuildertextureCompressionEnabled (bool enabled)
 Configure whether to use GPU-compressed textures or not for tiled mesh data. More...
 
Buildertitle (std::string title)
 Sets the title to use for the layer. More...
 
BuildertransparencyEnabled (bool enabled)
 Indicates whether transparent surfaces should be painted transparently. More...
 
Buildervisible (bool visible)
 Sets whether the layer should be visible initially. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ Builder() [1/2]

luciad::TileSet3DLayer::Builder::Builder ( const Builder other)

◆ Builder() [2/2]

luciad::TileSet3DLayer::Builder::Builder ( Builder &&  other)
noexcept

◆ ~Builder()

luciad::TileSet3DLayer::Builder::~Builder ( )

Member Function Documentation

◆ attributes()

Builder & luciad::TileSet3DLayer::Builder::attributes ( std::vector< std::string >  attributes)

List of attributes that can be used in the style expressions.

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
attributesa list of attributes that can be used
Returns
this builder

◆ build()

std::shared_ptr< TileSet3DLayer > luciad::TileSet3DLayer::Builder::build ( ) const

Returns a layer, based on the properties set on this builder.

Returns
a layer, based on the properties set on this builder.
Exceptions
luciad::LogicExceptionIf not all mandatory parameters are set.

◆ fadingTime()

Builder & luciad::TileSet3DLayer::Builder::fadingTime ( std::chrono::milliseconds  time)

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
timethe fading time in milliseconds.
Returns
this builder.

◆ meshStyle()

Builder & luciad::TileSet3DLayer::Builder::meshStyle ( MeshStyle  meshStyle)

Sets the style to use for mesh data.

Parameters
meshStylethe style to use
Returns
this builder

◆ model()

Builder & luciad::TileSet3DLayer::Builder::model ( std::shared_ptr< ITileSet3DModel model)

Sets the 3D tiles model of the layer.

Calling this function is mandatory.

Cannot be nullptr.

Parameters
modelthe 3D tiles model of the layer.
Returns
this builder.
Exceptions
luciad::NullArgumentExceptionwhen the model is nullptr.

◆ operator=()

Builder & luciad::TileSet3DLayer::Builder::operator= ( Builder  other)
noexcept

◆ pointCloudStyle()

Builder & luciad::TileSet3DLayer::Builder::pointCloudStyle ( PointCloudStyle  pointCloudStyle)

Sets the style to use for point cloud data.

Parameters
pointCloudStylethe style to use
Returns
this builder

◆ qualityFactor()

Builder & luciad::TileSet3DLayer::Builder::qualityFactor ( double  qualityFactor)

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
qualityFactorthe quality factor.
Returns
this builder.
Exceptions
InvalidArgumentExceptionif the factor is not strictly positive.

◆ textureCompressionEnabled()

Builder & luciad::TileSet3DLayer::Builder::textureCompressionEnabled ( bool  enabled)

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
enabledtrue to enable texture compression
Returns
this builder
Since
2022.1

◆ title()

Builder & luciad::TileSet3DLayer::Builder::title ( std::string  title)

Sets the title to use for the layer.

If not set, the title from the ModelMetadata is used.

Parameters
titlethe title for the layer.
Returns
this builder.

◆ transparencyEnabled()

Builder & luciad::TileSet3DLayer::Builder::transparencyEnabled ( bool  enabled)

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
enabledtrue to enable transparency
Returns
this builder

◆ visible()

Builder & luciad::TileSet3DLayer::Builder::visible ( bool  visible)

Sets whether the layer should be visible initially.

Default is true.

Parameters
visiblethe visibility.
Returns
this builder.