|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsource.ucregents.playground.physics.PolygonOrCircle
public class PolygonOrCircle
Constructor Summary | |
---|---|
PolygonOrCircle()
|
|
PolygonOrCircle(double[] xyCoords)
|
|
PolygonOrCircle(double[] xCoords,
double[] yCoords,
int nPoints)
|
|
PolygonOrCircle(double x,
double y,
double radius)
|
|
PolygonOrCircle(double x,
double y,
double width,
double height)
|
|
PolygonOrCircle(java.awt.geom.Point2D upperLeft,
double radius)
|
|
PolygonOrCircle(java.util.Vector<? extends java.awt.geom.Point2D> points)
|
Method Summary | |
---|---|
void |
calculateCentroid()
Calculates the centroid |
java.lang.Object |
clone()
|
double |
getArea()
Calculates the area of the polygon |
java.awt.geom.Rectangle2D |
GetBoundingBox()
|
double |
getCenterX()
|
double |
getCenterY()
|
java.awt.geom.Point2D |
getCentroid()
Returns the centroid for the polygon |
java.awt.Shape |
getShape()
|
double |
getX()
|
double |
getY()
|
boolean |
isCircle()
|
boolean |
isPolygon()
|
void |
Rotate(double degrees)
|
void |
RotateRadians(double radians)
|
java.awt.geom.Point2D.Double |
Scale(double s)
A fixed ratio scale of the PolygonOrCircle around the UL Point |
void |
ScaleAroundCenter(double s)
|
void |
Translate(double x,
double y)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PolygonOrCircle()
public PolygonOrCircle(double[] xyCoords)
public PolygonOrCircle(double[] xCoords, double[] yCoords, int nPoints)
public PolygonOrCircle(double x, double y, double radius)
public PolygonOrCircle(double x, double y, double width, double height)
public PolygonOrCircle(java.awt.geom.Point2D upperLeft, double radius)
public PolygonOrCircle(java.util.Vector<? extends java.awt.geom.Point2D> points)
Method Detail |
---|
public void calculateCentroid()
public java.lang.Object clone()
clone
in class java.lang.Object
public double getArea()
public java.awt.geom.Rectangle2D GetBoundingBox()
public double getCenterX()
public double getCenterY()
public java.awt.geom.Point2D getCentroid()
public java.awt.Shape getShape()
public double getX()
public double getY()
public boolean isCircle()
public boolean isPolygon()
public void Rotate(double degrees)
public void RotateRadians(double radians)
public java.awt.geom.Point2D.Double Scale(double s)
s
- The Scalar to scale it by
public void ScaleAroundCenter(double s)
public void Translate(double x, double y)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |