jadex.application.space.envsupport.environment.space2d
Class DefaultVisionGenerator

java.lang.Object
  extended by jadex.commons.SimplePropertyObject
      extended by jadex.application.space.envsupport.environment.space2d.DefaultVisionGenerator
All Implemented Interfaces:
IEnvironmentListener, IPerceptGenerator, IPropertyObject

public class DefaultVisionGenerator
extends SimplePropertyObject
implements IPerceptGenerator

Percept generator for moving components.


Field Summary
protected  Map actiontypes
          The percept receiving component types.
static String APPEARED
          The appeared percept type.
static String CREATED
          The created percept type.
static String DESTROYED
          The destroyed percept type.
static String DISAPPEARED
          The disappeared percept type.
protected static ISpaceObject[] EMPTY_SPACEOBJECTS
          Empty spaceobjects array.
static String MOVED
          The moved percept type.
static String PROPERTY_MAXRANGE
          The maxrange property.
static String PROPERTY_PERCEPTTYPES
          The percept types property.
static String PROPERTY_RANGE
          The maxrange property.
 
Fields inherited from class jadex.commons.SimplePropertyObject
pcs, properties
 
Constructor Summary
DefaultVisionGenerator()
           
 
Method Summary
 void componentAdded(IComponentIdentifier component, IEnvironmentSpace space)
          Called when an component was added to the space.
 void componentRemoved(IComponentIdentifier component, IEnvironmentSpace space)
          Called when an component was remove from the space.
 void dispatchEnvironmentEvent(EnvironmentEvent event)
          Dispatch an environment event to this listener.
protected  Set getActionTypes(PerceptType pt)
          Get the action types for a percept.
protected  IVector1 getDefaultRange()
          Get the default range.
protected  String getPerceptType(IEnvironmentSpace space, String componenttype, String objecttype, String actiontype)
          Get the percept type.
protected  Object[] getPerceptTypes()
          Get the percept types defined for this generator.
protected  IVector1 getRange(ISpaceObject avatar)
          Get the range.
protected  String getRangePropertyName()
          Get the range property name.
 
Methods inherited from class jadex.commons.SimplePropertyObject
addPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jadex.commons.IPropertyObject
getProperty, getPropertyNames, hasProperty, setProperty
 

Field Detail

PROPERTY_MAXRANGE

public static String PROPERTY_MAXRANGE
The maxrange property.


PROPERTY_RANGE

public static String PROPERTY_RANGE
The maxrange property.


PROPERTY_PERCEPTTYPES

public static String PROPERTY_PERCEPTTYPES
The percept types property.


APPEARED

public static String APPEARED
The appeared percept type.


DISAPPEARED

public static String DISAPPEARED
The disappeared percept type.


CREATED

public static String CREATED
The created percept type.


DESTROYED

public static String DESTROYED
The destroyed percept type.


MOVED

public static String MOVED
The moved percept type.


EMPTY_SPACEOBJECTS

protected static final ISpaceObject[] EMPTY_SPACEOBJECTS
Empty spaceobjects array.


actiontypes

protected Map actiontypes
The percept receiving component types.

Constructor Detail

DefaultVisionGenerator

public DefaultVisionGenerator()
Method Detail

componentAdded

public void componentAdded(IComponentIdentifier component,
                           IEnvironmentSpace space)
Called when an component was added to the space.

Specified by:
componentAdded in interface IPerceptGenerator
Parameters:
component - The component identifier.
space - The space.

componentRemoved

public void componentRemoved(IComponentIdentifier component,
                             IEnvironmentSpace space)
Called when an component was remove from the space.

Specified by:
componentRemoved in interface IPerceptGenerator
Parameters:
component - The component identifier.
space - The space.

dispatchEnvironmentEvent

public void dispatchEnvironmentEvent(EnvironmentEvent event)
Dispatch an environment event to this listener.

Specified by:
dispatchEnvironmentEvent in interface IEnvironmentListener
Parameters:
event - The event.

getPerceptType

protected String getPerceptType(IEnvironmentSpace space,
                                String componenttype,
                                String objecttype,
                                String actiontype)
Get the percept type.

Parameters:
space - The space.
componenttype - The component type.
objecttype - The object type.
actiontype - The action type.
Returns:
The matching percept.

getActionTypes

protected Set getActionTypes(PerceptType pt)
Get the action types for a percept.

Parameters:
pt - The percept type.

getPerceptTypes

protected Object[] getPerceptTypes()
Get the percept types defined for this generator.

Returns:
The percept types.

getRange

protected IVector1 getRange(ISpaceObject avatar)
Get the range.

Returns:
The range.

getDefaultRange

protected IVector1 getDefaultRange()
Get the default range.

Returns:
The range.

getRangePropertyName

protected String getRangePropertyName()
Get the range property name.

Returns:
The range property name.


Copyright © 2010. All Rights Reserved.