Class TLspPlotStyle

java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle
com.luciad.view.lightspeed.style.TLspPlotStyle
All Implemented Interfaces:
ILspWorldElevationStyle, ILspStyler
Direct Known Subclasses:
TLspPlotStyle

public class TLspPlotStyle extends ALspStyle implements ILspWorldElevationStyle
This style represents a set of properties for point objects that can be controlled through expressions.

Construction of this style is done through its TLspPlotStyle.Builder.

This style can currently be used only in combination with a TLspPlotLayerBuilder.

Each property is calculated by an expression:

  • Visibility: determines whether the object is displayed or not
  • Icon: determines the icon to display
  • Scale: a scale factor applied to the icon
  • Color: a modulation color applied to the icon
  • Opacity: additional transparency applied to the icon
Additionally, you can enable other behavior:
  • Orientation: whether the icons should be rotated to match the orientation of the domain object, or be aligned with the screen.
  • Automatic scaling: varies the size of icons depending on the view's zoom level. This is strongly recommended for performance reasons. See TLspPlotStyle.Builder.automaticScaling(double) for details.
  • Eye-dome lighting: enhances the depth perception in data sets that have little or no visual variance (e.g. point clouds). See TLspEyeDomeLightingSettings for details.

For defaults, see TLspPlotStyle.Builder.

Example:

   ILcdExpression<Boolean> visibilityExpression = eq(idAttribute, constant(43));
   ILcdExpression<ILcdIcon> iconExpression = ifThenElse(eq(classAttribute, constant(12)), someIcon, otherIcon);
   ILcdExpression<Float> opacityExpression = fraction(fuelBurnAttribute, 0, 13000);
   TLspPlotStyle style = TLspPlotStyle.newBuilder()
                                        .visibility(visibilityExpression)
                                        .icon(iconExpression)
                                        .opacity(opacityExpression)
                                        .build();
 
In this example, the object is visible if its ID is 43. The icon is determined by a class attribute, and the opacity depends on its fuel burn attribute.

Since:
2014.0
See Also:
  • Constructor Details

    • TLspPlotStyle

      protected TLspPlotStyle(TLspPlotStyle.Builder<?> aBuilder)
      Creates a new style with the properties that are set on the builder
      Parameters:
      aBuilder - a builder which will be used to initialize this style.
  • Method Details

    • newBuilder

      public static TLspPlotStyle.Builder<?> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
      See Also:
    • asBuilder

      public TLspPlotStyle.Builder<?> asBuilder()
      Creates a new builder initialized with all the properties of this style.
      Specified by:
      asBuilder in class ALspStyle
      Returns:
      the new builder.
    • isTransparent

      public boolean isTransparent()
      Always returns false.
      Specified by:
      isTransparent in class ALspStyle
      Returns:
      false
    • getElevationMode

      public ILspWorldElevationStyle.ElevationMode getElevationMode()
      Description copied from interface: ILspWorldElevationStyle
      Returns the elevation mode of this style.
      Specified by:
      getElevationMode in interface ILspWorldElevationStyle
      Returns:
      The elevation mode.
    • getVisibility

      public ILcdExpression<Boolean> getVisibility()
      Returns the expression that determines whether the object should be displayed or not.
      Returns:
      The expression
    • getScale

      public ILcdExpression<Float> getScale()
      Returns the expression that determines the scale factor applied to the icon.
      Returns:
      The expression
    • getColor

      public ILcdExpression<Color> getColor()
      Returns the expression that determines the modulation color applied to the icon.
      Returns:
      The expression
    • getOpacity

      public ILcdExpression<Float> getOpacity()
      Returns the expression that determines transparency added to the icon.
      Returns:
      The expression
    • getIcon

      public ILcdExpression<? extends ILcdIcon> getIcon()
      Returns the expression that determines what icon to use.
      Returns:
      The expression
    • usesOrientation

      public boolean usesOrientation()
      Returns whether the icon should respect the orientation of the domain object (as defined by ILcdOriented).
      Returns:
      true if the icon respects the object orientation, false otherwise
    • isPaintDensity

      public boolean isPaintDensity()
      Returns whether the plots should be painted as a density or not.
      Returns:
      true if the plots should be painted as density; false otherwise.
    • getDensityIndexColorModel

      public IndexColorModel getDensityIndexColorModel()
      Returns the index color model used to visualize densities
      Returns:
      the index color model used to visualize densities
    • getDensityHardness

      public double getDensityHardness()
      Returns the hardness of the density visualization
      Returns:
      the hardness of the density visualization
    • getEyeDomeLighting

      public TLspEyeDomeLightingSettings getEyeDomeLighting()
      Returns the eye-dome lighting settings
      Returns:
      the eye-dome lighting settings
      Since:
      2019.1
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class ALspStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALspStyle