![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
A set/group of Geometry instances.
A GeometrySet allows geometry instances to be managed as a group, and may contain any Geometry instance as a child. Geometry sets may be nested within each other, and each Geometry instance may only be present in a single group.
In general operations performed on the GeometrySet such as changing the visibility or scaling the geometry will affect all children within the set.
The application is responsible for memory management of Geometry instances, including those stored within a set. GeometrySet::destroySet and GeometrySet::DestroySet are provided as helpers to aid in memory management, and to allow sets to be stored within smart pointers.
Classes | |
struct | DestroySet |
Public Member Functions | |
GeometrySet () | |
Constructor. | |
GeometrySet (const GeometrySet &other) | |
virtual | ~GeometrySet () |
virtual GeometryType | type () const |
Query the type of the geometry instance. | |
virtual Geometry * | clone () const |
bool | addChild (Geometry &geom) |
bool | removeChild (Geometry &geom) |
unsigned int | numChildren () const |
Query the size of the set. | |
unsigned int | size () const |
Query the size of the set. | |
Geometry * | getChild (unsigned int index) const |
Geometry * | operator[] (unsigned int index) const |
bool | removeChild (unsigned int index) |
![]() | |
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) |
Static Public Member Functions | |
static void | destroySet (GeometrySet *set) |
A utility method to delete a GeometrySet, and all Geometry contained within. | |
Additional Inherited Members | |
![]() | |
enum | GeometryType { GeometryTypePolyline , GeometryTypePolygon , GeometryTypeSymbol , GeometryTypeText , GeometryTypeSet } |
The type of a geometry instance. More... | |
enum | Interpolation { GreatCircle , RhumbLine } |
![]() | |
Geometry () | |
Geometry (const char *style) | |
Geometry (const Geometry &other) | |
![]() | |
void * | m_p |
envitia::maplink::earth::geometry::GeometrySet::GeometrySet | ( | ) |
Constructor.
envitia::maplink::earth::geometry::GeometrySet::GeometrySet | ( | const GeometrySet & | other | ) |
Copy Constructor
This constructor will perform a deep copy of the set, and will contain a copy of all child geometry.
The application is responsible for deleting the cloned set and geometry within.
|
virtual |
Destructor
bool envitia::maplink::earth::geometry::GeometrySet::addChild | ( | Geometry & | geom | ) |
Add geometry to the set.
Geometry may only be added to a single set at a time. If the geometry is already in a set this method will return false.
The application retains ownership of the geometry instance.
geom | The geometry to add to the set. |
|
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.
|
static |
A utility method to delete a GeometrySet, and all Geometry contained within.
Geometry * envitia::maplink::earth::geometry::GeometrySet::getChild | ( | unsigned int | index | ) | const |
Query a Geometry instance from the set.
index | The index of the geometry. |
unsigned int envitia::maplink::earth::geometry::GeometrySet::numChildren | ( | ) | const |
Query the size of the set.
Geometry * envitia::maplink::earth::geometry::GeometrySet::operator[] | ( | unsigned int | index | ) | const |
Query a Geometry instance from the set.
index | The index of the geometry. |
bool envitia::maplink::earth::geometry::GeometrySet::removeChild | ( | Geometry & | geom | ) |
Remove geometry from the set.
geom | The geometry to remove. |
bool envitia::maplink::earth::geometry::GeometrySet::removeChild | ( | unsigned int | index | ) |
Remove geometry from the set.
index | The index of the geometry to remove. |
unsigned int envitia::maplink::earth::geometry::GeometrySet::size | ( | ) | const |
Query the size of the set.
|
virtual |
Query the type of the geometry instance.
Implements envitia::maplink::earth::geometry::Geometry.