cds.astro
Class ConvexRegion

java.lang.Object
  extended by cds.astro.AbstractRegion
      extended by cds.astro.Region
          extended by cds.astro.ConvexRegion
All Implemented Interfaces:
java.io.Serializable

public class ConvexRegion
extends Region

Convex Target (e.g. Rectangle, polygon) return a Vector with marked Qboxes

See Also:
Serialized Form

Field Summary
 
Fields inherited from class cds.astro.AbstractRegion
centroid, DISJOINT, INCLUDES, INTERSECTS, IS_PARTOF, maxrad, minrad
 
Method Summary
 double area()
          Area of a polygon
 int checkCircle(Coo point, double r)
          Verify a circle intersects a Convex polygon
 boolean checkCoo(Coo point)
          Verify point within Polygon
 int checkQbox(int qbox)
          Verify intersection Qbox + Convex (polygon)
 java.lang.String toString()
          Edition of a Region
 
Methods inherited from class cds.astro.Region
box, circle, ellipse, ellipse, polygon, rotatedBox, zone, zone
 
Methods inherited from class cds.astro.AbstractRegion
check1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public final java.lang.String toString()
Edition of a Region

Overrides:
toString in class Region
Returns:
ascii equivalent

area

public double area()
Area of a polygon

Overrides:
area in class Region
Returns:
Area, in square degrees.

checkCoo

public boolean checkCoo(Coo point)
Verify point within Polygon

Overrides:
checkCoo in class Region
Parameters:
point - a position
Returns:
true if point within region.

checkCircle

public int checkCircle(Coo point,
                       double r)
Verify a circle intersects a Convex polygon

Overrides:
checkCircle in class Region
Parameters:
point - center of circle
r - radius of circle
Returns:
DISJOINT / INTERSECTS / INCLUDES. / IS_PARTOF for no intersection / overlap / cercle fully included in Convex

checkQbox

public int checkQbox(int qbox)
Verify intersection Qbox + Convex (polygon)

Overrides:
checkQbox in class AbstractRegion
Parameters:
qbox - the Qbox to check
Returns:
DISJOINT / INCLUDES / INTERSECTS / IS_PARTOF