public class Circle
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
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) |
Modifier and Type | Method and Description |
---|---|
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
|
java.lang.String |
toString() |
public Circle()
public Circle(float x, float y, float radius)
public Circle(Vector2 position, float radius)
public Circle(Circle circle)
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 java.lang.String toString()
toString
in class java.lang.Object