|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView
cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView
cz.cuni.amis.pogamut.base3d.worldview.impl.VisionWorldView
public class VisionWorldView
| Field Summary | |
|---|---|
static String |
WORLDVIEW_DEPENDENCY
|
| Fields inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView |
|---|
notifyEventsList, receiveEventProcessing |
| Fields inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView |
|---|
COMPONENT_ID, control, controller, eventBus, log |
| Constructor Summary | |
|---|---|
VisionWorldView(ComponentDependencies dependencies,
IComponentBus bus,
IAgentLogger log)
|
|
| Method Summary | ||
|---|---|---|
protected void |
addVisibleObject(IViewable worldObject)
Method that adds a world object to the visible object maps. |
|
protected void |
cleanUp()
Cleans up internal data structures, called from start/stop/kill/reset methods. |
|
Map<Class,Map<WorldObjectId,IViewable>> |
getAllVisible()
Returns map of all visible objects ( IViewable instances} - those that the agent can currently see. |
|
|
getAllVisible(Class<T> type)
Returns map of all visible objects ( IViewable instances} - those that the agent can currently see. |
|
Map<WorldObjectId,IViewable> |
getVisible()
Returns map of all visible objects ( IViewable instances} organized according to their WorldObjectId -
those that the agent can currently see. |
|
IViewable |
getVisible(WorldObjectId id)
Returns a visible world object of the specific id (if exists inside the world view and is visible). |
|
protected void |
objectAppeared(IViewable obj)
Called whenever the object appears in the agent's FOV. |
|
protected void |
objectCreated(IWorldObject obj)
Additionally, it provides handling of IViewable objects raising WorldObjectAppearedEvent automatically (if object is visible). |
|
protected void |
objectDestroyed(IWorldObject obj)
Additionally it handles IViewable objects automatically raising WorldObjectDisappearedEvent if object was visible
before it was destroyed. |
|
protected void |
objectDisappeared(IViewable obj)
Called whenever the object disappears from the agent's FOV. |
|
protected void |
objectUpdatedEvent(IWorldObjectUpdatedEvent updateEvent)
It additionally handles IViewable objects automatically raising WorldObjectAppearedEvent and
WorldObjectDisappearedEvent. |
|
protected void |
removeVisibleObject(IViewable worldObject)
Removes world object from the visible world maps. |
|
| Methods inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView |
|---|
innerNotify, notify, notifyAfterPropagation, notifyImmediately, objectUpdated, raiseEvent |
| Methods inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView |
|---|
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, addWorldObject, get, get, get, getAll, getAll, getComponentId, getEventBus, getLog, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, isPaused, isRunning, kill, pause, prePause, preStop, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener, removeWorldObject, reset, resume, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.IWorldView |
|---|
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, get, get, get, getAll, getAll, getEventBus, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener |
| Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.IWorldChangeEventInput |
|---|
notify, notifyAfterPropagation, notifyImmediately |
| Methods inherited from interface cz.cuni.amis.pogamut.base.component.IComponent |
|---|
getComponentId |
| Field Detail |
|---|
public static final String WORLDVIEW_DEPENDENCY
| Constructor Detail |
|---|
public VisionWorldView(ComponentDependencies dependencies,
IComponentBus bus,
IAgentLogger log)
| Method Detail |
|---|
protected void cleanUp()
AbstractWorldViewIf you override this method, do not forget to call super.cleanUp().
cleanUp in class AbstractWorldViewpublic Map<Class,Map<WorldObjectId,IViewable>> getAllVisible()
IVisionWorldViewIViewable instances} - those that the agent can currently see.
WARNING: If you will do iteration over the map, you must synchronize on it.
getAllVisible in interface IVisionWorldViewpublic <T extends IViewable> Map<WorldObjectId,T> getAllVisible(Class<T> type)
IVisionWorldViewIViewable instances} - those that the agent can currently see.
WARNING: If you will do iteration over the map, you must synchronize on it.
getAllVisible in interface IVisionWorldViewpublic Map<WorldObjectId,IViewable> getVisible()
IVisionWorldViewIViewable instances} organized according to their WorldObjectId -
those that the agent can currently see.
WARNING: If you will do iteration over the map, you must synchronize on it.
getVisible in interface IVisionWorldViewpublic IViewable getVisible(WorldObjectId id)
IVisionWorldViewOtherwise, null is returned.
getVisible in interface IVisionWorldViewid - objects's id
protected void addVisibleObject(IViewable worldObject)
Synchronized!
worldObject - protected void removeVisibleObject(IViewable worldObject)
Synchronized!
worldObject - protected void objectUpdatedEvent(IWorldObjectUpdatedEvent updateEvent)
IViewable objects automatically raising WorldObjectAppearedEvent and
WorldObjectDisappearedEvent.
objectUpdatedEvent in class EventDrivenWorldViewprotected void objectCreated(IWorldObject obj)
IViewable objects raising WorldObjectAppearedEvent automatically (if object is visible).
objectCreated in class EventDrivenWorldViewprotected void objectAppeared(IViewable obj)
obj - protected void objectDisappeared(IViewable obj)
obj - protected void objectDestroyed(IWorldObject obj)
IViewable objects automatically raising WorldObjectDisappearedEvent if object was visible
before it was destroyed.
objectDestroyed in class EventDrivenWorldViewobj -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||