27#ifndef GSKYREGIONRECTANGLE_HPP
28#define GSKYREGIONRECTANGLE_HPP
90 double ra(
void)
const;
91 double dec(
void)
const;
92 const double&
width(
void)
const;
94 const double&
height(
void)
const;
96 const double&
posang(
void)
const;
99 void read(
const std::string& line);
100 std::string
write(
void)
const;
132 return (
"GSkyRegionRectangle");
Sky direction class interface definition.
Abstract sky region base class interface definition.
double dec_deg(void) const
Returns Declination in degrees.
double ra_deg(void) const
Returns Right Ascension in degrees.
void radec_deg(const double &ra, const double &dec)
Set equatorial sky direction (degrees)
Interface for the rectangular sky region class.
GSkyDir local_to_dir(const GSkyPixel &local) const
Transform local rectangle coordinates to sky direction.
void copy_members(const GSkyRegionRectangle ®ion)
Copy class members.
GSkyDir m_centre
Centre or reference point of the region.
void init_members(void)
Initialise class members.
double dec(void) const
Return rectangular region centre Declination.
void read(const std::string &line)
Read region from DS9 string.
double m_width
Width of the region (degrees)
const double & height(void) const
Return region height extension (in degrees)
GSkyRegionRectangle(void)
Void constructor.
double ra(void) const
Return rectangular region centre Right Ascension.
bool overlaps(const GSkyRegion ®) const
Checks if region is overlapping with this region.
std::string print(const GChatter &chatter=NORMAL) const
Print rectangular region.
std::string write(void) const
Write region into a string.
void free_members(void)
Delete class members.
void compute_solid_angle(void)
Compute solid angle of rectangle.
virtual ~GSkyRegionRectangle(void)
Destructor.
std::string classname(void) const
Return class name.
const double & posang(void) const
Return region position angle (in degrees)
GSkyPixel dir_to_local(const GSkyDir &dir) const
Transform sky direction to local rectangle coordinates.
double m_posang
Position angle, counterclockwise from North (degrees)
bool contains(const GSkyDir &dir) const
Checks if sky direction lies within region.
void clear(void)
Clear instance.
const double & width(void) const
Return region width extension (in degrees)
GSkyRegionRectangle * clone(void) const
Clone rectangular sky region.
const GSkyDir & centre(void) const
Return rectangular region centre.
GSkyDir corner(const int &index) const
Return sky direction of one corner of the rectangle.
GSkyRegionRectangle & operator=(const GSkyRegionRectangle ®ion)
Assignment operator.
double m_height
Height of the region (degrees)
Abstract interface for the sky region class.