public class VehicleModel extends RubberModel implements Capturable, VehicleMapItem, Marker.OnTrackChangedListener
RubberModel.OnChangedListener
AbstractSheet.OnAlphaChangedListener, AbstractSheet.OnLoadListener
DrawingRectangle.Builder, DrawingRectangle.KmlDrawingRectangleImportFactory
Rectangle.MovePointAction, Rectangle.OnMoveListener
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
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COT_TYPE |
_file
KEY_BPHA
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 |
---|
VehicleModel(com.atakmap.android.vehicle.model.VehicleModel.VehicleModelData data) |
VehicleModel(VehicleModelInfo info,
GeoPointMetaData center,
java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
void |
drawCanvas(CapturePP cap,
android.os.Bundle data)
Draw the item to the canvas
|
double |
getAzimuth(NorthReference ref)
Get the azimuth/heading of this vehicle model
|
protected java.lang.String |
getCotType() |
double |
getHeight()
Get the height property value or Double.NaN is to known.
|
android.graphics.drawable.Drawable |
getIconDrawable()
Icon for this content
|
double |
getLength()
Get the length (nose to rear) of the vehicle
|
protected java.lang.String |
getMenuPath() |
VehicleModelInfo |
getVehicleInfo() |
double |
getWidth()
Get the width (wingspan) of the vehicle
|
protected boolean |
isModelVisible() |
void |
onAdded(MapGroup parent) |
void |
onItemRemoved(MapItem item,
MapGroup group) |
void |
onRemoved(MapGroup parent) |
void |
onTrackChanged(Marker marker) |
protected void |
onVisibleChanged()
Invokes when the visible property changes
|
android.os.Bundle |
preDrawCanvas(CapturePP cap)
Save forwarded points to meta data holder
These will be used later in drawCanvas
|
void |
setAzimuth(double deg,
NorthReference ref)
Set the azimuth/heading of this vehicle model
|
void |
setCenter(GeoPointMetaData point) |
void |
setCenterMarker(Marker marker)
Set the center marker for this rectangle
|
boolean |
setShowOutline(boolean outline)
Set whether to show the vehicle outline
|
void |
setStrokeColor(int strokeColor)
Set the strokeColor property value
|
void |
setVehicleInfo(VehicleModelInfo info) |
boolean |
showOutline() |
CotEvent |
toCot() |
protected Folder |
toKml() |
protected KMZFolder |
toKmz() |
protected OGRFeatureExportWrapper |
toOgrGeometry() |
void |
updateOffscreenInterest() |
addChangeListener, create, getChangeListeners, getInfo, getModel, getModelDimensions, getModelDimensions, getModelRotation, getModelScale, getProjection, getSubModelURI, isCancelled, isSharedModel, loadImpl, onLoad, onPointsChanged, onProgress, removeChangeListener, setAltitude, setModelRotation, setModelScale, setRenderer, setSharedModel
addLoadListener, addOnAlphaChangedListener, getAlpha, getCenterMarker, getCenterPoint, getFile, getFillColor, getHeading, getLabelVisibility, getLoadProgress, getLoadState, getPoint, isLoaded, load, removeLoadListener, removeOnAlphaChangedListener, setAlpha, setEditable, setFillColor, setHeading, setLoadProgress, setLoadState, setMenu, setPoints, setPoints
getAssocType, getCenterMarkerType, getCornerPointType, getSideMarkerType, getUIDKey, isSupported, toGpx, toObjectOf
addOnMovedListener, computeCorners, getAnchorItem, getAnchorMarkers, getArea, getAssociationMarkerIndex, getAvgAltitude, getBounds, getCenter, getChildMapGroup, getColor, getEditable, getFilled, getGeoPoints, getIndexOfPoint, getLineStyle, getMetaDataPoints, getMirrorWidth, getNumPoints, getPerimeterOrLength, getPointAt, getPoints, getStrokeColor, getTitle, hasPoint, isCenterShapeMarker, move, move, onGroupChanged, onItemAdded, onMoved, onPointChanged, onSharedPreferenceChanged, removeOnMovedListener, setBasicLineStyle, setCenterPoint, setClickable, setFilled, setHeight, setLabelVisibility, setLength, setLineStyle, setMovable, setPoint, setPointNoRecalc, setStrokeWeight, setTitle, setWidth, setZOrder, showLines, showLines, showTacticalOverlay, showTacticalOverlay, toggleMetaData
getAssociationAt, getAssociations, setAssociations
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, findTouchPoint, getBasicLineStyle, getClickPoint, getGeoPointMetaData, getIconColor, getStrokeStyle, getStrokeWeight, getStyle, onBasicLineStyleChanged, onFillColorChanged, onStrokeColorChanged, onStrokeStyleChanged, onStrokeWeightChanged, onStyleChanged, removeOnBasicLineStyleChangedListener, removeOnFillColorChangedListener, removeOnPointsChangedListener, removeOnStrokeColorChangedListener, removeOnStrokeWeightChangedListener, removeOnStyleChangedListener, removeStyleBits, setColor, setColor, setFillAlpha, setStrokeStyle, setStyle, setTouchPoint, wrap180
addOnAltitudeModeChangedListener, addOnClickableChangedListener, addOnGroupChangedListener, addOnHeightChangedListener, addOnMetadataChangedListener, addOnMetadataChangedListener, addOnTypeChangedListener, addOnVisibleChangedListener, addOnZOrderChangedListener, computeDistance, copyMetaData, createSerialId, dispose, getAltitudeMode, getClickable, getGroup, getHashtags, getHitRadius, getMetaBoolean, getMetaString, getMovable, getRadialMenuPath, getRemarks, getRemarksKey, getSerialId, getTag, getType, getUID, getUniqueMapItemName, getURI, getVisible, getVisible, getZOrder, isTouchable, notifyMetadataChanged, onAltitudeModeChanged, onClickableChanged, onHeightChanged, onMetadataChanged, onTypeChanged, onVisibilityConditions, onZOrderChanged, persist, refresh, removeFromGroup, removeMetaData, removeOnAltitudeModeChangedListener, removeOnClickableChangedListener, removeOnGroupChangedListener, removeOnHeightChangedListener, removeOnMetadataChangedListener, removeOnMetadataChangedListener, removeOnTypeChangedListener, removeOnVisibleChangedListener, removeOnZOrderChangedListener, setAltitudeMode, setClickPoint, setHashtags, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, setRadialMenu, setRemarks, setTag, setTouchable, setType, setVisible, setVisible, testOrthoHit, toString
get, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaStringArrayList, hasMetaValue, setMetaDataImpl
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCenter
getAnchorItem
public static final java.lang.String COT_TYPE
public VehicleModel(VehicleModelInfo info, GeoPointMetaData center, java.lang.String uid)
public VehicleModel(com.atakmap.android.vehicle.model.VehicleModel.VehicleModelData data)
public void setVehicleInfo(VehicleModelInfo info)
public VehicleModelInfo getVehicleInfo()
protected java.lang.String getCotType()
getCotType
in class DrawingRectangle
public android.graphics.drawable.Drawable getIconDrawable()
URIContent
getIconDrawable
in interface URIContent
getIconDrawable
in class MapItem
protected java.lang.String getMenuPath()
getMenuPath
in class RubberModel
public double getWidth()
VehicleMapItem
getWidth
in interface VehicleMapItem
getWidth
in class Rectangle
public double getLength()
VehicleMapItem
getLength
in interface VehicleMapItem
getLength
in class Rectangle
public double getHeight()
MapItem
getHeight
in interface VehicleMapItem
getHeight
in class MapItem
public void setCenterMarker(Marker marker)
Rectangle
setCenterMarker
in class Rectangle
marker
- Center marker or null to use the generic shape markerpublic void setCenter(GeoPointMetaData point)
public void setStrokeColor(int strokeColor)
Shape
setStrokeColor
in class Rectangle
strokeColor
- An argb packed Color
public void setAzimuth(double deg, NorthReference ref)
setAzimuth
in interface VehicleMapItem
deg
- Degreesref
- Reference the degrees are inpublic double getAzimuth(NorthReference ref)
getAzimuth
in interface VehicleMapItem
ref
- Desired referenceprotected void onVisibleChanged()
MapItem
onVisibleChanged
in class Rectangle
public void onTrackChanged(Marker marker)
onTrackChanged
in interface Marker.OnTrackChangedListener
public void onItemRemoved(MapItem item, MapGroup group)
onItemRemoved
in interface MapItem.OnGroupChangedListener
onItemRemoved
in class Rectangle
public boolean setShowOutline(boolean outline)
outline
- True to show outlinepublic boolean showOutline()
public void updateOffscreenInterest()
protected boolean isModelVisible()
isModelVisible
in class RubberModel
public CotEvent toCot()
toCot
in class DrawingRectangle
public android.os.Bundle preDrawCanvas(CapturePP cap)
Capturable
preDrawCanvas
in interface Capturable
preDrawCanvas
in class DrawingRectangle
cap
- Capture instance (use forward() to convert)public void drawCanvas(CapturePP cap, android.os.Bundle data)
Capturable
drawCanvas
in interface Capturable
drawCanvas
in class DrawingRectangle
cap
- Canvas to draw to (use getCanvas())data
- Point data saved in preDrawCanvasprotected Folder toKml()
toKml
in class DrawingRectangle
protected KMZFolder toKmz()
toKmz
in class DrawingRectangle
protected OGRFeatureExportWrapper toOgrGeometry() throws FormatNotSupportedException
toOgrGeometry
in class DrawingRectangle
FormatNotSupportedException