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