public class SensorFOV extends Shape implements MapItem.OnGroupChangedListener, MapItem.OnVisibleChangedListener
Modifier and Type | Class and Description |
---|---|
static interface |
SensorFOV.OnMetricsChangedListener |
Shape.OnBasicLineStyleChangedListener, Shape.OnFillColorChangedListener, Shape.OnPointsChangedListener, Shape.OnStrokeColorChangedListener, Shape.OnStrokeWeightChangedListener, Shape.OnStyleChangedListener
MapItem.OnAltitudeModeChangedListener, MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
BASIC_LINE_STYLE_DASHED, BASIC_LINE_STYLE_DOTTED, BASIC_LINE_STYLE_OUTLINED, BASIC_LINE_STYLE_SOLID, STYLE_FILLED_MASK, STYLE_STROKE_MASK
CLICKABLE_DEFAULT, EDITABLE_DEFAULT, EMPTY_TYPE, HIT_RATIO_DEFAULT, MOVABLE_DEFAULT, VISIBLE_DEFAULT, ZORDER_DEFAULT, ZORDER_HITTEST_COMPARATOR, ZORDER_RENDER_COMPARATOR
metadata
Constructor and Description |
---|
SensorFOV(long serialId,
MetaDataHolder metadata,
java.lang.String uid) |
SensorFOV(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
void |
addOnMetricsChangedListener(SensorFOV.OnMetricsChangedListener l) |
static boolean |
angleWithin(double deg,
double minDeg,
double maxDeg) |
void |
drawCanvas(CapturePP cap,
android.os.Bundle data)
Draw the item to the canvas
|
float |
getAzimuth() |
GeoBounds |
getBounds(MutableGeoBounds bounds)
The bounds of the shape
|
GeoPointMetaData |
getCenter()
Provides the center point for the Shape, or null if an error has occurred.
|
float[] |
getColor() |
float |
getExtent() |
int |
getFillColor()
Get the fillColor property value
|
float |
getFOV() |
java.lang.String |
getLabelL() |
java.lang.String |
getLabelR() |
GeoPointMetaData[] |
getMetaDataPoints()
The array of points that make up the shape with the corresponding metadata.
|
GeoPointMetaData |
getPoint() |
GeoPoint[] |
getPoints()
The array of points without any metadata
|
float |
getRangeLines() |
boolean |
isShowLabels() |
void |
onItemAdded(MapItem item,
MapGroup group) |
void |
onItemRemoved(MapItem item,
MapGroup group) |
protected void |
onMetricsChanged() |
void |
onVisibleChanged(MapItem item) |
android.os.Bundle |
preDrawCanvas(CapturePP capture)
Save forwarded points to meta data holder
These will be used later in drawCanvas
|
void |
removeOnMetricsChangedListener(SensorFOV.OnMetricsChangedListener l) |
void |
setAlpha(float alpha) |
void |
setColor(float r,
float g,
float b)
set the percentage of each primary color
|
void |
setColor(int color)
set the color of the field of view cone.
|
void |
setFillColor(int fillColor)
Set the fillColor property value
|
void |
setMetrics(float azimuth,
float fov,
float extent)
When setting the metrics that define the sensor, please pay attention to the
units of the various items:
|
void |
setMetrics(float azimuth,
float fov,
float extent,
boolean bLabels,
float rangeLines)
When setting the metrics that define the sensor, please pay attention to the
units of the various items:
|
void |
setPoint(GeoPointMetaData point) |
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, findTouchPoint, getArea, getBasicLineStyle, getClickPoint, getGeoPointMetaData, getIconColor, getPerimeterOrLength, getStrokeColor, getStrokeStyle, getStrokeWeight, getStyle, getTitle, onBasicLineStyleChanged, onFillColorChanged, onPointsChanged, onStrokeColorChanged, onStrokeStyleChanged, onStrokeWeightChanged, onStyleChanged, removeOnBasicLineStyleChangedListener, removeOnFillColorChangedListener, removeOnPointsChangedListener, removeOnStrokeColorChangedListener, removeOnStrokeWeightChangedListener, removeOnStyleChangedListener, removeStyleBits, setBasicLineStyle, setColor, setFillAlpha, setStrokeColor, setStrokeStyle, setStrokeWeight, setStyle, setTitle, setTouchPoint, wrap180
addOnAltitudeModeChangedListener, addOnClickableChangedListener, addOnGroupChangedListener, addOnHeightChangedListener, addOnMetadataChangedListener, addOnMetadataChangedListener, addOnTypeChangedListener, addOnVisibleChangedListener, addOnZOrderChangedListener, computeDistance, copyMetaData, createSerialId, dispose, getAltitudeMode, getClickable, getEditable, getGroup, getHashtags, getHeight, getHitRadius, getIconDrawable, getMetaBoolean, getMetaString, getMovable, getRadialMenuPath, getRemarks, getRemarksKey, getSerialId, getTag, getType, getUID, getUniqueMapItemName, getURI, getVisible, getVisible, getZOrder, isTouchable, notifyMetadataChanged, onAdded, onAltitudeModeChanged, onClickableChanged, onGroupChanged, onHeightChanged, onMetadataChanged, onRemoved, onTypeChanged, onVisibilityConditions, onVisibleChanged, onZOrderChanged, persist, refresh, removeFromGroup, removeMetaData, removeOnAltitudeModeChangedListener, removeOnClickableChangedListener, removeOnGroupChangedListener, removeOnHeightChangedListener, removeOnMetadataChangedListener, removeOnMetadataChangedListener, removeOnTypeChangedListener, removeOnVisibleChangedListener, removeOnZOrderChangedListener, setAltitudeMode, setClickable, setClickPoint, setEditable, setHashtags, setHeight, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, setMovable, setRadialMenu, setRemarks, setTag, setTouchable, setType, setVisible, setVisible, setZOrder, testOrthoHit, toString
get, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaStringArrayList, hasMetaValue, setMetaDataImpl, toggleMetaData
public SensorFOV(java.lang.String uid)
public SensorFOV(long serialId, MetaDataHolder metadata, java.lang.String uid)
public void onItemAdded(MapItem item, MapGroup group)
onItemAdded
in interface MapItem.OnGroupChangedListener
public void onItemRemoved(MapItem item, MapGroup group)
onItemRemoved
in interface MapItem.OnGroupChangedListener
public void onVisibleChanged(MapItem item)
onVisibleChanged
in interface MapItem.OnVisibleChangedListener
public GeoPointMetaData getCenter()
Shape
public GeoPoint[] getPoints()
Shape
public GeoPointMetaData[] getMetaDataPoints()
Shape
getMetaDataPoints
in class Shape
public void setMetrics(float azimuth, float fov, float extent)
azimuth
- the azimuth is in Degrees Truefov
- field of view in angular degreesextent
- in meters.public void setMetrics(float azimuth, float fov, float extent, boolean bLabels, float rangeLines)
azimuth
- the azimuth is in Degrees Truefov
- field of view in angular degreesextent
- in meters.bLabels
- display FoV edges/angles as labelsrangeLines
- spacing for range lines in meterspublic void setAlpha(float alpha)
public void setColor(float r, float g, float b)
r
- - the decimal value of the percentage of red (between 0-1)g
- - the decimal value of the percentage of green (between 0-1)b
- - the decimal value of the percentage of blue (between 0-1)public void setFillColor(int fillColor)
Shape
setFillColor
in class Shape
fillColor
- An argb packed Color
public int getFillColor()
Shape
getFillColor
in class Shape
Color
public void addOnMetricsChangedListener(SensorFOV.OnMetricsChangedListener l)
public void removeOnMetricsChangedListener(SensorFOV.OnMetricsChangedListener l)
protected void onMetricsChanged()
public float getAzimuth()
public float getFOV()
public float getExtent()
public float getRangeLines()
public boolean isShowLabels()
public java.lang.String getLabelL()
public java.lang.String getLabelR()
public GeoPointMetaData getPoint()
public float[] getColor()
public void setColor(int color)
public void setPoint(GeoPointMetaData point)
public GeoBounds getBounds(MutableGeoBounds bounds)
Shape
public android.os.Bundle preDrawCanvas(CapturePP capture)
Capturable
preDrawCanvas
in interface Capturable
preDrawCanvas
in class Shape
capture
- Capture instance (use forward() to convert)public void drawCanvas(CapturePP cap, android.os.Bundle data)
Capturable
drawCanvas
in interface Capturable
drawCanvas
in class Shape
cap
- Canvas to draw to (use getCanvas())data
- Point data saved in preDrawCanvaspublic static boolean angleWithin(double deg, double minDeg, double maxDeg)