mercator 0.4.0
A terrain generation library for the Worldforge system.
Mercator::TopClip Struct Reference

Helper to clip points to a given range. More...

Collaboration diagram for Mercator::TopClip:

Public Member Functions

 TopClip (CoordType t)
 
bool inside (const Point2 &p) const
 Check a point is outside this clip. More...
 
Point2 clip (const Point2 &u, const Point2 &v) const
 Determine the point where a line crosses this clip. More...
 

Public Attributes

CoordType topZ
 Top of z range. More...
 

Detailed Description

Helper to clip points to a given range.

Definition at line 34 of file Area.cpp.

Constructor & Destructor Documentation

◆ TopClip()

Mercator::TopClip::TopClip ( CoordType  t)
inlineexplicit

Constructor

Parameters
ttop of y range

Definition at line 39 of file Area.cpp.

Member Function Documentation

◆ clip()

Point2 Mercator::TopClip::clip ( const Point2 &  u,
const Point2 &  v 
) const
inline

Determine the point where a line crosses this clip.

Parameters
uone of of a line that crosses this clip
vone of of a line that crosses this clip
Returns
a point where the line cross this clip.

Definition at line 55 of file Area.cpp.

References topZ.

◆ inside()

bool Mercator::TopClip::inside ( const Point2 &  p) const
inline

Check a point is outside this clip.

Parameters
ppoint to be checked.
Returns
true if p is outside the clip.

Definition at line 45 of file Area.cpp.

References topZ.

Member Data Documentation

◆ topZ

CoordType Mercator::TopClip::topZ

Top of z range.

Definition at line 69 of file Area.cpp.

Referenced by clip(), and inside().


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