|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ascape.model.AscapeObject org.ascape.model.Agent org.ascape.model.LocatedAgent org.ascape.model.MomentumAgent org.ascape.gis.model.MapAgent
public class MapAgent
Field Summary | |
---|---|
protected com.bbn.openmap.omGraphics.OMRaster |
graphic
The wrapper class that OpenMap needs to place the actual image within. |
protected com.bbn.openmap.layer.location.Location |
location
The location of the asset in continuous space. |
protected java.awt.Image |
mapImage
The actual graphic representation of the asset on the map. |
protected double |
velocity
The asset's velocity in nautical miles per hour. |
Fields inherited from class org.ascape.model.MomentumAgent |
---|
heading |
Fields inherited from class org.ascape.model.LocatedAgent |
---|
coordinate, MOVE_RANDOM_LOCATION_RULE, RANDOM_WALK_RULE, thisUpdate |
Fields inherited from class org.ascape.model.Agent |
---|
DEATH_RULE, FISSIONING_RULE, FORCE_DIE_RULE, FORCE_FISSION_RULE, FORCE_MOVE_RULE, INITIALIZE_RULE, ITERATE_AND_UPDATE_RULE, ITERATE_RULE, METABOLISM_RULE, MOVEMENT_RULE, PLAY_OTHER, UPDATE_RULE |
Fields inherited from class org.ascape.model.AscapeObject |
---|
ARBITRARY_SEED, name, scape |
Constructor Summary | |
---|---|
MapAgent()
|
Method Summary | |
---|---|
com.bbn.openmap.omGraphics.OMRaster |
getGraphic()
|
java.awt.Image |
getImage()
Gets the image for the MapAgent class. |
java.awt.Image |
getImage(java.lang.String imageName)
Gets an image for the graphic from a file. |
java.awt.Image |
getImage(java.lang.String imageName,
java.lang.String subDirectory)
Gets an image for the graphic from a file. |
com.bbn.openmap.layer.location.Location |
getLocation()
Gets the location for the MapAgent object. |
double |
getOffsetX()
Returns the offset that the image should carry from the left. |
double |
getOffsetY()
|
double |
getVelocity()
Gets the MapAgent's velocity |
boolean |
isAt(MapCoordinate coordinate)
Returns true if the MapAgent is at the location defined by the MapCoordinate passed in. |
void |
moveToward(Coordinate coordinate)
Moves this MapAgent object closer to its destination |
void |
setCoordinate(Coordinate coordinate)
Returns the extent of the nth dimension. |
void |
setGraphic(com.bbn.openmap.omGraphics.OMRaster graphic)
Sets graphic for the MapAgent object. |
void |
setImage(java.awt.Image mapImage)
Sets the image to be used when drawing. |
void |
setImage(java.lang.String imageName)
Sets the image to be used when drawing. |
void |
setLocation(com.bbn.openmap.layer.location.Location location)
|
void |
setOffsetX(double offsetX)
|
void |
setOffsetY(double offsetY)
|
void |
setVelocity(double vel)
Sets the vehicle's velocity |
Methods inherited from class org.ascape.model.MomentumAgent |
---|
findHeadingAway, findHeadingAway, findHeadingToward, findHeadingToward, getAgentSize, getHeading, headAway, headAway, headToward, headToward, movement, moveTo, moveTo, moveToRandomLocation, randomWalk, setAgentSize, setHeading, toString |
Methods inherited from class org.ascape.model.LocatedAgent |
---|
calculateDistance, calculateDistance, countWithin, countWithin, countWithin, findMaximumWithin, findNearest, findNearest, findNearest, findNearest, findNearest, findWithin, findWithin, findWithin, findWithin, getCoordinate, hasWithin, hasWithin, hasWithin, initialize, isUpdateNeeded, moveAway, moveAway, moveAway, moveToward, moveToward, requestUpdate, requestUpdateNext |
Methods inherited from class org.ascape.model.Agent |
---|
clearDeleteMarker, clone, death, deathCondition, die, execute, execute, fission, fissionCondition, fissioning, getColor, getColor, getImage, getIteration, getRoot, isDelete, isInitialized, iterate, markForDeletion, metabolism, move, movementCondition, play, scapeCreated, setInitialized, setScape, update |
Methods inherited from class org.ascape.model.AscapeObject |
---|
diffDeep, diffDeep, diffDeepBFS, diffDeepDFS, diffDeepValidate, diffDeepVisit, equalsDeep, equalsDeep, equalsDeep, getComparisonStream, getName, getRandom, getRandomSeed, getScape, randomInRange, randomInRange, randomIs, randomToLimit, reseed, setComparisonStream, setName, setRandom, setRandomSeed |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.ascape.model.space.Location |
---|
clearDeleteMarker, clone, isDelete, markForDeletion |
Field Detail |
---|
protected com.bbn.openmap.omGraphics.OMRaster graphic
protected com.bbn.openmap.layer.location.Location location
protected double velocity
protected java.awt.Image mapImage
Constructor Detail |
---|
public MapAgent()
Method Detail |
---|
public void moveToward(Coordinate coordinate)
moveToward
in class LocatedAgent
coordinate
- the new location as a Coordinatepublic boolean isAt(MapCoordinate coordinate)
coordinate
- The MapCoordinate where the MapAgent is being tested to be.
public com.bbn.openmap.layer.location.Location getLocation()
public double getVelocity()
getVelocity
in class MomentumAgent
public void setGraphic(com.bbn.openmap.omGraphics.OMRaster graphic)
graphic
- the graphicpublic void setCoordinate(Coordinate coordinate)
setCoordinate
in interface Location
setCoordinate
in class LocatedAgent
coordinate
- the coordinatepublic void setVelocity(double vel)
setVelocity
in class MomentumAgent
vel
- the velocitypublic java.awt.Image getImage(java.lang.String imageName)
imageName
- parameter
public java.awt.Image getImage(java.lang.String imageName, java.lang.String subDirectory)
imageName
- parameter
public double getOffsetX()
public void setOffsetX(double offsetX)
public double getOffsetY()
public void setOffsetY(double offsetY)
public com.bbn.openmap.omGraphics.OMRaster getGraphic()
public java.awt.Image getImage()
getImage
in class Agent
public void setLocation(com.bbn.openmap.layer.location.Location location)
public void setImage(java.awt.Image mapImage)
mapImage
- the image to drawpublic void setImage(java.lang.String imageName)
imageName
- the image to draw
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |