Package com.luciad.view.lightspeed.style
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
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
- 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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
TLspPlotStyle.Builder<B extends TLspPlotStyle.Builder<B>>
Builder used to create plot styles.Nested classes/interfaces inherited from interface com.luciad.view.lightspeed.style.ILspWorldElevationStyle
ILspWorldElevationStyle.ElevationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
TLspPlotStyle
(TLspPlotStyle.Builder<?> aBuilder) Creates a new style with the properties that are set on the builder -
Method Summary
Modifier and TypeMethodDescriptionCreates a new builder initialized with all the properties of this style.boolean
getColor()
Returns the expression that determines the modulation color applied to the icon.double
Returns the hardness of the density visualizationReturns the index color model used to visualize densitiesReturns the elevation mode of this style.Returns the eye-dome lighting settingsILcdExpression
<? extends ILcdIcon> getIcon()
Returns the expression that determines what icon to use.Returns the expression that determines transparency added to the icon.getScale()
Returns the expression that determines the scale factor applied to the icon.Returns the expression that determines whether the object should be displayed or not.int
hashCode()
boolean
Returns whether the plots should be painted as a density or not.boolean
Always returns false.static TLspPlotStyle.Builder
<?> Creates a new builder with the default values.boolean
Returns whether the icon should respect the orientation of the domain object (as defined by ILcdOriented).Methods inherited from class com.luciad.view.lightspeed.style.ALspStyle
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
-
Constructor Details
-
TLspPlotStyle
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
Creates a new builder with the default values.- Returns:
- the new builder.
- See Also:
-
asBuilder
Creates a new builder initialized with all the properties of this style. -
isTransparent
public boolean isTransparent()Always returns false.- Specified by:
isTransparent
in classALspStyle
- Returns:
- false
-
getElevationMode
Description copied from interface:ILspWorldElevationStyle
Returns the elevation mode of this style.- Specified by:
getElevationMode
in interfaceILspWorldElevationStyle
- Returns:
- The elevation mode.
-
getVisibility
Returns the expression that determines whether the object should be displayed or not.- Returns:
- The expression
-
getScale
Returns the expression that determines the scale factor applied to the icon.- Returns:
- The expression
-
getColor
Returns the expression that determines the modulation color applied to the icon.- Returns:
- The expression
-
getOpacity
Returns the expression that determines transparency added to the icon.- Returns:
- The expression
-
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
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
Returns the eye-dome lighting settings- Returns:
- the eye-dome lighting settings
- Since:
- 2019.1
-
equals
-
hashCode
public int hashCode()
-