org.micropsi.comp.world.objects
Class PlantObject

java.lang.Object
  extended byorg.micropsi.comp.world.objects.AbstractObjectPart
      extended byorg.micropsi.comp.world.objects.AbstractObject
          extended byorg.micropsi.comp.world.objects.AbstractCommonObject
              extended byorg.micropsi.comp.world.objects.PlantObject
All Implemented Interfaces:
VisualFeatureIF, WorldMessageHandlerIF
Direct Known Subclasses:
BananaTreeObject, FlowerObject, GreenTreeObject, HazelObject, NettleObject, PalmTreeObject, PineTreeObject, ShockPodBushObject, SunflowerObject, ThornBushObject

public class PlantObject
extends AbstractCommonObject

$Header $


Field Summary
protected  double growRate
           
protected  double maxHeight
           
protected  int maxWaterContent
           
protected  int waterContent
           
 
Fields inherited from class org.micropsi.comp.world.objects.AbstractCommonObject
damage, maxDamage
 
Fields inherited from class org.micropsi.comp.world.objects.AbstractObject
lastChange, moveVector, objectName, persistent, state, weight
 
Fields inherited from class org.micropsi.comp.world.objects.AbstractObjectPart
containingPart, id, objectClass, optionalProperties, orientationAngle, partHierarchyLevel, position, requiredProperties, sizeNumberFormat, subParts, world, xSize, ySize, zSize
 
Constructor Summary
PlantObject(org.w3c.dom.Element configData, Logger logger)
           
PlantObject(java.lang.String objectName, java.lang.String objectClass, Position pos)
          Constructor for PlantObject
 
Method Summary
 void _handleMessage(AbstractWorldMessage m)
           
 double getGrowRate()
           
 double getHeight()
           
 double getMaxHeight()
           
 int getMaxWaterContent()
           
 int getWaterContent()
           
 void init(World world)
           
protected  void initObjectParameters()
           
protected  void initProperties()
           
 void setGrowRate(double growRate)
          Sets the growRate.
 void setMaxHeight(double maxHight)
          Sets the maxHeight.
 void setMaxWaterContent(int maxWater)
          Sets the maxWather.
 void setWaterContent(int waterContent)
          Sets the actWather.
 java.lang.String toString()
           
 
Methods inherited from class org.micropsi.comp.world.objects.AbstractCommonObject
breakToPeaces, handleMessageAgentAction, setDamage, setMaxDamage, takeDamage
 
Methods inherited from class org.micropsi.comp.world.objects.AbstractObject
_remove, defaultState, getLastChange, getMoveVector, getObjectIdentification, getObjectName, getState, getState, getWeight, initObjectState, isPersistent, logChange, rotateBy, scaleBy, setMoveVector, setObjectName, setPosition, setSize, setState, setWeight, toMTreeNode, toXMLElement, toXMLElement
 
Methods inherited from class org.micropsi.comp.world.objects.AbstractObjectPart
_setSize, addLowLevePartsTo, addOptionalProperty, addRequiredProperty, addSubPart, addSubPartRelative, addSubPartsToMTreeNode, createPropertyCollection, getContainingObject, getContainingPart, getDistinctSizes, getId, getLogger, getNextObjectId, getObjectClass, getOptionalProperties, getOrientationAngle, getPartHierarchyLevel, getPosition, getProperties, getSize, getXSize, getYSize, getZSize, handleMessage, hasSubParts, initSubobjects, isAlive, isHighLevelObject, isLowLevelPart, moveBy, moveTo, originatorsMatchSubParts, originatorsMatchSubParts, removeSubPart, rotateToAngle, scaleBy, scaleSubpartsBy, setContainingPart, setDistinctSizes, setObjectClass, setPartHierarchyLevel, setProperties, setProperty, setRequiredProperties, setSize, triggerSubPartChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

growRate

protected double growRate

maxHeight

protected double maxHeight

maxWaterContent

protected int maxWaterContent

waterContent

protected int waterContent
Constructor Detail

PlantObject

public PlantObject(org.w3c.dom.Element configData,
                   Logger logger)
            throws MicropsiException

PlantObject

public PlantObject(java.lang.String objectName,
                   java.lang.String objectClass,
                   Position pos)
Constructor for PlantObject

Parameters:
objectName -
objectClass -
pos -
Method Detail

initProperties

protected void initProperties()
Overrides:
initProperties in class AbstractCommonObject

getGrowRate

public double getGrowRate()
Returns:
double

getHeight

public double getHeight()

getMaxHeight

public double getMaxHeight()
Returns:
double

getMaxWaterContent

public int getMaxWaterContent()
Returns:
int

getWaterContent

public int getWaterContent()
Returns:
int

_handleMessage

public void _handleMessage(AbstractWorldMessage m)
Overrides:
_handleMessage in class AbstractObjectPart
Parameters:
m -
See Also:
org.micropsi.comp.world.WorldMessageHandlerIF#handleMessage(WorldMessage)

init

public void init(World world)
Overrides:
init in class AbstractObject

initObjectParameters

protected void initObjectParameters()
Overrides:
initObjectParameters in class AbstractObject

setGrowRate

public void setGrowRate(double growRate)
Sets the growRate.

Parameters:
growRate - The growRate to set

setMaxHeight

public void setMaxHeight(double maxHight)
Sets the maxHeight.


setMaxWaterContent

public void setMaxWaterContent(int maxWater)
Sets the maxWather.


setWaterContent

public void setWaterContent(int waterContent)
Sets the actWather.


toString

public java.lang.String toString()
Overrides:
toString in class AbstractObject

(c) by Micropsi Project: http://www.cognitive-agents.org

.