Package com.prineside.tdi2.utils
Class FlowField
java.lang.Object
com.prineside.tdi2.utils.FlowField
- All Implemented Interfaces:
FollowFlowField.FlowField<Vector2>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
getDirection
(int x, int y) int
int
getWidth()
Returns the flow vector for the specified position in space.void
setDirection
(int x, int y, float dX, float dY)
-
Constructor Details
-
FlowField
public FlowField(int width, int height, float cellSize)
-
-
Method Details
-
getHeight
public int getHeight() -
getWidth
public int getWidth() -
getCellSize
public float getCellSize() -
setDirection
public void setDirection(int x, int y, float dX, float dY) -
getDirection
-
lookup
Description copied from interface:com.badlogic.gdx.ai.steer.behaviors.FollowFlowField.FlowField
Returns the flow vector for the specified position in space.- Specified by:
lookup
in interfaceFollowFlowField.FlowField<Vector2>
- Parameters:
p
- the position to map
-