This class defines a Polygon. More...
#include <ilviews/maps/geometry/geopolygon.h>
Public Member Functions | |
IlvMapPolygon (const IlvMapPolygon &source) | |
Initializes a new polygon by copying an existing one. More... | |
IlvMapPolygon (IlvMapRing *exteriorRing) | |
Initializes a new polygon with its exterior ring. More... | |
void | addInteriorRing (IlvMapRing *ring) |
Adds an interior ring to the polygon. More... | |
virtual IlBoolean | contains (const IlvCoordinate &) const |
Returns IlTrue if some coordinate is contained in the object. More... | |
virtual IlvMapGeometry * | copy () const |
Returns a copy of the object. More... | |
virtual IlvClassInfo * | getClassInfo () const |
Returns the IlvClassInfo of the instance. More... | |
IlvMapRing * | getExteriorRing () const |
Returns the exterior ring of the polygon. More... | |
const IlvMapRing * | getInteriorRing (IlUInt index) const |
Returns the specified interior ring. More... | |
virtual IlUInt | getInteriorRingCount () const |
Returns the count of interior rings. More... | |
virtual const IlvMapCurve * | getStroke () const |
Returns the stroke of the area. More... | |
virtual const IlvMapGeometry * | getSubElement (IlUInt) const |
Returns a sub element of a collection geometry. More... | |
virtual IlUInt | getSubElementCount () const |
Returns the number of elements contained in the geometry if the geometry is a collection. More... | |
virtual IlBoolean | isCollection () const |
Checks if this geometry is a collection of other geometries. More... | |
IlvMapRing * | removeInteriorRing (const IlvMapRing *ring) |
Removes the specified interior ring from the list. More... | |
void | removeInteriorRings () |
Removes and deletes all the interior rings of the polygon. | |
IlvMapRing * | setExteriorRing (IlvMapRing *exteriorRing) |
Sets the exterior ring of the polygon. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IlvMapGeometry | |
static IlvClassInfo * | ClassInfo () |
Returns the class info. More... | |
Protected Member Functions inherited from IlvMapArea | |
IlvMapArea () | |
Initializes a new empty IlvMapArea instance. | |
Protected Member Functions inherited from IlvMapGeometry | |
IlvMapGeometry () | |
Constructor. More... | |
This class defines a Polygon.
Library: ilvmaps
A polygon is a an area that can contain holes. It is defined by an exterior ring and by interior rings that describe the internal holes of the polygon. The interior rings should not intersect. However, this class does not perform automatic consistency checking.
The instances of this class can be rendered by an IlvDefaultFeatureRenderer
or by an IlvDefaultAreaRenderer
.
IlvMapPolygon::IlvMapPolygon | ( | IlvMapRing * | exteriorRing | ) |
Initializes a new polygon with its exterior ring.
exteriorRing | The exterior ring. This must not be 0 . In this operation, the polygon becomes owner of the ring. |
IlvMapPolygon::IlvMapPolygon | ( | const IlvMapPolygon & | source | ) |
Initializes a new polygon by copying an existing one.
source | The source polygon. |
void IlvMapPolygon::addInteriorRing | ( | IlvMapRing * | ring | ) |
Adds an interior ring to the polygon.
In this operation, the polygon becomes owner of the ring.
ring | The interior ring to be added. |
|
virtual |
Returns IlTrue
if some coordinate is contained in the object.
coordinate | The point to be checked. |
IlTrue
if coordinate is contained in the object. Implements IlvMapArea.
|
virtual |
Returns a copy of the object.
IlvMapGeometry
that must be deleted by the user. Implements IlvMapArea.
|
virtual |
Returns the IlvClassInfo
of the instance.
IlvClassInfo
that should not be modified nor deleted. Implements IlvMapArea.
IlvMapRing* IlvMapPolygon::getExteriorRing | ( | ) | const |
Returns the exterior ring of the polygon.
IlvMapRing
object that can be modified, but that should not be deleted. const IlvMapRing* IlvMapPolygon::getInteriorRing | ( | IlUInt | index | ) | const |
Returns the specified interior ring.
index | The index of the ring. index should be between 0 and getInteriorRingCount()-1 . |
IlvMapRing
object that can be modified, but that should not be deleted.
|
virtual |
Returns the count of interior rings.
|
virtual |
Returns the stroke of the area.
IlvCurve
object that should not be deleted nor modified. Implements IlvMapArea.
|
virtual |
Returns a sub element of a collection geometry.
index | The index of the sub-geometry to be retrieved. |
0
if it is not. Implements IlvMapGeometry.
|
virtual |
Returns the number of elements contained in the geometry if the geometry is a collection.
0
. Implements IlvMapGeometry.
|
virtual |
Checks if this geometry is a collection of other geometries.
The composite geometries predefined in Rogue Wave Views Maps are: IlvMapGeometryCollection
, IlvMapMultiPoint
, IlvMapSegmentString
and its subclasses, IlvMapMultiCurve
and IlvMapMultiArea
.
IlTrue
if the geometry is a collection of other geometries. Implements IlvMapGeometry.
IlvMapRing* IlvMapPolygon::removeInteriorRing | ( | const IlvMapRing * | ring | ) |
Removes the specified interior ring from the list.
ring | The ring to remove. |
0
if ring is not an interior ring of the polygon. IlvMapRing* IlvMapPolygon::setExteriorRing | ( | IlvMapRing * | exteriorRing | ) |
Sets the exterior ring of the polygon.
The previous exterior ring is returned by the function and is no longer owned by the polygon.
exteriorRing | The exterior ring. In this operation, the polygon becomes owner of the ring. The value should not be 0 . |