FlightGear next
flightgear::PolyLine Class Reference

#include <PolyLine.hxx>

Inherits SGReferenced.

Classes

class  TypeFilter
 

Public Types

enum  Type {
  INVALID = 0 , COASTLINE , NATIONAL_BOUNDARY , REGIONAL_BOUNDARY ,
  RIVER , LAKE , URBAN , LAST_TYPE
}
 

Public Member Functions

virtual ~PolyLine ()
 
Type type () const
 
unsigned int numPoints () const
 number of points in this line - at least two.
 
SGGeod point (unsigned int aIndex) const
 
const SGGeodVecpoints () const
 
SGBoxd cartesianBox () const
 
void addToSpatialIndex () const
 

Static Public Member Functions

static PolyLineList createChunked (Type aTy, const SGGeodVec &aRawPoints)
 create poly line objects from raw input points and a type.
 
static PolyLineRef create (Type aTy, const SGGeodVec &aRawPoints)
 
static void bulkAddToSpatialIndex (PolyLineList::const_iterator begin, PolyLineList::const_iterator end)
 
static PolyLineList linesNearPos (const SGGeod &aPos, double aRangeNm, Type aTy)
 retrieve all the lines within a range of a search point.
 
static PolyLineList linesNearPos (const SGGeod &aPos, double aRangeNm, const TypeFilter &aFilter)
 

Detailed Description

Definition at line 52 of file PolyLine.hxx.

Member Enumeration Documentation

◆ Type

Enumerator
INVALID 
COASTLINE 
NATIONAL_BOUNDARY 
REGIONAL_BOUNDARY 

aka a border

RIVER 

state / province / country / department

LAKE 
URBAN 
LAST_TYPE 

Definition at line 57 of file PolyLine.hxx.

Constructor & Destructor Documentation

◆ ~PolyLine()

PolyLine::~PolyLine ( )
virtual

Definition at line 44 of file PolyLine.cxx.

Member Function Documentation

◆ addToSpatialIndex()

void PolyLine::addToSpatialIndex ( ) const

Definition at line 112 of file PolyLine.cxx.

◆ bulkAddToSpatialIndex()

void PolyLine::bulkAddToSpatialIndex ( PolyLineList::const_iterator begin,
PolyLineList::const_iterator end )
static

Definition at line 103 of file PolyLine.cxx.

◆ cartesianBox()

SGBoxd PolyLine::cartesianBox ( ) const

Definition at line 118 of file PolyLine.cxx.

◆ create()

PolyLineRef PolyLine::create ( PolyLine::Type aTy,
const SGGeodVec & aRawPoints )
static

Definition at line 98 of file PolyLine.cxx.

◆ createChunked()

PolyLineList PolyLine::createChunked ( Type aTy,
const SGGeodVec & aRawPoints )
static

create poly line objects from raw input points and a type.

input points will be subdivided so the bounding area of each polyline stays within some threshold.

Definition at line 60 of file PolyLine.cxx.

◆ linesNearPos() [1/2]

PolyLineList PolyLine::linesNearPos ( const SGGeod & aPos,
double aRangeNm,
const TypeFilter & aFilter )
static

Definition at line 149 of file PolyLine.cxx.

◆ linesNearPos() [2/2]

PolyLineList PolyLine::linesNearPos ( const SGGeod & aPos,
double aRangeNm,
Type aTy )
static

retrieve all the lines within a range of a search point.

lines are returned if any point is near the search location.

Definition at line 143 of file PolyLine.cxx.

◆ numPoints()

unsigned int PolyLine::numPoints ( ) const

number of points in this line - at least two.

Definition at line 49 of file PolyLine.cxx.

◆ point()

SGGeod PolyLine::point ( unsigned int aIndex) const

Definition at line 54 of file PolyLine.cxx.

◆ points()

const SGGeodVec & flightgear::PolyLine::points ( ) const
inline

Definition at line 80 of file PolyLine.hxx.

◆ type()

Type flightgear::PolyLine::type ( ) const
inline

Definition at line 70 of file PolyLine.hxx.


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