public interface Transformable
BasicTransformable
class.Modifier and Type | Method and Description |
---|---|
Transform |
getInverseTransform()
Gets the inverse of the current transformation matrix.
|
Vector2f |
getOrigin()
Gets the origin of this object.
|
Vector2f |
getPosition()
Gets the position of this object.
|
float |
getRotation()
Gets the rotation angle of this object.
|
Vector2f |
getScale()
Gets the scaling of this object.
|
Transform |
getTransform()
Gets the current transformation matrix.
|
void |
move(float x,
float y)
Moves this object.
|
void |
move(Vector2f v)
Moves the object.
|
void |
rotate(float angle)
Rotates this object around its origin.
|
void |
scale(float x,
float y)
Scales the object, using its origin as the scaling center.
|
void |
scale(Vector2f factors)
Scales the object, using its origin as the scaling center.
|
void |
setOrigin(float x,
float y)
Sets the rotation, scaling and drawing origin of this object.
|
void |
setOrigin(Vector2f v)
Sets the rotation, scaling and drawing origin of this object.
|
void |
setPosition(float x,
float y)
Sets the position of this object in the scene so that its origin will be exactly on it.
|
void |
setPosition(Vector2f v)
Sets the position of this object in the scene so that its origin will be exactly on it.
|
void |
setRotation(float angle)
Sets the rotation of this object around its origin.
|
void |
setScale(float x,
float y)
Sets the scaling of this object, using its origin as the scaling center.
|
void |
setScale(Vector2f factors)
Sets the scaling of this object, using its origin as the scaling center.
|
void setPosition(float x, float y)
x
- the new X coordinate.y
- the new Y coordinate.void setPosition(Vector2f v)
v
- the new position.void setRotation(float angle)
angle
- the new rotation angle in degrees.void setScale(float x, float y)
x
- the new X scaling factor.y
- the new Y scaling factor.void setScale(Vector2f factors)
factors
- the new scaling factors.void setOrigin(float x, float y)
x
- the new X coordinate of the origin.y
- the new Y coordinate of the origin.void setOrigin(Vector2f v)
v
- the new origin.Vector2f getPosition()
float getRotation()
Vector2f getScale()
Vector2f getOrigin()
void move(float x, float y)
x
- the X offset added to the current position.y
- the Y offset added to the current position.void move(Vector2f v)
v
- the offset vector added to the current position.void rotate(float angle)
angle
- the rotation angle in degrees.void scale(float x, float y)
x
- the X scaling factor.y
- the Y scaling factor.void scale(Vector2f factors)
factors
- the scaling factors.Transform getTransform()
Transform getInverseTransform()