|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.math.Circle
public class Circle
A convenient 2D circle class.
Field Summary | |
---|---|
float |
radius
|
float |
x
|
float |
y
|
Constructor Summary | |
---|---|
Circle()
Constructs a new circle with all values set to zero |
|
Circle(Circle circle)
|
|
Circle(float x,
float y,
float radius)
|
|
Circle(Vector2 position,
float radius)
|
Method Summary | |
---|---|
boolean |
contains(Circle c)
|
boolean |
contains(float x,
float y)
|
boolean |
contains(Vector2 point)
|
boolean |
overlaps(Circle c)
|
void |
set(Circle circle)
|
void |
set(float x,
float y,
float radius)
|
void |
set(Vector2 position,
float radius)
|
void |
setPosition(float x,
float y)
Sets the x and y-coordinates of circle center |
void |
setPosition(Vector2 position)
Sets the x and y-coordinates of circle center from vector |
void |
setRadius(float radius)
Sets the radius of circle |
void |
setX(float x)
Sets the x-coordinate of circle center |
void |
setY(float y)
Sets the y-coordinate of circle center |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public float x
public float y
public float radius
Constructor Detail |
---|
public Circle()
public Circle(float x, float y, float radius)
public Circle(Vector2 position, float radius)
public Circle(Circle circle)
Method Detail |
---|
public void set(float x, float y, float radius)
public void set(Vector2 position, float radius)
public void set(Circle circle)
public void setPosition(Vector2 position)
position
- The position vectorpublic void setPosition(float x, float y)
x
- The x-coordinatey
- The y-coordinatepublic void setX(float x)
x
- The x-coordinatepublic void setY(float y)
y
- The y-coordinatepublic void setRadius(float radius)
radius
- The radiuspublic boolean contains(float x, float y)
public boolean contains(Vector2 point)
public boolean contains(Circle c)
c
- the other Circle
public boolean overlaps(Circle c)
c
- the other Circle
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |