com.planeth.common.geom
Class Ellipse

java.lang.Object
  extended bycom.planeth.common.geom.Shape
      extended bycom.planeth.common.geom.Ellipse
Direct Known Subclasses:
RegularPolygon

public class Ellipse
extends Shape

An Ellipse Shape

Author:
Andreas Grässer, gal@planet-h.com.
created May 23, 2005

Nested Class Summary
 
Nested classes inherited from class com.planeth.common.geom.Shape
Shape.Bounds
 
Constructor Summary
  Ellipse()
          Constructor for Ellipse.
  Ellipse(double diam)
          Constructor for Ellipse.
  Ellipse(double width, double height)
          Constructor for Ellipse.
  Ellipse(Vector2D size)
          Constructor for Ellipse.
protected Ellipse(Vector2D size, int nrOfVertexes)
          Constructor for Ellipse.
 
Methods inherited from class com.planeth.common.geom.Shape
explode, getBounds, getColor, getVertexes, paint, randomize, setColor, setFilled, setVertexes, setVisible, split
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ellipse

public Ellipse()
Constructor for Ellipse.
Creates an Ellipse with random size.
The number of vertexes used for the ellipse depends on the size.


Ellipse

public Ellipse(double diam)
Constructor for Ellipse.
The number of vertexes used for the ellipse depends on the size

Parameters:
diam - the diameter of the ellipse

Ellipse

public Ellipse(double width,
               double height)
Constructor for Ellipse.
The number of vertexes used for the ellipse depends on the size

Parameters:
width - the width of the ellipse
height - the height of the ellipse

Ellipse

public Ellipse(Vector2D size)
Constructor for Ellipse.
The number of vertexes used for the ellipse depends on the size

Parameters:
size - the size of the ellipse

Ellipse

protected Ellipse(Vector2D size,
                  int nrOfVertexes)
Constructor for Ellipse.

Parameters:
size - the size of the ellipse
nrOfVertexes - the preferred number of vertexes for the ellipse