MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
envitia::maplink::earth::geometry::Polygon Class Reference
Inheritance diagram for envitia::maplink::earth::geometry::Polygon:

Detailed Description

A Polygon primitive.

A Polygon is a Plane in 3D space defined by one outer edge and zero or more inners. Edges are defined as point sets in geodetic space. Edges are 'open' - The last point does not need to be the same as the first.

Public Member Functions

 Polygon ()
 Constructor.
 
 Polygon (const char *style)
 
 Polygon (const char *style, const GeodeticPointSet &o)
 
 Polygon (const Polygon &other)
 Copy Constructor.
 
virtual ~Polygon ()
 Destructor.
 
virtual GeometryType type () const
 Query the type of the geometry instance.
 
virtual Geometryclone () const
 
const GeodeticPointSetouter () const
 Query the outer of the Polygon.
 
void outer (const GeodeticPointSet &coords)
 Set the outer of the Polygon.
 
unsigned int addInner (GeodeticPointSet &coords)
 
unsigned int numInners () const
 Query the number of inners (holes) in the Polygon.
 
void inner (unsigned int index, const GeodeticPointSet &coords)
 
const GeodeticPointSetinner (unsigned int index) const
 

Additional Inherited Members

 The type of a geometry instance. More...

Constructor & Destructor Documentation

◆ Polygon() [1/4]

envitia::maplink::earth::geometry::Polygon::Polygon ( )

Constructor.

◆ Polygon() [2/4]

envitia::maplink::earth::geometry::Polygon::Polygon ( const char * style)

Constructor

Parameters
styleThe name of the style to use when rendering.

◆ Polygon() [3/4]

envitia::maplink::earth::geometry::Polygon::Polygon ( const char * style,
const GeodeticPointSet & o )

Constructor

Parameters
styleThe name of the style to use when rendering.
oThe coordinate set which defines the outer edge.

◆ Polygon() [4/4]

envitia::maplink::earth::geometry::Polygon::Polygon ( const Polygon & other)

Copy Constructor.

◆ ~Polygon()

virtual envitia::maplink::earth::geometry::Polygon::~Polygon ( )
virtual

Destructor.

Member Function Documentation

◆ addInner()

unsigned int envitia::maplink::earth::geometry::Polygon::addInner ( GeodeticPointSet & coords)

Add an inner (hole) to the Polygon.

Parameters
coordsThe coordinates of the inner.
Returns
The index of the new inner, which may be used with other inner access methods.

◆ clone()

virtual Geometry * envitia::maplink::earth::geometry::Polygon::clone ( ) const
virtual

Create a clone of this geometry

If the geometry is a set this will perform a deep copy (All children of the set will be cloned).

Implements envitia::maplink::earth::geometry::Geometry.

◆ inner() [1/2]

const GeodeticPointSet & envitia::maplink::earth::geometry::Polygon::inner ( unsigned int index) const

Query the coordinates of an inner.

Parameters
indexThe index to query.
Returns
The coordinates of the inner, or an empty set if index >= numInners().

◆ inner() [2/2]

void envitia::maplink::earth::geometry::Polygon::inner ( unsigned int index,
const GeodeticPointSet & coords )

Update an inner (hole) within the Polygon.

If index is >= numInners this method will add a new inner with the provided coordinates.

Parameters
indexThe index of the inner to update.
coordsThe new coordinates for the inner.

◆ numInners()

unsigned int envitia::maplink::earth::geometry::Polygon::numInners ( ) const

Query the number of inners (holes) in the Polygon.

◆ outer() [1/2]

const GeodeticPointSet & envitia::maplink::earth::geometry::Polygon::outer ( ) const

Query the outer of the Polygon.

◆ outer() [2/2]

void envitia::maplink::earth::geometry::Polygon::outer ( const GeodeticPointSet & coords)

Set the outer of the Polygon.

◆ type()

virtual GeometryType envitia::maplink::earth::geometry::Polygon::type ( ) const
virtual

Query the type of the geometry instance.

Implements envitia::maplink::earth::geometry::Geometry.