MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLExtruded2DPolyline Class Reference
Inheritance diagram for TSLExtruded2DPolyline:

Detailed Description

Extruded 2D polyline specific access methods.

An extruded 2D polyline is a 2D polyline placed at a specified altitude and extruded by a specified distance vertically. The altitude may be absolute or relative. The resultant visualisation is a vertical "wall"

This class represents the access methods that are specific to an extruded 2D polyline. They also allow setting of the various attributes.

Interpolated polyline 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.
  • 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.

If a polyline 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.

Public Member Functions

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)
 
int numPosts () const
 
void numPosts (int numberOfPoints)
 
const TSLPolylinepolyline () const
 
TSLPolylinepolyline ()
 
bool polyline (TSLPolyline *newPolyline, bool assumeOwnership=true)
 
double postDistance () const
 
void postDistance (double newPostDistance)
 
int noOfPoints () const
 
void noOfPoints (int numberOfPoints)
 
- Public Member Functions inherited from TSL3DEntity
TSL3DBoundingBox boundingBox (int surfaceID=-1) const
 
void boundingBox (TSL3DCoord &bottomLeft, TSL3DCoord &topRight, int surfaceID=-1) const
 
TSL3DCoord centroid () const
 
TSL3DEntityclone () 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)
 
TSL3DEntitySetparent ()
 
const TSL3DEntitySetparent () 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)
 
- Public Member Functions inherited from TSLEntityBase
bool addDataSet ()
 
bool addDataSet (TSLDataHandler *toUseDataHandler)
 
bool clearRenderingAttributes ()
 
TSLDataSetdataSet ()
 
const TSLDataSetdataSet () 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
 
TSL3DEntityis3DEntity ()
 
const TSL3DEntityis3DEntity () const
 
TSLEntityisEntity ()
 
const TSLEntityisEntity () 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 TSLExtruded2DPolylinecreate (TSLFeatureID featureID, TSLPolyline *polyline, bool ownsPolyline=true)
 
static TSLExtruded2DPolylinecreate (TSLFeatureID featureID, TSLPolyline *polyline, TSL3DInterpolation interpolation, int numPosts=0, double postDistance=0.0, bool ownsPolyline=true)
 
static const TSLExtruded2DPolylineisExtruded2DPolyline (const TSL3DEntity *entity)
 
static TSLExtruded2DPolylineisExtruded2DPolyline (TSL3DEntity *entity)
 

Additional Inherited Members

- Protected Member Functions inherited from TSLEntityBase
 ~TSLEntityBase ()
 

Member Function Documentation

◆ altitude() [1/2]

void TSLExtruded2DPolyline::altitude ( double altitude,
TSL3DAltitudeType type = TSL3DAltitudeTypeMeanSeaLevel )

Set the altitude of the extruded entity in metres.

Argument description list:

altitude: The altitude at which the vertices of the entity should be set.

type: The type of altitude - defaults to TSL3DAltitudeTypeMeanSeaLevel

◆ altitude() [2/2]

double TSLExtruded2DPolyline::altitude ( TSL3DAltitudeType * alt = NULL) const

Return the altitude of the entity.

Parameters
typethe returned altitude type value

◆ create() [1/2]

static TSLExtruded2DPolyline * TSLExtruded2DPolyline::create ( TSLFeatureID featureID,
TSLPolyline * polyline,
bool ownsPolyline = true )
static

Creates an extruded 2D polyline with the specified parameters.

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.

Parameters
featureIDID 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.
polylineBase 2D Polyline to use.
ownsPolylineIf true, the extruded 2D polyline will assume ownership of the base 2D polyline. Otherwise a copy of the polyline is made.The default is true.
Returns
NULL on error.

◆ create() [2/2]

static TSLExtruded2DPolyline * TSLExtruded2DPolyline::create ( TSLFeatureID featureID,
TSLPolyline * polyline,
TSL3DInterpolation interpolation,
int numPosts = 0,
double postDistance = 0.0,
bool ownsPolyline = true )
static

Creates an extruded 2D polyline with the specified parameters.

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.

Returns NULL on error.

Parameters
featureIDID 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.
polylineBase 2D Polyline to use. The new object will assume ownership of the base 2D polyline.
interpolationType of interpolation to undertake. Defaults to None.
TSL3DInterpolationNoneno interpolation
TSL3DInterpolationXXXCreationinterpolate at creation time. Requires noOf Points or postDistance to be set.
TSL3DInterpolationXXXDisplayinterpolation at display time. noOfPoints is taken as a maximum number of Points and postDistance is ignored.

