public class Point extends com.badlogic.gdx.math.Vector2 implements Positionable
Vector2 with some utility methods| Constructor and Description |
|---|
Point() |
Point(float x,
float y) |
Point(Point point) |
| Modifier and Type | Method and Description |
|---|---|
com.badlogic.gdx.math.Vector2 |
add(float x,
float y) |
com.badlogic.gdx.math.Vector2 |
add(com.badlogic.gdx.math.Vector2 v) |
<T extends Positionable> |
addPostionChangeListener(PositionChangeListener<T> listener) |
com.badlogic.gdx.math.Vector2 |
div(float x,
float y) |
com.badlogic.gdx.math.Vector2 |
div(com.badlogic.gdx.math.Vector2 v) |
boolean |
equals(Point p) |
float |
getDistanceTo(Positionable positionable) |
float |
getX() |
float |
getY() |
boolean |
isOnLineBetween(Point a,
Point b)
Returns if this
Point is between a and b on a line |
com.badlogic.gdx.math.Vector2 |
mul(float scalar) |
com.badlogic.gdx.math.Vector2 |
mul(float x,
float y) |
<T extends Positionable> |
removePositionChangeListener(PositionChangeListener<T> listener) |
void |
rotateAround(Point center,
float degrees)
|
com.badlogic.gdx.math.Vector2 |
set(float x,
float y) |
com.badlogic.gdx.math.Vector2 |
set(com.badlogic.gdx.math.Vector2 v) |
com.badlogic.gdx.math.Vector2 |
sub(float x,
float y) |
com.badlogic.gdx.math.Vector2 |
sub(com.badlogic.gdx.math.Vector2 v) |
public Point()
public Point(float x,
float y)
public Point(Point point)
public void rotateAround(Point center, float degrees)
center - The Point to rotate arounddegrees - The angle to rotate by in degreespublic boolean isOnLineBetween(Point a, Point b)
Point is between a and b on a linepublic boolean equals(Point p)
public <T extends Positionable> void addPostionChangeListener(PositionChangeListener<T> listener)
addPostionChangeListener in interface Positionablepublic <T extends Positionable> void removePositionChangeListener(PositionChangeListener<T> listener)
removePositionChangeListener in interface Positionablepublic float getDistanceTo(Positionable positionable)
getDistanceTo in interface Positionablepublic float getX()
getX in interface Positionablepublic float getY()
getY in interface Positionablepublic com.badlogic.gdx.math.Vector2 set(float x,
float y)
set in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 set(com.badlogic.gdx.math.Vector2 v)
set in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 add(float x,
float y)
add in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 add(com.badlogic.gdx.math.Vector2 v)
add in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 sub(float x,
float y)
sub in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 sub(com.badlogic.gdx.math.Vector2 v)
sub in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 mul(float x,
float y)
mul in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 mul(float scalar)
mul in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 div(float x,
float y)
div in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 div(com.badlogic.gdx.math.Vector2 v)
div in class com.badlogic.gdx.math.Vector2Copyright © 2014. All rights reserved.