|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jactr.modules.pm.visual.memory.impl.encoder.AbstractVisualEncoder
public abstract class AbstractVisualEncoder
abstract base implementation of a visual chunk encoder. Extenders must
implement canEncodeVisualObjectType(IAfferentObject) which tests to
see if this encoder can encode that type of percept. If there is any actual
content in the encoded chunk,
updateSlots(IAfferentObject, IChunk, IVisualMemory),
isDirty(IAfferentObject, IChunk, IPerceptualMemory), and
isTooDirty(IAfferentObject, IChunk, IVisualMemory) should be
extended as well. This implementation handles the creation of new chunks as
well as updating if they are dirty.
| Field Summary |
|---|
| Fields inherited from interface org.jactr.modules.pm.common.memory.IPerceptualEncoder |
|---|
COMMONREALITY_IDENTIFIER_META_KEY |
| Constructor Summary | |
|---|---|
AbstractVisualEncoder(java.lang.String chunkTypeName)
|
|
| Method Summary | |
|---|---|
IChunk |
encode(org.commonreality.object.IAfferentObject afferentObject,
IPerceptualMemory memory)
|
static boolean |
exceedsMovementTolerance(IChunk oldVisualLocation,
IChunk newVisualLocation,
IVisualMemory visualMemory)
returns true if the visual locations are separated by more than IVisualMemory.getMovementTolerance(), |
static double[] |
getLocation(IChunk visualLocation)
|
static IChunk |
getVisualLocation(org.commonreality.object.IAfferentObject afferentObject,
IVisualMemory visualMemory)
return the visual location (defined by IVisualPropertyHandler.RETINAL_LOCATION) of the object. |
static IChunk |
getVisualLocation(IChunk visualChunk,
IVisualMemory visualMemory)
return the contents of screen-pos, but only if it is a visual-location chunk |
boolean |
isDirty(org.commonreality.object.IAfferentObject afferentObject,
IChunk oldChunk,
IPerceptualMemory memory)
checks the expected visual location against the previously encoded visual location. |
boolean |
isInterestedIn(org.commonreality.object.IAfferentObject afferentObject)
returns true if the percept has the IVisualPropertyHandler.IS_VISUAL property. |
IChunk |
update(org.commonreality.object.IAfferentObject afferentObject,
IChunk oldChunk,
IPerceptualMemory memory)
called to update the encoding of a chunk. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractVisualEncoder(java.lang.String chunkTypeName)
chunkTypeName - name of the chunktype that is to be created| Method Detail |
|---|
public static IChunk getVisualLocation(org.commonreality.object.IAfferentObject afferentObject,
IVisualMemory visualMemory)
IVisualPropertyHandler.RETINAL_LOCATION) of the object. If no
location is defined, it is outside the visual field, or it is not visible,
null is returned
afferentObject - visualMemory -
public static IChunk getVisualLocation(IChunk visualChunk,
IVisualMemory visualMemory)
visualChunk -
public boolean isDirty(org.commonreality.object.IAfferentObject afferentObject,
IChunk oldChunk,
IPerceptualMemory memory)
isDirty in interface IPerceptualEncoderafferentObject - oldChunk - memory -
IPerceptualEncoder.isDirty(org.commonreality.object.IAfferentObject,
org.jactr.core.chunk.IChunk,
org.jactr.modules.pm.common.memory.IPerceptualMemory)
public static boolean exceedsMovementTolerance(IChunk oldVisualLocation,
IChunk newVisualLocation,
IVisualMemory visualMemory)
IVisualMemory.getMovementTolerance(),
oldVisualLocation - newVisualLocation - visualMemory -
public static double[] getLocation(IChunk visualLocation)
public boolean isInterestedIn(org.commonreality.object.IAfferentObject afferentObject)
IVisualPropertyHandler.IS_VISUAL property.
isInterestedIn in interface IPerceptualEncoderafferentObject -
IPerceptualEncoder.isInterestedIn(org.commonreality.object.IAfferentObject)
public IChunk encode(org.commonreality.object.IAfferentObject afferentObject,
IPerceptualMemory memory)
encode in interface IPerceptualEncoder
public IChunk update(org.commonreality.object.IAfferentObject afferentObject,
IChunk oldChunk,
IPerceptualMemory memory)
isTooDirty(IAfferentObject, IChunk, IVisualMemory).
The write lock will have already been acquired.
update in interface IPerceptualEncoderafferentObject - oldChunk - memory -
IPerceptualEncoder.update(org.commonreality.object.IAfferentObject,
org.jactr.core.chunk.IChunk,
org.jactr.modules.pm.common.memory.IPerceptualMemory)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||