![]() |
MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|

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 Geometry * | clone () const |
| const GeodeticPointSet & | outer () 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 GeodeticPointSet & | inner (unsigned int index) const |
Public Member Functions inherited from envitia::maplink::earth::geometry::Geometry | |
| virtual | ~Geometry () |
| Destructor. | |
| const char * | styleName () const |
| Query the style used when rendering the geometry. | |
| void | styleName (const char *style) |
| Interpolation | interpolation () const |
| void | interpolation (Interpolation i) |
| Set the type of interpolation applied to edges. | |
| void | visibility (bool v) |
| void | visibilityOnSurface (bool v, const Surface3D *surface) |
| bool | visibilityOnSurface (const Surface3D *surface) const |
| bool | setAttribute (const char *name, const char *value) |
| const char * | getAttribute (const char *name) const |
| bool | removeAttribute (const char *name) |
| unsigned int | numAttributes () const |
| const char * | attributeName (unsigned int index) const |
| const char * | attributeValue (unsigned int index) const |
| bool | removeAttribute (unsigned int index) |
| GeodeticPoint | centroid () const |
| Query the centroid of the geometry. | |
| void | translate (const GeodeticPoint &t) |
| void | scale (const GeodeticPoint &s) |
| void | scale (const GeodeticPoint &s, const GeodeticPoint &origin) |
| void | rotate (const GeodeticDirection &axis, double angle) |
Additional Inherited Members | |
Public Types inherited from envitia::maplink::earth::geometry::Geometry | |
| enum | GeometryType { GeometryTypePolyline , GeometryTypePolygon , GeometryTypeSymbol , GeometryTypeText , GeometryTypeSet } |
| The type of a geometry instance. More... | |
| enum | Interpolation { GreatCircle , RhumbLine } |
Protected Member Functions inherited from envitia::maplink::earth::geometry::Geometry | |
| Geometry () | |
| Geometry (const char *style) | |
| Geometry (const Geometry &other) | |
Protected Attributes inherited from envitia::maplink::earth::geometry::Geometry | |
| void * | m_p |
| envitia::maplink::earth::geometry::Polygon::Polygon | ( | ) |
Constructor.
| envitia::maplink::earth::geometry::Polygon::Polygon | ( | const char * | style | ) |
Constructor
| style | The name of the style to use when rendering. |
| envitia::maplink::earth::geometry::Polygon::Polygon | ( | const char * | style, |
| const GeodeticPointSet & | o ) |
Constructor
| style | The name of the style to use when rendering. |
| o | The coordinate set which defines the outer edge. |
| envitia::maplink::earth::geometry::Polygon::Polygon | ( | const Polygon & | other | ) |
Copy Constructor.
|
virtual |
Destructor.
| unsigned int envitia::maplink::earth::geometry::Polygon::addInner | ( | GeodeticPointSet & | coords | ) |
Add an inner (hole) to the Polygon.
| coords | The coordinates of the inner. |
|
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.
| const GeodeticPointSet & envitia::maplink::earth::geometry::Polygon::inner | ( | unsigned int | index | ) | const |
Query the coordinates of an inner.
| index | The index to query. |
| 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.
| index | The index of the inner to update. |
| coords | The new coordinates for the inner. |
| unsigned int envitia::maplink::earth::geometry::Polygon::numInners | ( | ) | const |
Query the number of inners (holes) in the Polygon.
| const GeodeticPointSet & envitia::maplink::earth::geometry::Polygon::outer | ( | ) | const |
Query the outer of the Polygon.
| void envitia::maplink::earth::geometry::Polygon::outer | ( | const GeodeticPointSet & | coords | ) |
Set the outer of the Polygon.
|
virtual |
Query the type of the geometry instance.
Implements envitia::maplink::earth::geometry::Geometry.