mercator  0.4.0
A terrain generation library for the Worldforge system.
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. More...
 
Point2 end () const
 Determine the point describing the end of the edge. More...
 
WFMath::CoordType xValueAtZ (WFMath::CoordType z) 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...
 

Detailed Description

The edge of an area.

Definition at line 32 of file AreaShader.cpp.

Constructor & Destructor Documentation

◆ Edge()

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.

Definition at line 39 of file AreaShader.cpp.

Member Function Documentation

◆ end()

Point2 Mercator::Edge::end ( ) const
inline

Determine the point describing the end of the edge.

Definition at line 60 of file AreaShader.cpp.

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

◆ 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.

Definition at line 78 of file AreaShader.cpp.

◆ start()

Point2 Mercator::Edge::start ( ) const
inline

Accessor for the point describing the start of the edge.

Definition at line 58 of file AreaShader.cpp.

◆ xValueAtZ()

WFMath::CoordType Mercator::Edge::xValueAtZ ( WFMath::CoordType  z) 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
zthe y coordinate where the calculation is required.

Definition at line 67 of file AreaShader.cpp.

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


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