Mercator
Public Member Functions | Private Attributes | List of all members
Mercator::Edge Class Reference

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.
 

Detailed Description

The edge of an area.

Constructor & Destructor Documentation

Mercator::Edge::Edge ( const Point2 &  a,
const Point2 &  b 
)
inline

Constructor.

Parameters
aone end of the line defining the edge.
bone end of the line defining the edge.

References m_inverseGradient, m_seg, and m_start.

Member Function Documentation

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.

WFMath::CoordType Mercator::Edge::xValueAtY ( WFMath::CoordType  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.

Parameters
ythe y coordinate where the calculation is required.

References m_inverseGradient, and m_start.

Referenced by Mercator::EdgeAtY::operator()().


The documentation for this class was generated from the following file: