Class FlowField

java.lang.Object
com.prineside.tdi2.utils.FlowField
All Implemented Interfaces:
com.badlogic.gdx.ai.steer.behaviors.FollowFlowField.FlowField<com.badlogic.gdx.math.Vector2>

public final class FlowField extends Object implements com.badlogic.gdx.ai.steer.behaviors.FollowFlowField.FlowField<com.badlogic.gdx.math.Vector2>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    FlowField(int width, int height, float cellSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    com.badlogic.gdx.math.Vector2
    getDirection(int x, int y)
     
    int
     
    int
     
    com.badlogic.gdx.math.Vector2
    lookup(com.badlogic.gdx.math.Vector2 p)
    Returns the flow vector for the specified position in space.
    void
    setDirection(int x, int y, float dX, float dY)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public com.badlogic.gdx.math.Vector2 getDirection(int x, int y)
    • lookup

      public com.badlogic.gdx.math.Vector2 lookup(com.badlogic.gdx.math.Vector2 p)
      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 interface com.badlogic.gdx.ai.steer.behaviors.FollowFlowField.FlowField<com.badlogic.gdx.math.Vector2>
      Parameters:
      p - the position to map