public class Transform
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
COS |
static int |
POS_X |
static int |
POS_Y |
static int |
SIN |
float[] |
vals |
| Constructor and Description |
|---|
Transform() |
Transform(Vector2 position,
float angle)
Constructs a new Transform instance with the given position and angle
|
Transform(Vector2 position,
Vector2 orientation)
Constructs a new Transform instance with the given position and orientation
|
| Modifier and Type | Method and Description |
|---|---|
Vector2 |
getOrientation() |
Vector2 |
getPosition() |
float |
getRotation() |
Vector2 |
mul(Vector2 v)
Transforms the given vector by this transform
|
void |
setOrientation(Vector2 orientation)
Set where the body should "look at"
|
void |
setPosition(Vector2 pos)
Sets the position of this transform
|
void |
setRotation(float angle)
Sets the rotation of this transform
|
public static final int POS_X
public static final int POS_Y
public static final int COS
public static final int SIN
public float[] vals
public Transform()
public Transform(Vector2 position, float angle)
position - the positionangle - the angle in radianspublic Vector2 mul(Vector2 v)
v - the vectorpublic Vector2 getPosition()
public void setRotation(float angle)
angle - angle in radianspublic float getRotation()
public Vector2 getOrientation()
public void setOrientation(Vector2 orientation)
public void setPosition(Vector2 pos)
pos - the position