public class TLsp3DIconStyle extends ALspStyle implements ILspEffectsHintStyle, ILspWorldElevationStyle
3D Icon style for styling points with 3D icons in 2D and 3D views.
Construction of a 3D icon style is done through the
Builder
design pattern mechanism.
A typical use-case of a TLsp3DIconStyle
is to visualize moving tracks,
where the icon could be a car, an airplane, ... .
Such an icon has a specific orientation.
For example, the car should be visualized in such a way that it is driving forwards and not sideways or backwards.
LuciadLightspeed assumes a "Z-axis up convention", meaning that the icons should be oriented as illustrated below with an airplane:
Note that when you want to visualize a moving airplane,
it is recommended to let your domain object (or geometry) implement ILcd3DOriented
.
LuciadLightspeed will then automatically apply the pitch, yaw and roll angles on your airplane icon, making it fly in a very realistic manner.
This is illustrated in the samples.lightspeed.icons3d
sample.
Modifier and Type | Class and Description |
---|---|
static class |
TLsp3DIconStyle.Builder<B extends TLsp3DIconStyle.Builder<B>>
Builder for 3D icon styles.
|
static class |
TLsp3DIconStyle.ScalingMode
Mode that indicates how the icon size is determined.
|
ILspEffectsHintStyle.EffectsHint
ILspWorldElevationStyle.ElevationMode
Modifier | Constructor and Description |
---|---|
protected |
TLsp3DIconStyle(TLsp3DIconStyle.Builder<?> aBuilder)
Creates a new style with the properties that are set on the builder
|
Modifier and Type | Method and Description |
---|---|
TLsp3DIconStyle.Builder<?> |
asBuilder()
Creates a new builder initialized with all the properties of this style.
|
boolean |
equals(Object o) |
Collection<ILspEffectsHintStyle.EffectsHint> |
getEffectsHints()
Returns the effects hints specified for this style.
|
ILspWorldElevationStyle.ElevationMode |
getElevationMode()
Returns the elevation mode of this style.
|
ILsp3DIcon |
getIcon()
Gets the icon.
|
int |
getMinimumPixelSize()
Returns the minimum icon size in pixels.
|
Color |
getModulationColor()
Gets the color that is modulated with the icon.
|
float |
getOpacity()
Gets the opacity of the icon.
|
int |
getPixelSize()
Gets the icon size in pixels.
|
double |
getRotationX()
Gets the counterclockwise rotation angle in degrees around the X axis.
|
double |
getRotationY()
Gets the counterclockwise rotation angle in degrees around the Y axis.
|
double |
getRotationZ()
Gets the counterclockwise rotation angle in degrees around the Z axis.
|
double |
getScale()
Deprecated.
|
double |
getScaleX()
Gets the icon scale factor on the X-axis.
|
double |
getScaleY()
Gets the icon scale factor on the Y-axis.
|
double |
getScaleZ()
Gets the icon scale factor on the Z-axis.
|
TLsp3DIconStyle.ScalingMode |
getScalingMode()
Gets the scaling mode of the icon.
|
double |
getTranslationX()
Gets the translation via the X axis
|
double |
getTranslationY()
Gets the translation via the Y axis
|
double |
getTranslationZ()
Gets the translation via the Z axis
|
double |
getVerticalOffsetFactor()
Gets the vertical offset factor of the icon.
|
double |
getWorldSize()
Gets the icon world size in meters.
|
int |
hashCode() |
boolean |
isRecenterIcon()
Checks whether or not the painter should recenter icons on the point at
which the icons are drawn.
|
boolean |
isTransparent()
Determines whether the icon has a transparent surface or not.
|
static TLsp3DIconStyle.Builder<?> |
newBuilder()
Creates a new builder with the default values.
|
String |
toString() |
addStyleChangeListener, getZOrder, isCompatible, removeStyleChangeListener, style
protected TLsp3DIconStyle(TLsp3DIconStyle.Builder<?> aBuilder)
aBuilder
- a builder which will be used to initialize this style.public static TLsp3DIconStyle.Builder<?> newBuilder()
public TLsp3DIconStyle.Builder<?> asBuilder()
public ILsp3DIcon getIcon()
@Deprecated public double getScale()
IllegalStateException
- if the scale factor isn't the same for each axis.TLsp3DIconStyle.ScalingMode
public double getScaleX()
TLsp3DIconStyle.ScalingMode
public double getScaleY()
TLsp3DIconStyle.ScalingMode
public double getScaleZ()
TLsp3DIconStyle.ScalingMode
public double getRotationX()
public double getRotationY()
public double getRotationZ()
public double getTranslationX()
public double getTranslationY()
public double getTranslationZ()
public double getWorldSize()
TLsp3DIconStyle.ScalingMode
public int getPixelSize()
TLsp3DIconStyle.ScalingMode
public int getMinimumPixelSize()
TLsp3DIconStyle.ScalingMode.WORLD_SCALING
.
As soon as the largest dimension (i.e. width, height or depth) of the 3D icon is smaller than this
minimum pixel size, the icon will be scaled to satisfy this minimum size.
By default this value is set to 0, which indicates that no minimum size will be
enforced.public double getVerticalOffsetFactor()
The factor is relative to the size of the icon: a value of 1.0 will shift the icon up by half its height, a value of -1.0 will shift it down by the same distance.
public TLsp3DIconStyle.ScalingMode getScalingMode()
public boolean isTransparent()
isTransparent
in class ALspStyle
public boolean isRecenterIcon()
If true
, 3D icons will be translated such that the center
of their bounds coincides with the location at which they are being painted.
If false
, the origin of the icon's coordinate system will be
mapped to the point being painted.
true
if recentering is enabled, false
otherwisepublic float getOpacity()
public Color getModulationColor()
public Collection<ILspEffectsHintStyle.EffectsHint> getEffectsHints()
ILspEffectsHintStyle
getEffectsHints
in interface ILspEffectsHintStyle
public ILspWorldElevationStyle.ElevationMode getElevationMode()
ILspWorldElevationStyle
getElevationMode
in interface ILspWorldElevationStyle