Class ALspSoftDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>>

All Implemented Interfaces:
ILspWorldElevationStyle.Builder
Direct Known Subclasses:
TLspDensityLineStyle.Builder, TLspDensityPointStyle.Builder
Enclosing class:
ALspSoftDensityStyle

public abstract static class ALspSoftDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>> extends ALspDensityStyle.Builder<B>
Builder used to create soft density styles.

The builder by default constructs a density style with hardness 1.0 and single pixel width that is not draped on terrain.

Example usages:

To create a density style with hardness 1.0 and single pixel width for a shape that is not draped:
ALspSoftDensityStyle hardSinglePixel = ALspSoftDensityStyle.newBuilder().build();

To create a density style for a shape that is draped with hardness 0.5 and a width of 3 pixels:
ALspSoftDensityStyle smooth3pix = ALspSoftDensityStyle.newBuilder().pixelSize(3.0f).hardness(0.5f).draped(true).build();

To create a draped density style with world size 3000.0:
ALspSoftDensityStyle worldSized = ALspSoftDensityStyle.newBuilder().worldSize(3000.0f).build();

Since:
2012.0
  • Method Details

    • all

      public B all(ALspStyle aStyle)
      Description copied from class: ALspStyle.Builder
      Sets all parameters on the builder based on the given style.

      This is useful for example to create a new style that has almost all properties equal to another style.

      Overrides:
      all in class ALspDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>>
      Parameters:
      aStyle - the style to copy
      Returns:
      this
    • hardness

      public B hardness(double aHardness)

      Sets the hardness of the density style.

      Consult the class javadoc of ALspDensityStyle for more information.

      Parameters:
      aHardness - the hardness of the density style
      Returns:
      this
    • worldSize

      public B worldSize(double aWorldSize)

      Sets the width of the density style to build in world size.

      Consult the class javadoc of ALspDensityStyle for more information.

      Parameters:
      aWorldSize - the width in world size
      Returns:
      this
    • pixelSize

      public B pixelSize(double aPixelSize)

      Sets the width of the density style to build in pixel size.

      Consult the class javadoc of ALspDensityStyle for more information.

      Parameters:
      aPixelSize - the width in pixels
      Returns:
      this
    • build

      public abstract ALspSoftDensityStyle build()
      Description copied from class: ALspStyle.Builder
      Builds the style with the set parameters.
      Specified by:
      build in class ALspDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>>
      Returns:
      the resulting style