|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.geom.Vec2D
toxi.geom.Ellipse
toxi.geom.Circle
public class Circle
This class overrides Ellipse
to define a 2D circle and provides
several utility methods for it.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class toxi.geom.Vec2D |
---|
Vec2D.Axis |
Field Summary |
---|
Fields inherited from class toxi.geom.Vec2D |
---|
MAX_VALUE, MIN_VALUE, x, X_AXIS, y, Y_AXIS, ZERO |
Constructor Summary | |
---|---|
Circle()
|
|
Circle(Circle c)
|
|
Circle(float radius)
|
|
Circle(float x,
float y,
float radius)
|
|
Circle(Vec2D origin,
float radius)
|
Method Summary | |
---|---|
boolean |
containsPoint(Vec2D p)
|
float |
getCircumference()
Computes the approximate circumference of the ellipse, using this equation: 2 * PI * sqrt(1/2 * (rx*rx+ry*ry)) . |
float |
getRadius()
|
Vec2D[] |
getTangentPoints(Vec2D p)
|
Vec2D[] |
intersectsCircle(Circle c)
|
Circle |
setRadius(float r)
|
Methods inherited from class toxi.geom.Ellipse |
---|
getArea, getFoci, getRadii, setRadii, setRadii |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Circle()
public Circle(Circle c)
public Circle(float radius)
public Circle(float x, float y, float radius)
public Circle(Vec2D origin, float radius)
Method Detail |
---|
public boolean containsPoint(Vec2D p)
containsPoint
in class Ellipse
public float getCircumference()
Ellipse
2 * PI * sqrt(1/2 * (rx*rx+ry*ry))
.
The precise value is an infinite series elliptical integral, but the
approximation comes sufficiently close. See Wikipedia for more details:
http://en.wikipedia.org/wiki/Ellipse
getCircumference
in class Ellipse
public float getRadius()
public Vec2D[] getTangentPoints(Vec2D p)
public Vec2D[] intersectsCircle(Circle c)
public Circle setRadius(float r)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |