Extruded 2D polygon specific access methods.
An extruded 2D polygon is a 2D polygon placed at a specified altitude and extruded by a specified distance vertically. The altitude may be absolute or relative. The resultant visualisation is a 3D solid.
This class represents the access methods that are specific to an extruded 2D polygon. They also allow setting of the various attributes.
Interpolated polygon drawing has a number of design limitations:
- The alignment with the underlying grid is not perfect as the two grids are constructed in different coordinate systems. However it appears to work very well for convex shapes. The World grid is based on latitude/longitude. The grid is essentially an x/y grid placed upon the polygon projected using a 'Stereographic' projection with the centre being the centre of the object, the increment in this case is based on the x distance at the centre.
- As the shapes get bigger the alignment towards the edges is further away from the ideal.
- The maximum size of a polygon is approximately 40 degrees across. The limit is imposed by the use of the Stereographic projection.
- If you want very high resolution terrain or imagery the sub-divisions required for the polygon become very small and have a very high impact on the performance when the polygons are on the surface of the Earth. The maximum terrain Level Of Detail supported by the draped polygon/line is 8.
- Draped polygons/lines which are very close to the Earth's surface may still intersect with the surface.
- Viewing a draped polygon/line looking straight down close to the Earth the polygon/line may still intersect with the surface. This is partly an issue with the Z-buffer accuracy and a trade off with performance.
- Complex/holed polygons are tessellated using the OpenGL tessellator. This causes more OpenGL primitives to be generated then would be expected and reduces the effectiveness of the draping algorithm.
- Avoid creating draped polygons/lines which straddling the +-80 degree latitude boundary as the depth of subdivision is constrained towards the poles to limit the number of tiles to a reasonable amount.
- The Extruded Polygons initial face is the face that is draped. The extruded face is translated to the extruded height. If the bottom is not required draw the polygon at the required altitude and extrude downwards turning off the top.
- If a polygon has a hole then the holes are created using the OpenGL contour rules. This makes the polygons overly complex and sometimes the polygon has smaller triangle holes or the one edge is drawn straight.
- TSL3DPolygons whose points are specified with different altitude types may not be drawn as expected. The additional points added across the polygon to enable the draping will take the altitude type from the start point so this means that the result is undefined as the start point is not defined. The altitude type should all be the same for all points specified for a polygon.
- TSL3DPolygons whose points are specified with different heights may not be drawn as expected the effect should be very similar to MapLink 5.4, however the technique used in 5.4 and previous versions resulted in very poor drawing performance and in a number of cases poor visualisation. The new technique used for draping is done assuming that a polygon is contained in a single plane and produces significantly less drawing primitives.
- A lot of memory is required for complex of holed draped polygons.
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).
- Deprecated
- Deprecated as of MapLink 11.1. Advised to use MapLink Earth SDK instead.
|
double | altitude (TSL3DAltitudeType *alt=NULL) const |
|
void | altitude (double altitude, TSL3DAltitudeType type=TSL3DAltitudeTypeMeanSeaLevel) |
|
double | extrudedHeight () const |
|
void | extrudedHeight (double newHeight) |
|
TSL3DInterpolation | interpolation () const |
|
void | interpolation (TSL3DInterpolation inter) |
|
const TSLPolygon * | polygon () const |
|
TSLPolygon * | polygon () |
|
bool | polygon (TSLPolygon *newPolygon, bool assumeOwnsership=true) |
|
void | showBottom (bool show) |
|
bool | showBottom () const |
|
void | showSides (bool show) |
|
bool | showSides () const |
|
void | showTop (bool show) |
|
bool | showTop () const |
|
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 |
|