Mercator
|
The edge of an area. More...
Public Member Functions | |
Edge (const Point2 &a, const Point2 &b) | |
Constructor. More... | |
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. | |
WFMath::CoordType | xValueAtY (WFMath::CoordType y) const |
Determine the x coordinate at a given y coordinate. More... | |
bool | operator< (const Edge &other) const |
Compare the y coordinate of the start with another edge. More... | |
Private Attributes | |
Point2 | m_start |
The point describing the start of the edge. | |
Vector2 | m_seg |
The vector describing the edge from its start. | |
WFMath::CoordType | m_inverseGradient |
The inverse of the gradient of the line. | |
The edge of an area.
|
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.
|
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.
|
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()().