Class FieldModel
- java.lang.Object
- 
- jadex.bdi.examples.hunterprey.ldahunter.potentialfield.FieldModel
 
- 
 public final class FieldModel extends java.lang.Object
- 
- 
Constructor SummaryConstructors Constructor Description FieldModel(int w, int h)Constructor:FieldModel.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalcDistance(int mx, int my)voidclearDistance()clears the first buffervoidclearRange(int x, int y, int r, int round)booleangetNearerLocation(IVector2 loc)protected intgoD(int x, int y, int d)protected intgoL(int x, int y, int d)protected intgoR(int x, int y, int d)protected intgoU(int x, int y, int d)
 
- 
- 
- 
Method Detail- 
getNearerLocationpublic final boolean getNearerLocation(IVector2 loc) - Parameters:
- loc- the location the values should be stored to (in, out)
- Returns:
- false if this location has distance <= 0, true if location changed
 
 - 
calcDistancepublic void calcDistance(int mx, int my)- Parameters:
- mx- - from x
- my- - from y
 
 - 
goRprotected final int goR(int x, int y, int d)- Parameters:
- x-
- y-
- d-
- Returns:
- own distance
 
 - 
goDprotected final int goD(int x, int y, int d)- Parameters:
- x-
- y-
- d-
- Returns:
- own distance
 
 - 
goLprotected final int goL(int x, int y, int d)- Parameters:
- x-
- y-
- d-
- Returns:
- own distance
 
 - 
goUprotected final int goU(int x, int y, int d)- Parameters:
- x-
- y-
- d-
- Returns:
- own distance
 
 - 
clearDistancepublic void clearDistance() clears the first buffer
 - 
clearRangepublic void clearRange(int x, int y, int r, int round)- Parameters:
- x-
- y-
- r-
- round-
 
 
- 
 
-