Class DistanceCompositeSceneSymbol.Range
- Enclosing class:
DistanceCompositeSceneSymbol
When a Range's maximum distance is set to 0, the default value, the Symbol that is assigned will be visible from the minimum distance set and onward. Setting a minimum distance to be great than a maximum distance will cause the Symbol to never display.
Example of setting a SimpleMarkerSymbol to a Range that has a minimum and maximum distance set. This Range will display it's SimpleMarkerSymbol between 0 and 2000 meters from SceneView's Camera.
SimpleMarkerSymbol crossSymbol = new SimpleMarkerSymbol(Style.CROSS, 0xFF00FF00, 40); Range range = new Range(cross2D, 0, 2000));
- Since:
- 100.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.double
Gets the minimum distance from the SceneView's surface at which the Symbol assigned to this Range will be displayed.Gets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.void
setMaxDistance
(double maxDistance) Sets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.void
setMinDistance
(double minDistance) Sets the minimum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.void
Sets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.
-
Constructor Details
-
Range
Creates a Range that displays the given Symbol.When no minimum or maximum distance is set the Symbol will always be displayed.
- Parameters:
symbol
- symbol to be used for this range, can't be null- Throws:
IllegalArgumentException
- if symbol is null- Since:
- 100.0.0
-
Range
Creates a Range that displays the given Symbol when the SceneView's Camera is within the minimum and maximum distance that is passed.- Parameters:
symbol
- symbol to be used for this range, can't be nullminDistance
- minimum distance for this range, in metersmaxDistance
- maximum distance for this range, in meters- Throws:
IllegalArgumentException
- if symbol is nullIllegalArgumentException
- if minDistance is less than 0IllegalArgumentException
- if maxDistance is less than 0- Since:
- 100.0.0
- See Also:
-
-
Method Details
-
getSymbol
Gets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.- Returns:
- the symbol for this range
- Since:
- 100.0.0
-
setSymbol
Sets the Symbol to be displayed when the SceneView's Camera is within the distance set by this Range.- Parameters:
symbol
- symbol for this range, can't be null- Throws:
IllegalArgumentException
- if symbol is null- Since:
- 100.0.0
-
getMinDistance
public double getMinDistance()Gets the minimum distance from the SceneView's surface at which the Symbol assigned to this Range will be displayed.- Returns:
- the minimum distance, 0 by default, in meters
- Since:
- 100.0.0
-
setMinDistance
public void setMinDistance(double minDistance) Sets the minimum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.Setting minimum distance greater than maximum distance will cause the Symbol that is set to never display.
- Parameters:
minDistance
- minimum distance, in meters- Throws:
IllegalArgumentException
- if minDistance is less than 0- Since:
- 100.0.0
-
getMaxDistance
public double getMaxDistance()Gets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.- Returns:
- the maximum distance, 0 by default, in meters
- Since:
- 100.0.0
-
setMaxDistance
public void setMaxDistance(double maxDistance) Sets the maximum distance from the SceneView's Camera at which the Symbol assigned to this Range will be displayed.Setting the maximum distance to 0, the default value, will display the Symbol that is set starting from the minimum distance and beyond.
- Parameters:
maxDistance
- maximum distance, in meters- Throws:
IllegalArgumentException
- if maxDistance is less than 0- Since:
- 100.0.0
-