|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.geom.Shape
org.newdawn.slick.geom.Ellipse
public class Ellipse
An ellipse meeting the Shape contract. The ellipse is actually an approximation using
a series of points generated around the contour of the ellipse.
| Field Summary | |
|---|---|
protected static int |
DEFAULT_SEGMENT_COUNT
Default number of segments to draw this ellipse with |
| Fields inherited from class org.newdawn.slick.geom.Shape |
|---|
boundingCircleRadius, center, maxX, maxY, minX, minY, points, pointsDirty, trianglesDirty, tris, x, y |
| Constructor Summary | |
|---|---|
Ellipse(float centerPointX,
float centerPointY,
float radius1,
float radius2)
Creates a new Ellipse object. |
|
Ellipse(float centerPointX,
float centerPointY,
float radius1,
float radius2,
int segmentCount)
Creates a new Ellipse object. |
|
| Method Summary | |
|---|---|
protected void |
calculateRadius()
Calculate the radius of a circle that can completely enclose this shape. |
protected void |
createPoints()
Generate the points to outline this ellipse. |
protected void |
findCenter()
Get the center of this polygon. |
float |
getRadius1()
Get the horizontal radius of the ellipse |
float |
getRadius2()
Get the vertical radius of the ellipse |
void |
setRadii(float radius1,
float radius2)
Change the shape of this Ellipse |
void |
setRadius1(float radius1)
Set the horizontal radius of the ellipse |
void |
setRadius2(float radius2)
Set the vertical radius of the ellipse |
Shape |
transform(Transform transform)
Apply a transformation and return a new shape. |
| Methods inherited from class org.newdawn.slick.geom.Shape |
|---|
calculateTriangles, checkPoints, closed, contains, contains, getBoundingCircleRadius, getCenter, getCenterX, getCenterY, getHeight, getLocation, getMaxX, getMaxY, getMinX, getMinY, getNormal, getPoint, getPointCount, getPoints, getTriangles, getWidth, getX, getY, hasVertex, includes, increaseTriangulation, indexOf, intersects, preCache, prune, setCenterX, setCenterY, setLocation, setLocation, setX, setY, subtract, union |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int DEFAULT_SEGMENT_COUNT
| Constructor Detail |
|---|
public Ellipse(float centerPointX,
float centerPointY,
float radius1,
float radius2)
centerPointX - x coordinate of the center of the ellipsecenterPointY - y coordinate of the center of the ellipseradius1 - horizontal radiusradius2 - vertical radius
public Ellipse(float centerPointX,
float centerPointY,
float radius1,
float radius2,
int segmentCount)
centerPointX - x coordinate of the center of the ellipsecenterPointY - y coordinate of the center of the ellipseradius1 - horizontal radiusradius2 - vertical radiussegmentCount - how fine to make the ellipse.| Method Detail |
|---|
public void setRadii(float radius1,
float radius2)
radius1 - horizontal radiusradius2 - vertical radiuspublic float getRadius1()
public void setRadius1(float radius1)
radius1 - The horizontal radius to setpublic float getRadius2()
public void setRadius2(float radius2)
radius2 - The vertical radius to setprotected void createPoints()
createPoints in class Shapepublic Shape transform(Transform transform)
Shape
transform in class Shapetransform - The transform to be applied
Shape.transform(org.newdawn.slick.geom.Transform)protected void findCenter()
Shape
findCenter in class ShapeShape.findCenter()protected void calculateRadius()
Shape
calculateRadius in class ShapeShape.calculateRadius()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||