|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.curve.GenericDomain2D
public class GenericDomain2D
A domain defined from its boundary. The boundary curve must be correctly oriented, non self intersecting, and clearly separating interior and exterior.
All contains and intersect tests are computed from the signed distance of the boundary curve.
| Field Summary | |
|---|---|
protected Boundary2D |
boundary
|
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY, defaultClipWindow, EMPTY_SET |
| Constructor Summary | |
|---|---|
GenericDomain2D(Boundary2D boundary)
|
|
| Method Summary | |
|---|---|
Shape2D |
clip(Box2D box)
Clip the shape with the given box, and returns a new shape. |
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
boolean |
contains(java.awt.geom.Point2D p)
|
boolean |
contains(java.awt.geom.Rectangle2D rect)
|
Boundary2D |
getBoundary()
returns the boundary of the set. |
Box2D |
getBoundingBox()
Returns the bounding box of the shape. |
java.awt.Rectangle |
getBounds()
Return bounding box of the shape. |
java.awt.geom.Rectangle2D |
getBounds2D()
Return more precise bounds for the shape. |
Shape2D |
getClippedShape(Box2D box)
|
double |
getDistance(double x,
double y)
get the distance of the shape to the given point, specified by x and y, or the distance of point to the frontier of the shape in the case of a plain (i.e. fillable) shape. |
double |
getDistance(java.awt.geom.Point2D p)
get the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape. |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
|
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
intersects(java.awt.geom.Rectangle2D rect)
|
boolean |
isBounded()
return always true. |
GenericDomain2D |
transform(AffineTransform2D trans)
return a new domain which is created from the transformed domain of this boundary. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Boundary2D boundary
| Constructor Detail |
|---|
public GenericDomain2D(Boundary2D boundary)
| Method Detail |
|---|
public Boundary2D getBoundary()
Domain2DThe returned curve is oriented, with an interior and an exterior.
getBoundary in interface Domain2Dpublic double getDistance(java.awt.geom.Point2D p)
Shape2D
getDistance in interface Shape2D
public double getDistance(double x,
double y)
Shape2D
getDistance in interface Shape2Dpublic boolean isBounded()
isBounded in interface Shape2Dpublic Shape2D getClippedShape(Box2D box)
public Shape2D clip(Box2D box)
Shape2D
clip in interface Shape2Dbox - the clipping box
public Box2D getBoundingBox()
Shape2D
getBoundingBox in interface Shape2Dpublic GenericDomain2D transform(AffineTransform2D trans)
transform in interface Shape2Dtrans - an affine transform
public boolean contains(double x,
double y)
contains in interface java.awt.Shape
public boolean contains(double x,
double y,
double w,
double h)
contains in interface java.awt.Shape
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface java.awt.Shapepublic java.awt.Rectangle getBounds()
getBounds in interface java.awt.Shapepublic java.awt.geom.Rectangle2D getBounds2D()
getBounds2D in interface java.awt.Shapepublic boolean contains(java.awt.geom.Point2D p)
contains in interface java.awt.Shapepublic boolean contains(java.awt.geom.Rectangle2D rect)
contains in interface java.awt.Shapepublic boolean intersects(java.awt.geom.Rectangle2D rect)
intersects in interface java.awt.Shapepublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans)
getPathIterator in interface java.awt.Shape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform trans,
double flatness)
getPathIterator in interface java.awt.Shape
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||