Where XXX is either Sphere or Ellipsoid.

Parameters
numPostsNumber of points to create when doing the interpolation. Defaults to 0 (no-limit)
postDistanceThe distance in KM between interpolation points. Defaults to 0.0.
ownsPolylineIf true, the extruded 2D polyline will assume ownership of the base 2D polyline. Otherwise a copy of the polyline is made.The default is true.
Note
Either numPosts or postDistance should be set. If both values are non zero then the postDistance is ignored.

◆ extrudedHeight() [1/2]

double TSLExtruded2DPolyline::extrudedHeight ( ) const

Returns the extruded height of the entity.

◆ extrudedHeight() [2/2]

void TSLExtruded2DPolyline::extrudedHeight ( double newHeight)

Set the extruded height of the base 2D polyline.

Parameters
newHeightthe new extruded height in metres

◆ interpolation() [1/2]

TSL3DInterpolation TSLExtruded2DPolyline::interpolation ( ) const

Returns the current interpolation option being used to render this primitive.

◆ interpolation() [2/2]

void TSLExtruded2DPolyline::interpolation ( TSL3DInterpolation inter)

Sets the type of interpolation used to render this primitive:

Parameters
interpolationType of interpolation to undertake.
TSL3DInterpolationNoneno interpolation
TSL3DInterpolationCreationinterpolate at creation time. Requires maxNum Points or postDistance to be set.
TSL3DInterpolationDisplayinterpolation at display time. maxNumPoints is taken as a max' number of Points and postDistance is ignored.

◆ isExtruded2DPolyline() [1/2]

static const TSLExtruded2DPolyline * TSLExtruded2DPolyline::isExtruded2DPolyline ( const TSL3DEntity * entity)
static

Query whether the entity is an extruded 2d polyline.

If this entity is an extruded 2d polyline, returns an accessor, otherwise returns NULL.

Parameters
entitythe entity to query.

◆ isExtruded2DPolyline() [2/2]

static TSLExtruded2DPolyline * TSLExtruded2DPolyline::isExtruded2DPolyline ( TSL3DEntity * entity)
static

Query whether the entity is an extruded 2d polyline.

If this entity is an extruded 2d polyline, returns an accessor, otherwise returns NULL.

Parameters
entitythe entity to query.

◆ noOfPoints() [1/2]

int TSLExtruded2DPolyline::noOfPoints ( ) const
inline

◆ noOfPoints() [2/2]

void TSLExtruded2DPolyline::noOfPoints ( int numberOfPoints)
inline

◆ numPosts() [1/2]

int TSLExtruded2DPolyline::numPosts ( ) const

Returns the number of points used to represent this shape doing the interpolation. Defaults to 0 (no-limit)

◆ numPosts() [2/2]

void TSLExtruded2DPolyline::numPosts ( int numberOfPoints)

Sets the number of points to be interpolated, or the maximum number of points to be interpolated if interpolation at display time is set. If set to 0 then there is no limit.

If the setting does not change then returns immediately with out doing anything.

Invalidates any interpolated points.

Parameters
numberOfPointsThe new value for this setting.
Note
if the new value for numPosts is non zero, then the postDistance value will be cleared.

◆ polyline() [1/3]

TSLPolyline * TSLExtruded2DPolyline::polyline ( )

Query method for the base 2D Polyline being extruded

The returned polyline geometry may be modified. If so, then the 'update' method should be called so that the extruded 2D polyline can update its internal information.

Returns pointer to base 2D Polyline.

◆ polyline() [2/3]

const TSLPolyline * TSLExtruded2DPolyline::polyline ( ) const

Query method for read-only access to the base 2D Polyline being extruded

Returns read-only pointer to base 2D Polyline.

◆ polyline() [3/3]

bool TSLExtruded2DPolyline::polyline ( TSLPolyline * newPolyline,
bool assumeOwnership = true )

Sets polyline to be extruded.

Parameters
newPolylinePolyline to be used.
assumeOwnershipIf true, the extruded 2D polyline will assume ownership of this entity. The default is true.
Returns
true on success, false otherwise.

◆ postDistance() [1/2]

double TSLExtruded2DPolyline::postDistance ( ) const

Returns this primitive's post distance which is used for certain types of interpolation.

◆ postDistance() [2/2]

void TSLExtruded2DPolyline::postDistance ( double newPostDistance)

Sets this primitive's post distance which is used for certain types of interpolation.

Parameters
newPostDistanceThe distance in KM between interpolation points.
Note
if the new value for postDistance is non zero, then the noOfPoints value will be cleared.