Class PointCloudStyle.Builder

java.lang.Object
com.luciad.layers.styles.PointCloudStyle.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
PointCloudStyle

public static final class PointCloudStyle.Builder extends Object implements AutoCloseable
A builder class for creating point cloud styles.
  • Constructor Details Link icon

  • Method Details Link icon

    • finalize Link icon

      protected void finalize()
      Overrides:
      finalize in class Object
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • build Link icon

      @NotNull public PointCloudStyle build()
      Returns a newly created point cloud style, based on the properties set on this builder.
      Returns:
      a newly created point cloud style, based on the properties set on this builder.
    • colorExpression Link icon

      @NotNull public PointCloudStyle.Builder colorExpression(@NotNull StyleExpression<android.graphics.Color> colorExpression)
      An expression to specify what colors to apply to point cloud's points.

      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 very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

      Note that the alpha component of the color is ignored so the color will be fully opaque, unless you enable transparency.

      The default is a uniform, grey color.

      Parameters:
      colorExpression - a color expression
      Returns:
      this builder
    • visibilityExpression Link icon

      @NotNull public PointCloudStyle.Builder visibilityExpression(@NotNull StyleExpression<Boolean> visibilityExpression)
      An expression to filter the point cloud's points.

      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 very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

      By default, all points are visible.

      Parameters:
      visibilityExpression - the visibility expression
      Returns:
      this builder
    • displacementExpression Link icon

      @NotNull public PointCloudStyle.Builder displacementExpression(@NotNull StyleExpression<Coordinate> displacementExpression)
      An expression to displace point cloud data.

      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 very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

      By default, point clouds are not displaced.

      Parameters:
      displacementExpression - a coordinate expression
      Returns:
      this builder
    • pointSizePixels Link icon

      @NotNull public PointCloudStyle.Builder pointSizePixels(@NotNull StyleExpression<Double> pixelSizeExpression)
      The expression that determines the pixel size of the point cloud's points.

      To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a double value.

      If you want to update the styling very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

      The default is a size of 1 pixels.

      Parameters:
      pixelSizeExpression - the size expression
      Returns:
      this builder
    • pointSizePixels Link icon

      @NotNull public PointCloudStyle.Builder pointSizePixels(double pixelSize)
      Sets the pixel size of the point cloud's points.

      This is a convenience method for pointSizePixels(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory#constant style expression.

      Parameters:
      pixelSize - the size
      Returns:
      this builder.
    • pointSizeWorld Link icon

      @NotNull public PointCloudStyle.Builder pointSizeWorld(@NotNull StyleExpression<Double> worldSizeExpression)
      The expression that determines the world size of the point cloud's points, typically expressed in meters.

      To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a double value.

      If you want to update the styling very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

      The default is a size of 1 meter.

      Parameters:
      worldSizeExpression - the size expression
      Returns:
      this builder
    • pointSizeWorld Link icon

      @NotNull public PointCloudStyle.Builder pointSizeWorld(double worldSize)
      Sets the world size of the point cloud's points, typically meters.

      This is a convenience method for pointSizeWorld(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory#constant style expression.

      Parameters:
      worldSize - the size
      Returns:
      this builder.
    • pointSizeAdaptive Link icon

      @NotNull public PointCloudStyle.Builder pointSizeAdaptive(@NotNull StyleExpression<Double> scaleExpression)
      When this function is used, points get a size in function of the distance to the eye and the tile geometric error.

      The points are given a world size adapted to the local density of the point cloud. This creates, to the largest extent possible, a visually continuous and opaque coverage.

      To create expressions, you must use the factory methods on StyleExpressionFactory. The expression must be well-formed and resolve to a double value.

      If you want to update the styling very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

      This is the preferred point size mode for LuciadFusion OGC 3D Tiles point clouds and Hexagon Smart Point Clouds (HSPC) point clouds.

      Note that the points will have a maximum size that is platform-dependent, usually around 60 pixels.

      Parameters:
      scaleExpression - an additional scale factor on top op the point size that is chosen by the point cloud renderer.
      Returns:
      this builder
    • pointSizeAdaptive Link icon

      @NotNull public PointCloudStyle.Builder pointSizeAdaptive(double scale)
      When this function is used, points get a size in function of the distance to the eye and the tile geometric error.

      The points are given a world size adapted to the local density of the point cloud. This creates, to the largest extent possible, a visually continuous and opaque coverage.

      This is a convenience method for pointSizeAdaptive(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory#constant style expression.

      Parameters:
      scale - an additional scale factor on top op the point size that is chosen by the point cloud renderer.
      Returns:
      this builder
    • pointSizeAdaptive Link icon

      @NotNull public PointCloudStyle.Builder pointSizeAdaptive()
      When this function is used, points get a size in function of the distance to the eye and the tile geometric error.

      The points are given a world size adapted to the local density of the point cloud. This creates, to the largest extent possible, a visually continuous and opaque coverage.

      This is a convenience method for pointSizeAdaptive(StyleExpression<double>). It delegates to this method with a StyleExpressionFactory#constant style expression.

      Returns:
      this builder
    • minimumPointSizePixels Link icon

      @NotNull public PointCloudStyle.Builder minimumPointSizePixels(double minimumPointSizePixels)
      Sets the minimum point size in pixel.

      The default is 1.0.

      Parameters:
      minimumPointSizePixels - the minimum point size in pixel.
      Returns:
      this builder