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

Detailed Description

3D polyline specific access methods.

This class represents the access methods that are specific to a 3D 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

bool closed () const
 
void closed (bool newValue)
 
TSL3DInterpolation interpolation () const
 
void interpolation (TSL3DInterpolation inter)
 
double length () const
 
int numPosts () const
 
void numPosts (int numberOfPoints)
 
const TSL3DCoordSetpoints () const
 
bool points (TSL3DCoordSet *newPoints, bool keepCoordSet=false)
 
bool points (const TSL3DCoordSet &newPoints)
 
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 TSL3DPolylinecreate (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false)
 
static TSL3DPolylinecreate (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
static TSL3DPolylinecreate (TSLFeatureID featureID, const TSL3DCoordSet &coords, bool closed, TSL3DInterpolation interpolation, int numPosts=0, double postDistance=0.0)
 
static const TSL3DPolylineis3DPolyline (const TSL3DEntity *entity)
 
static TSL3DPolylineis3DPolyline (TSL3DEntity *entity)
 

Additional Inherited Members

- Protected Member Functions inherited from TSLEntityBase
 ~TSLEntityBase ()
 

Member Function Documentation

◆ closed() [1/2]

bool TSL3DPolyline::closed ( ) const

Queries whether the 3D polyline is closed.

A closed 3D polyline will automatically have its first and last points joined when rendered.

◆ closed() [2/2]

void TSL3DPolyline::closed ( bool newValue)

Sets whether the 3D polyline is closed.

A closed 3D polyline will automatically have its first and last points joined when rendered.

Parameters
newValueNew value for closed flag.

◆ create() [1/3]

static TSL3DPolyline * TSL3DPolyline::create ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )
static

Creates a 3D 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.
coordsCoordinate set describing the 3D polyline.
Returns
NULL on error.

◆ create() [2/3]

static TSL3DPolyline * TSL3DPolyline::create ( TSLFeatureID featureID,
const TSL3DCoordSet & coords,
bool closed,
TSL3DInterpolation interpolation,
int numPosts = 0,
double postDistance = 0.0 )
static

Creates a 3D 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.
coordsCoordinate set describing the 3D polyline.
closedSets whether the 3D polyline is closed.
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.
Note
Either numPosts or postDistance should be set. If both values are non zero then the postDistance is ignored.

◆ create() [3/3]

static TSL3DPolyline * TSL3DPolyline::create ( TSLFeatureID featureID,
TSL3DCoordSet * coords,
bool keepCoordSet = false )
static

Creates a 3D 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.
coordsCoordinate set describing the 3D polyline.
keepCoordSetFlag to indicate whether the 3D polyline should keep the specified coordinate set, or clone it. Note that if this flag is set, the 3D polyline assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
NULL on error.

◆ interpolation() [1/2]

TSL3DInterpolation TSL3DPolyline::interpolation ( ) const

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

◆ interpolation() [2/2]

void TSL3DPolyline::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.

◆ is3DPolyline() [1/2]

static const TSL3DPolyline * TSL3DPolyline::is3DPolyline ( const TSL3DEntity * entity)
static

Query whether the entity is a 3d polyline.

If this entity is a 3D polyline, returns an accessor, otherwise returns NULL.

Parameters
entitythe entity to query.

◆ is3DPolyline() [2/2]

static TSL3DPolyline * TSL3DPolyline::is3DPolyline ( TSL3DEntity * entity)
static

Query whether the entity is a 3d polyline.

If this entity is a 3D polyline, returns an accessor, otherwise returns NULL.

Parameters
entitythe entity to query.

◆ length()

double TSL3DPolyline::length ( ) const

Queries the length of the 3D polyline, in TMC units.

◆ noOfPoints() [1/2]

int TSL3DPolyline::noOfPoints ( ) const
inline

◆ noOfPoints() [2/2]

void TSL3DPolyline::noOfPoints ( int numberOfPoints)
inline

◆ numPosts() [1/2]

int TSL3DPolyline::numPosts ( ) const

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

◆ numPosts() [2/2]

void TSL3DPolyline::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.

◆ points() [1/3]

const TSL3DCoordSet & TSL3DPolyline::points ( ) const

Query the coordinates defining the 3D polyline.

Return the points associated with this 3D polyline.

◆ points() [2/3]

bool TSL3DPolyline::points ( const TSL3DCoordSet & newPoints)

Sets the points associated with this 3D polyline.

Parameters
newPointsNew set of coordinates defining this 3D polyline.
Returns
true on success, false otherwise.

◆ points() [3/3]

bool TSL3DPolyline::points ( TSL3DCoordSet * newPoints,
bool keepCoordSet = false )

Sets the points associated with this 3D polyline.

Parameters
newPointsNew set of coordinates defining this 3D polyline.
keepCoordSetFlag to indicate whether the 3D polyline should keep the specified coordinate set, or clone it. Note that if this flag is set, the 3D polyline assumes control of the coordinate set and invalidates it. The user should not attempt to make further use of the coordinate set.
Returns
true on success, false otherwise.

◆ postDistance() [1/2]

double TSL3DPolyline::postDistance ( ) const

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

◆ postDistance() [2/2]

void TSL3DPolyline::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.