net.aerith.misao.util
Class CircumArea

java.lang.Object
  |
  +--net.aerith.misao.util.CircumArea

public class CircumArea
extends java.lang.Object

The CircumArea represents a circumscribed area around the specified circle on the celestial sphere, which consists of the maximum and minimum value of R.A. and Decl. of the specified circle.


Field Summary
private  Coor center_coor
          The R.A.
private  double center_decl_near_pole
          The Decl.
private  double corner_decl_far_pole
          The Decl.
private  double corner_decl_near_pole
          The Decl.
private  double decl_most_north
          The Decl.
private  double decl_most_south
          The Decl.
private static double sqrt2
          The sqrt(2).
private  double width_in_RA
          The difference between maximum R.A.
 
Constructor Summary
CircumArea(Coor coor, double radius)
          Constructs a CircumArea of the specified circle.
 
Method Summary
 double getDeclMostNorth()
          Gets the Decl.
 double getDeclMostSouth()
          Gets the Decl.
 double getWidthInRA()
          Gets the difference between maximum R.A.
 boolean inArea(Coor coor)
          Judges if the specified R.A.
 boolean overlapsArea(Coor start_coor, Coor end_coor)
          Judges if the specified rectangle area is overlapping on this CircumArea.
protected  java.lang.String paramString()
          Returns a raw string representation of the state of this object, for debugging use.
 java.lang.String toString()
          Returns a string representation of the state of this object, for debugging use.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

center_coor

private Coor center_coor
The R.A. and Decl. of the center.

center_decl_near_pole

private double center_decl_near_pole
The Decl. of the center point on the line near to the pole.

corner_decl_near_pole

private double corner_decl_near_pole
The Decl. of the corner near to the pole.

corner_decl_far_pole

private double corner_decl_far_pole
The Decl. of the corner far from the pole.

decl_most_north

private double decl_most_north
The Decl. of most to the north.

decl_most_south

private double decl_most_south
The Decl. of most to the south.

width_in_RA

private double width_in_RA
The difference between maximum R.A. and minimum R.A.

sqrt2

private static final double sqrt2
The sqrt(2).
Constructor Detail

CircumArea

public CircumArea(Coor coor,
                  double radius)
Constructs a CircumArea of the specified circle. All the parameters required to judge area overlapping, etc. are calculated in this constructor.
Parameters:
coor - the R.A. and Decl. of the center.
radius - the radius of the circle in degree.
Method Detail

getDeclMostNorth

public double getDeclMostNorth()
Gets the Decl. of most to the north.
Returns:
the Decl. of most to the north.

getDeclMostSouth

public double getDeclMostSouth()
Gets the Decl. of most to the south.
Returns:
the Decl. of most to the south.

getWidthInRA

public double getWidthInRA()
Gets the difference between maximum R.A. and minimum R.A.
Returns:
the difference between maximum R.A. and minimum R.A.

overlapsArea

public boolean overlapsArea(Coor start_coor,
                            Coor end_coor)
Judges if the specified rectangle area is overlapping on this CircumArea.
Parameters:
start_coor - the R.A. and Decl. of the minimal corner.
end_coor - the R.A. and Decl. of the maximal corner.
Returns:
true if the specified rectangle is overlapping.

inArea

public boolean inArea(Coor coor)
Judges if the specified R.A. and Decl. is within this CircumArea.
Parameters:
coor - the R.A. and Decl. to judge.
Returns:
true if the specified R.A. and Decl. is within this area.

paramString

protected java.lang.String paramString()
Returns a raw string representation of the state of this object, for debugging use.
Returns:
a string representation of the state of this object.

toString

public java.lang.String toString()
Returns a string representation of the state of this object, for debugging use.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the state of this object.