kstars
CSegment Class Reference
A segment of a constellation boundary. More...
#include <csegment.h>
Public Member Functions | |
void | addPoint (double ra, double dec) |
bool | borders (QString cname) |
CSegment () | |
SkyPoint * | firstNode () |
QString | name1 () const |
QString | name2 () const |
SkyPoint * | nextNode () |
QPtrList< SkyPoint > * | nodes () |
bool | setNames (QString n1, QString n2) |
~CSegment () |
Detailed Description
A segment of a constellation boundary.The segment consists of two or more SkyPoint "nodes" which are vertices of the boundary polygon. A single segment is define as the set of nodes that separates a single pair of constellations. An entire constellation boundary must consist of many segments, because each constellation is surrounded by multiple neighbors.
For example, imagine constellation A is surrounded by constellations B, C, and D. One CSegment (AB) will describe the boundary between A and B; another (AC) will describe the boundary between A and C; and a third (AD) will describe the boundary between A and D.
Definition at line 40 of file csegment.h.
Constructor & Destructor Documentation
CSegment::CSegment | ( | ) |
CSegment::~CSegment | ( | ) | [inline] |
Member Function Documentation
void CSegment::addPoint | ( | double | ra, | |
double | dec | |||
) |
Add a SkyPoint node to the boundary segment.
ra
the RA of the node dec
the Dec of the node
Definition at line 25 of file csegment.cpp.
bool CSegment::borders | ( | QString | cname | ) |
Determine if a given constellation borders this boundary segment cname
the IAU code of the constellation to be tested.
Definition at line 40 of file csegment.cpp.
SkyPoint* CSegment::firstNode | ( | ) | [inline] |
QString CSegment::name1 | ( | ) | const [inline] |
- Returns:
- the name of one of the constellations that borders this boundary segment.
Definition at line 56 of file csegment.h.
QString CSegment::name2 | ( | ) | const [inline] |
- Returns:
- the name of one of the constellations that borders this boundary segment.
Definition at line 61 of file csegment.h.
SkyPoint* CSegment::nextNode | ( | ) | [inline] |
- Returns:
- pointer to the next node in the segment. If we were on the last node, return the NULL pointer.
Definition at line 81 of file csegment.h.
Set the names of the bounding constellations.
Use the IAU three-letter abbreviations. n1
IAU name of one bounding constellation n2
IAU name of the other bounding constellation
Definition at line 30 of file csegment.cpp.
The documentation for this class was generated from the following files: