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

Detailed Description

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 Geometryclone () 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.
 
GeometrygetChild (unsigned int index) const
 
Geometryoperator[] (unsigned int index) const
 
bool removeChild (unsigned int index)
 

Static Public Member Functions

static void destroySet (GeometrySet *set)
 A utility method to delete a GeometrySet, and all Geometry contained within.
 

Additional Inherited Members

 The type of a geometry instance. More...

Constructor & Destructor Documentation

◆ GeometrySet() [1/2]

envitia::maplink::earth::geometry::GeometrySet::GeometrySet ( )

Constructor.

◆ GeometrySet() [2/2]

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.

See also
GeometrySet::destroySet.

◆ ~GeometrySet()

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

Destructor

Note
Any Geometry contained within the set will be removed, but will not be deleted. To delete a set, including all child Geometry the application should use GeometrySet::destroySet.

Member Function Documentation

◆ addChild()

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.

Parameters
geomThe geometry to add to the set.
Returns
true if the geometry was added, false otherwise.

◆ clone()

virtual Geometry * envitia::maplink::earth::geometry::GeometrySet::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.

◆ destroySet()

static void envitia::maplink::earth::geometry::GeometrySet::destroySet ( GeometrySet * set)
static

A utility method to delete a GeometrySet, and all Geometry contained within.

◆ getChild()

Geometry * envitia::maplink::earth::geometry::GeometrySet::getChild ( unsigned int index) const

Query a Geometry instance from the set.

Parameters
indexThe index of the geometry.
Returns
The requested geometry, or null if index >= numChildren().

◆ numChildren()

unsigned int envitia::maplink::earth::geometry::GeometrySet::numChildren ( ) const

Query the size of the set.

◆ operator[]()

Geometry * envitia::maplink::earth::geometry::GeometrySet::operator[] ( unsigned int index) const

Query a Geometry instance from the set.

Parameters
indexThe index of the geometry.
Returns
The requested geometry, or null if index >= numChildren().

◆ removeChild() [1/2]

bool envitia::maplink::earth::geometry::GeometrySet::removeChild ( Geometry & geom)

Remove geometry from the set.

Parameters
geomThe geometry to remove.
Returns
true if the geometry was removed, false otherwise.

◆ removeChild() [2/2]

bool envitia::maplink::earth::geometry::GeometrySet::removeChild ( unsigned int index)

Remove geometry from the set.

Parameters
indexThe index of the geometry to remove.
Returns
true if the geometry was removed, false if index >= numChildren().

◆ size()

unsigned int envitia::maplink::earth::geometry::GeometrySet::size ( ) const

Query the size of the set.

◆ type()

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

Query the type of the geometry instance.

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