Class TLsp3DTileLayerBuilder

java.lang.Object
com.luciad.view.lightspeed.layer.ALspLayerBuilder
com.luciad.format.tiled3d.lightspeed.TLsp3DTileLayerBuilder

public class TLsp3DTileLayerBuilder extends ALspLayerBuilder
Layer builder for models that contain 3D tile data, such as those decoded by TLcdOGC3DTilesModelDecoder or TLcdOSGBModelDecoder. The layers created by this builder will adaptively refine the 3D tile data to create a suitable level of detail for the user's current viewpoint.

3D tile layers support the following styles:

The default styler installed by this builder works for both meshes and point clouds, and will use the color attribute of the point cloud if one is present.

For OGC 3D Tiles data, only version 1.0 is supported.

Since:
2018.0
  • Method Details

    • newBuilder

      public static TLsp3DTileLayerBuilder newBuilder()
    • qualityFactor

      public TLsp3DTileLayerBuilder qualityFactor(double aFactor)

      Sets a quality factor that biases the level-of-detail selection of the 3D tile layer. You can use this setting to trade off between visual quality and performance.

      The default value of 1.0, for meshes and point cloud data produced by LuciadFusion, results in format-specific default behavior. Higher values increase the detail level, lower values decrease it.

      For point cloud data not produced by LuciadFusion, a default quality factor of 0.125 is used to safeguard against overestimation of the geometric error.

      Parameters:
      aFactor - the scale factor for the layer's level of detail. Values smaller than 1 will decrease the detail level. Values larger than 1 increase the detail level.
      Returns:
      this
    • offsetTerrain

      public TLsp3DTileLayerBuilder offsetTerrain(boolean aOffsetTerrain)
      Sets whether or not the terrain must be offset at the location of a 3D mesh or point cloud. This will prevent the terrain layer intersecting the 3D mesh or point cloud. By default this is enabled for meshes only. When set to true the offset is applied both for meshes and point clouds, when set to false the offset is never applied.
      Parameters:
      aOffsetTerrain -
      Returns:
      this
    • model

      public TLsp3DTileLayerBuilder model(ILcdModel aModel)
      Description copied from class: ALspLayerBuilder
      Sets the model of the layer.

      The default value is null.

      Overrides:
      model in class ALspLayerBuilder
      Parameters:
      aModel - a model
      Returns:
      this builder
      See Also:
    • label

      public TLsp3DTileLayerBuilder label(String aLabel)
      Description copied from class: ALspLayerBuilder
      Sets the label of the layer. This is a short textual representation for it, often used to represent the layer to end-users.

      The default value is null.

      Overrides:
      label in class ALspLayerBuilder
      Parameters:
      aLabel - the label
      Returns:
      this builder
      See Also:
    • icon

      public TLsp3DTileLayerBuilder icon(ILcdIcon aIcon)
      Description copied from class: ALspLayerBuilder
      Sets the icon of the layer.

      The default value is null.

      Overrides:
      icon in class ALspLayerBuilder
      Parameters:
      aIcon - the icon
      Returns:
      this builder
      See Also:
    • layerStyle

      public TLsp3DTileLayerBuilder layerStyle(TLspLayerStyle aLayerStyle)
      Description copied from class: ALspLayerBuilder
      Set a layer style to be used during the rendering of the layer. TLspLayerStyle is used to style the layer as a whole. Layer style can for example modify the transparency of a layer. Also, layer style can be modified after building the layer by calling ILspLayer.setLayerStyle(TLspLayerStyle).
      Overrides:
      layerStyle in class ALspLayerBuilder
      Parameters:
      aLayerStyle - the layer style. Must not be null. If you want to set the default layer style, set TLspLayerStyle.newBuilder().build()
      Returns:
      this
      See Also:
    • bodyStyler

      public TLsp3DTileLayerBuilder bodyStyler(TLspPaintState aPaintState, ILspStyler aBodyStyler)
    • bodyStyles

      public TLsp3DTileLayerBuilder bodyStyles(TLspPaintState aPaintState, ALspStyle... aBodyStyles)
    • synchronous

      public TLsp3DTileLayerBuilder synchronous(boolean aSynchronous)
      Specifies whether created layers should paint synchronously. The default is false and allows layers to perform shape discretization and other expensive processing using the view's ILspTaskExecutor. When synchronous mode is on, all such tasks are performed on the EDT.

      It is strongly recommended to leave this setting off, to ensure that the application remains responsive. Applications that need to change the view's world reference on a regular basis, however, may want to consider synchronous mode to avoid flickering.

      Parameters:
      aSynchronous - true if the layer should paint synchronously
      Returns:
      this
    • build

      public TLspLayer build()
      Description copied from class: ALspLayerBuilder

      Creates a new layer instance.

      Specified by:
      build in class ALspLayerBuilder
      Returns:
      the new layer instance