Public Member Functions | |
Edge (const Point2 &a, const Point2 &b) | |
Constructor. | |
Point2 | start () const |
Accessor for the point describing the start of the edge. | |
Point2 | end () const |
Determine the point describing the end of the edge. | |
double | xValueAtY (double y) const |
Determine the x coordinate at a given y coordinate. | |
bool | operator< (const Edge &other) const |
Compare the y coordinate of the start with another edge. | |
Private Attributes | |
Point2 | m_start |
The point describing the start of the edge. | |
Vector2 | m_seg |
The vector describing the edge from its start. | |
double | m_inverseGradient |
The inverse of the gradient of the line. |
Mercator::Edge::Edge | ( | const Point2 & | a, | |
const Point2 & | b | |||
) | [inline] |
Constructor.
a | one end of the line defining the edge. | |
b | one end of the line defining the edge. |
References m_inverseGradient, m_seg, and m_start.
double Mercator::Edge::xValueAtY | ( | double | y | ) | const [inline] |
Determine the x coordinate at a given y coordinate.
Calculate the x coordinate on the edge line where the y coordinate is the value specified.
y | the y coordinate where the calculation is required. |
References m_inverseGradient, and m_start.
Referenced by Mercator::EdgeAtY::operator()().
bool Mercator::Edge::operator< | ( | const Edge & | other | ) | const [inline] |
Compare the y coordinate of the start with another edge.
This operator ensures that edges can be sorted, compares the y y coordinate of the start of the edges.
References m_start.