public class VelocityField extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected float |
cellSize |
protected org.lwjgl.util.vector.Vector2f[][] |
field |
static float |
RAD_PER_DEG |
| Constructor and Description |
|---|
VelocityField(int width,
int height,
float cellSize) |
| Modifier and Type | Method and Description |
|---|---|
org.lwjgl.util.vector.Vector2f |
getCell(int i,
int j) |
float |
getCellSize() |
org.lwjgl.util.vector.Vector2f[][] |
getField() |
org.lwjgl.util.vector.Vector2f |
getVelocity(float x,
float y,
org.lwjgl.util.vector.Vector2f bottomLeft,
float angle) |
boolean |
isInsideField(float x,
float y,
org.lwjgl.util.vector.Vector2f bottomLeft,
float angle) |
static org.lwjgl.util.vector.Vector2f |
rotateAroundOrigin(org.lwjgl.util.vector.Vector2f v,
float cos,
float sin) |
void |
shiftDown() |
static void |
spawnTest() |
void |
updateCacheIfNeeded(float angle) |
public static float RAD_PER_DEG
protected org.lwjgl.util.vector.Vector2f[][] field
protected float cellSize
public VelocityField(int width, int height, float cellSize)
public static org.lwjgl.util.vector.Vector2f rotateAroundOrigin(org.lwjgl.util.vector.Vector2f v, float cos, float sin)
public org.lwjgl.util.vector.Vector2f[][] getField()
public org.lwjgl.util.vector.Vector2f getCell(int i, int j)
public boolean isInsideField(float x, float y, org.lwjgl.util.vector.Vector2f bottomLeft, float angle)
public void updateCacheIfNeeded(float angle)
public org.lwjgl.util.vector.Vector2f getVelocity(float x, float y, org.lwjgl.util.vector.Vector2f bottomLeft, float angle)
public float getCellSize()
public void shiftDown()
public static void spawnTest()