public class Point
extends com.badlogic.gdx.math.Vector2
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(com.badlogic.gdx.math.Vector2 v) |
Point |
copy() |
boolean |
equals(float x,
float y,
float delta)
Determines if a coordinate is nearly equal to this one.
|
boolean |
equals(com.badlogic.gdx.math.Vector2 v)
Determines if another
Vector2 is exactly equal to this one |
boolean |
equals(com.badlogic.gdx.math.Vector2 v,
float delta)
Determines if this and a
Vector2 are nearly equal. |
float |
getDistanceTo(float x,
float y) |
float |
getDistanceTo(Point point) |
float |
getX() |
float |
getY() |
boolean |
isOnLineBetween(Point a,
Point b)
Returns if this
Point is between a and b on a line |
void |
rotateAround(float centerX,
float centerY,
float degrees)
Rotates this
Point around a coordinate |
void |
rotateAround(Point center,
float degrees)
|
com.badlogic.gdx.math.Vector2 |
set(com.badlogic.gdx.math.Vector2 v) |
void |
setX(float x) |
void |
setY(float y) |
com.badlogic.gdx.math.Vector2 |
sub(com.badlogic.gdx.math.Vector2 v) |
add, angle, angle, angleRad, angleRad, clamp, cpy, crs, crs, dot, dot, dot, dst, dst, dst, dst2, dst2, dst2, epsilonEquals, epsilonEquals, equals, fromString, hashCode, hasOppositeDirection, hasSameDirection, interpolate, isCollinear, isCollinear, isCollinearOpposite, isCollinearOpposite, isOnLine, isOnLine, isPerpendicular, isPerpendicular, isUnit, isUnit, isZero, isZero, len, len, len2, len2, lerp, limit, limit2, mul, mulAdd, mulAdd, nor, rotate, rotate90, rotateRad, scl, scl, scl, set, setAngle, setAngleRad, setLength, setLength2, setToRandomDirection, setZero, sub, toStringpublic Point()
public Point(float x,
float y)
public Point(Point point)
public float getDistanceTo(Point point)
public float getDistanceTo(float x,
float y)
public void rotateAround(Point center, float degrees)
center - The Point to rotate arounddegrees - The angle to rotate by in degreespublic void rotateAround(float centerX,
float centerY,
float degrees)
Point around a coordinatecenterX - The x coordinate to rotate aroundcenterY - The y coordinate 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(com.badlogic.gdx.math.Vector2 v)
Vector2 is exactly equal to this onev - The Vector2 to compare toVector2s x and y are exactly equalpublic boolean equals(com.badlogic.gdx.math.Vector2 v,
float delta)
Vector2 are nearly equal. A delta of 0.1
means 0.0 and 0.1 would be considered equal but 0.0 and 0.11 would not.v - The Vector2 to compare todelta - The amount of error to allow for.public boolean equals(float x,
float y,
float delta)
x - The x coordinatey - The y coordinatedelta - The amount of error to allow for.public float getX()
public float getY()
public void setX(float x)
public void setY(float y)
public com.badlogic.gdx.math.Vector2 set(com.badlogic.gdx.math.Vector2 v)
set in interface com.badlogic.gdx.math.Vector<com.badlogic.gdx.math.Vector2>set in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 add(com.badlogic.gdx.math.Vector2 v)
add in interface com.badlogic.gdx.math.Vector<com.badlogic.gdx.math.Vector2>add in class com.badlogic.gdx.math.Vector2public com.badlogic.gdx.math.Vector2 sub(com.badlogic.gdx.math.Vector2 v)
sub in interface com.badlogic.gdx.math.Vector<com.badlogic.gdx.math.Vector2>sub in class com.badlogic.gdx.math.Vector2public Point copy()