Package com.luciad.view.lightspeed.style
Class ALspSoftDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>>
java.lang.Object
com.luciad.view.lightspeed.style.ALspStyle.Builder<B>
com.luciad.view.lightspeed.style.ALspDensityStyle.Builder<B>
com.luciad.view.lightspeed.style.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 Summary
Modifier and TypeMethodDescriptionSets all parameters on the builder based on the given style.abstract ALspSoftDensityStylebuild()Builds the style with the set parameters.hardness(double aHardness) Sets the hardness of the density style.pixelSize(double aPixelSize) Sets the width of the density style to build in pixel size.worldSize(double aWorldSize) Sets the width of the density style to build in world size.Methods inherited from class com.luciad.view.lightspeed.style.ALspDensityStyle.Builder
elevationMode, weightMethods inherited from class com.luciad.view.lightspeed.style.ALspStyle.Builder
equals, hashCode
-
Method Details
-
all
Description copied from class:ALspStyle.BuilderSets 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:
allin classALspDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>>- Parameters:
aStyle- the style to copy- Returns:
this
-
hardness
Sets the hardness of the density style.
Consult the class javadoc of
ALspDensityStylefor more information.- Parameters:
aHardness- the hardness of the density style- Returns:
this
-
worldSize
Sets the width of the density style to build in world size.
Consult the class javadoc of
ALspDensityStylefor more information.- Parameters:
aWorldSize- the width in world size- Returns:
this
-
pixelSize
Sets the width of the density style to build in pixel size.
Consult the class javadoc of
ALspDensityStylefor more information.- Parameters:
aPixelSize- the width in pixels- Returns:
this
-
build
Description copied from class:ALspStyle.BuilderBuilds the style with the set parameters.- Specified by:
buildin classALspDensityStyle.Builder<B extends ALspSoftDensityStyle.Builder<B>>- Returns:
- the resulting style
-