Class FieldModel
- java.lang.Object
-
- jadex.bdi.examples.hunterprey.ldahunter.potentialfield.FieldModel
-
public final class FieldModel extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FieldModel(int w, int h)Constructor:FieldModel.
-
Method Summary
All 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
-
getNearerLocation
public 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
-
calcDistance
public void calcDistance(int mx, int my)- Parameters:
mx- - from xmy- - from y
-
goR
protected final int goR(int x, int y, int d)- Parameters:
x-y-d-- Returns:
- own distance
-
goD
protected final int goD(int x, int y, int d)- Parameters:
x-y-d-- Returns:
- own distance
-
goL
protected final int goL(int x, int y, int d)- Parameters:
x-y-d-- Returns:
- own distance
-
goU
protected final int goU(int x, int y, int d)- Parameters:
x-y-d-- Returns:
- own distance
-
clearDistance
public void clearDistance()
clears the first buffer
-
clearRange
public void clearRange(int x, int y, int r, int round)- Parameters:
x-y-r-round-
-
-