![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
3D polygon specific access methods.
This class represents the access methods that are specific to a 3D polygon. They also allow setting of the various attributes.
Interpolated polygon drawing has a number of design limitations:
If a polygon is not draped correctly or appears to have holes when it should not have please send the TMF file to Envitia support (suppo.nosp@m.rt@e.nosp@m.nviti.nosp@m.a.co.nosp@m.m).
Public Member Functions | |
bool | addInner (TSL3DCoordSet *newPoints, bool keepCoordSet=false) |
bool | addInner (const TSL3DCoordSet &newPoints) |
double | area () const |
const TSL3DCoordSet * | inner (int index) const |
bool | inner (int index, TSL3DCoordSet *newPoints, bool keepCoordSet=false) |
bool | inner (int index, const TSL3DCoordSet &newPoints) |
TSL3DInterpolation | interpolation () const |
void | interpolation (const TSL3DInterpolation val) |
int | numInners () const |
const TSL3DCoordSet & | outer () const |
bool | outer (TSL3DCoordSet *newPoints, bool keepCoordSet=false) |
bool | outer (const TSL3DCoordSet &newPoints) |
bool | perimeter (double *outerPerimeter, double *innerPerimeter) const |
bool | removeInner (int index) |
![]() | |
TSL3DBoundingBox | boundingBox (int surfaceID=-1) const |
void | boundingBox (TSL3DCoord &bottomLeft, TSL3DCoord &topRight, int surfaceID=-1) const |
TSL3DCoord | centroid () const |
TSL3DEntity * | clone () const |
double | distance (const TSL3DCoord &point, bool useRenderedExtent=true, int drawingSurfaceID=-1) const |
bool | equals (const TSL3DEntity *other) const |
void | move (const TSL3DCoord &location, const TSL3DCoord &reference) |
TSL3DEntitySet * | parent () |
const TSL3DEntitySet * | parent () const |
void | scale (double scaleParam, const TSL3DCoord *origin=0) |
void | scale (double scaleX, double scaleY, double scaleZ, const TSL3DCoord *origin=0) |
double | squareDistance (const TSL3DCoord &point, bool useRenderedExtent=true, int drawingSurfaceID=-1) const |
void | translate (double latitudeOffset, double longitudeOffset, double altitudeOffset) |
![]() | |
bool | addDataSet () |
bool | addDataSet (TSLDataHandler *toUseDataHandler) |
bool | clearRenderingAttributes () |
TSLDataSet * | dataSet () |
const TSLDataSet * | dataSet () const |
short | dataSourceID () const |
void | dataSourceID (short dataSourceID) |
bool | deleteDataSet () |
void | destroy () |
TSLEntityID | entityID () const |
void | entityID (TSLEntityID value) |
TSLFeatureID | featureID () const |
void | featureID (TSLFeatureID newValue) |
bool | getRendering (TSLRenderingAttributeInt attribute, int *result) const |
bool | getRendering (TSLRenderingAttributeDouble attribute, double *result) const |
bool | getRendering (TSLRenderingAttributeBool attribute, bool *result) const |
bool | getRendering (TSLRenderingAttributes &result) const |
TSL3DEntity * | is3DEntity () |
const TSL3DEntity * | is3DEntity () const |
TSLEntity * | isEntity () |
const TSLEntity * | isEntity () const |
bool | isOptimisedEntity () const |
void | name (const char *newValue) |
const char * | name () const |
void | releaseResources (int surfaceID) |
bool | setRendering (TSLRenderingAttributeInt attribute, int value) |
bool | setRendering (TSLRenderingAttributeDouble attribute, double value) |
bool | setRendering (TSLRenderingAttributeBool attribute, bool value) |
bool | setRendering (const TSLRenderingAttributes &attributes) |
void | sourceID (int value) |
int | sourceID () const |
TSLGeometryType | type () const |
void | version (TSLVersion value) |
TSLVersion | version () const |
Static Public Member Functions | |
static TSL3DPolygon * | create (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false) |
static TSL3DPolygon * | create (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
static TSL3DPolygon * | create (TSLFeatureID featureID, const TSL3DCoordSet &coordSet, TSL3DInterpolation interpolation) |
static const TSL3DPolygon * | is3DPolygon (const TSL3DEntity *entity) |
static TSL3DPolygon * | is3DPolygon (TSL3DEntity *entity) |
Additional Inherited Members | |
![]() | |
~TSLEntityBase () | |
bool TSL3DPolygon::addInner | ( | const TSL3DCoordSet & | newPoints | ) |
Adds an inner boundary to the 3D polygon.
A polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
newPoints | Points for new inner boundary. |
bool TSL3DPolygon::addInner | ( | TSL3DCoordSet * | newPoints, |
bool | keepCoordSet = false ) |
Adds an inner boundary to the 3D polygon.
A 3D polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
newPoints | Points for new inner boundary. |
keepCoordSet | Flag to indicate whether the polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the polygon assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
double TSL3DPolygon::area | ( | ) | const |
Query the area of the 3D polygon.
Calculates and returns the area of the 3D polygon, in TMC units. The area will be the area of the outer, minus the combined area of the inners.
Note that this method can only be called on planar polygons and that values returned from non planar polygons will not be correct.
|
static |
Creates a 3D polygon with the specified parameters.
A 3D polygon is a closed, filled, planar feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
This call should only be used for temporary entities. For example, this call may be used to create entities that are used in the spatial tests.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing the polygon. |
|
static |
Creates a 3D interpolated Polygon with the specified parameters.
A 3D polygon is a closed, filled, planar feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
The resultant polygon may be interpolated across the surface of the Earth.
Argument description list:
featureID: ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity.
coords: Coordinate set describing the polygon.
interpolation : Type of interpolation to undertake. Defaults to None. TSL3DInterpolationNone : no interpolation TSL3DInterpolationGrid: Creates points where the polygon intersects with a Grid. The number of subdivisions in a grid is based on the height of the polygon from the Earth's surface.
Returns NULL on error.
|
static |
Creates a 3D polygon with the specified parameters.
A 3D polygon is a closed, filled, planar feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
This call should only be used for temporary entities. For example, this call may be used to create entities that are used in the spatial tests.
featureID | ID of the feature code to assign to the entity. This is used when rendering map features if no specific attribute set has been created for the entity. |
coords | Coordinate set describing the polygon. |
keepCoordSet | Flag to indicate whether the polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the polygon assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
const TSL3DCoordSet * TSL3DPolygon::inner | ( | int | index | ) | const |
Query the coordinates of the inner boundary at the specified index.
index | Index of inner boundary to query. |
bool TSL3DPolygon::inner | ( | int | index, |
const TSL3DCoordSet & | newPoints ) |
Sets the coordinates of the inner boundary at the specified index.
A 3D polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
index | Index of inner boundary to change. |
newPoints | New points for inner boundary. |
bool TSL3DPolygon::inner | ( | int | index, |
TSL3DCoordSet * | newPoints, | ||
bool | keepCoordSet = false ) |
Sets the coordinates of the inner boundary at the specified index.
A 3D polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
index | Index of inner boundary to change. |
newPoints | New points for inner boundary. |
keepCoordSet | Flag to indicate whether the polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the polygon assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
TSL3DInterpolation TSL3DPolygon::interpolation | ( | ) | const |
Returns the current TSL3DInterpolation setting.
void TSL3DPolygon::interpolation | ( | const TSL3DInterpolation | val | ) |
Sets the type of interpolation to use for this entity.
If the setting does not change then returns immediately with out doing anything.
Invalidates any interpolated points.
Clears the postDistance and numberOfPoints settings.
|
static |
Query whether the entity is a 3d polygon.
If this entity is a 3D polygon, returns an accessor, otherwise returns NULL.
entity | the entity to query. |
|
static |
Query whether the entity is a 3d polygon.
If this entity is a 3D polygon, returns an accessor, otherwise returns NULL.
entity | the entity to query. |
int TSL3DPolygon::numInners | ( | ) | const |
Query the number of inner boundaries of the 3D polygon.
const TSL3DCoordSet & TSL3DPolygon::outer | ( | ) | const |
Query the coordinates of the outer boundary of the 3D polygon.
bool TSL3DPolygon::outer | ( | const TSL3DCoordSet & | newPoints | ) |
Sets the coordinates of the outer boundary of the 3D polygon.
A 3D polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
newPoints | New points for the outer boundary. |
bool TSL3DPolygon::outer | ( | TSL3DCoordSet * | newPoints, |
bool | keepCoordSet = false ) |
Sets the coordinates of the outer boundary of the 3D polygon.
A 3D polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
All points for inners and outer of a 3D polygon must lie in the same plane.
newPoints | New points for the outer boundary. |
keepCoordSet | Flag to indicate whether the polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the polygon assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set. |
bool TSL3DPolygon::perimeter | ( | double * | outerPerimeter, |
double * | innerPerimeter ) const |
Query the perimeter of the 3D polygon.
Calculates and returns the perimeter of the 3D polygon, in TMC units. Both inner and outer perimeters may be returned by reference. If only the outer perimeter is required, then the inner perimeter parameter may be NULL.
Returns true if successful, false otherwise.
bool TSL3DPolygon::removeInner | ( | int | index | ) |
Removes the inner boundary from the 3D polygon.
A 3D polygon must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.
index | Index of inner boundary to remove. |