MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSL3DCoordSet Class Reference

Detailed Description

Class managing a set of internal TSL3DCoords.

Used to construct geometric objects such as 3D polylines, 3D polygons and triangle strips.

NOTE : Instances of TSL3DCoordSet must be allocated on the heap since the allocation is redirected to MapLink. To prevent users creating these objects statically, automatically or embedded, the destructor is private. To destroy a TSL3DCoordSet, call the public destroy method, rather than the delete operator.

Deprecated
Deprecated as of MapLink 11.1. Advised to use MapLink Earth SDK instead.

Public Member Functions

 TSL3DCoordSet ()
 
 TSL3DCoordSet (const TSL3DCoordSet &other)
 
bool add (double latitude, double longitude, double altitude, int index=-1)
 
bool add (const TSL3DCoord &coord, int index=-1)
 
bool add3DCoords (const TSL3DCoord *coords, int num)
 
bool add3DCoords (const double *latLongAlt, int num)
 
TSL3DAltitudeType altitudeType () const
 
TSL3DBoundingBox boundingBox () const
 
bool clear ()
 
bool concatenate (const TSL3DCoordSet &rhs)
 
bool destroy ()
 
TSL3DCoordelementAt (int index)
 
const TSL3DCoordelementAt (int index) const
 
bool move (const TSL3DCoord &location, const TSL3DCoord &reference)
 
bool nearest (const TSL3DCoord &coord, TSL3DCoord &nearestCoord, int &nearestIndex) const
 
TSL3DCoordoperator[] (int index)
 
const TSL3DCoordoperator[] (int index) const
 
bool remove (int index)
 
bool reverse ()
 
bool scale (double scaleParam, const TSL3DCoord *origin=0)
 
int size () const
 
bool translate (double latitudeOffset, double longitudeOffset, double altitudeOffset)
 
bool reserve (int num)
 
void * operator new (size_t size) TSL_NO_THROW
 
void * operator new (size_t size, char *filename, int line)
 

Constructor & Destructor Documentation

◆ TSL3DCoordSet() [1/2]

TSL3DCoordSet::TSL3DCoordSet ( )

Default constructor.

Creates an empty coordinate set.

Use the destroy method to destroy an instance of this class, rather than the delete operator.

◆ TSL3DCoordSet() [2/2]

TSL3DCoordSet::TSL3DCoordSet ( const TSL3DCoordSet & other)

Copy constructor.

Creates a coordinate set that is a copy of that specified.

Use the destroy method to destroy an instance of this class, rather than the delete operator.

Member Function Documentation

◆ add() [1/2]

bool TSL3DCoordSet::add ( const TSL3DCoord & coord,
int index = -1 )

Add a new coordinate to the set.

Parameters
coordNew coordinate to append
indexPosition for new point. If value is out of range, then new coordinate is appended.
Returns
true on success, false otherwise.

◆ add() [2/2]

bool TSL3DCoordSet::add ( double latitude,
double longitude,
double altitude,
int index = -1 )

Add a new coordinate to the set.

Parameters
latitudeLatitude value for new point
longitudeLongitude value for new point
altitudeAltitude value for new point
indexPosition for new point. If value is out of range, then new coordinate is appended.
Returns
true on success, false otherwise.

◆ add3DCoords() [1/2]

bool TSL3DCoordSet::add3DCoords ( const double * latLongAlt,
int num )

Add a number of new coordinates to the set.

Parameters
latLongAltPointer to new lat/long/alt triplets to append.
numNumber of lat/long/alt triplets to add
Returns
true on success, false on error.

◆ add3DCoords() [2/2]

bool TSL3DCoordSet::add3DCoords ( const TSL3DCoord * coords,
int num )

Add a number of new coordinates to the set.

Parameters
coordsPointer to new coordinates to append.
numNumber of coordinates to add
Returns
true on success, false on error.

◆ altitudeType()

TSL3DAltitudeType TSL3DCoordSet::altitudeType ( ) const

Return the altitude type of the coord set.

◆ boundingBox()

TSL3DBoundingBox TSL3DCoordSet::boundingBox ( ) const

Return the minimum bounding box of the coordinate set.

◆ clear()

bool TSL3DCoordSet::clear ( )

Clears the coordinate set.

◆ concatenate()

bool TSL3DCoordSet::concatenate ( const TSL3DCoordSet & rhs)

Concatenates another coordinate set to this object.

Parameters
rhscoordinate set to concatenate
Returns
false on error, true otherwise.

◆ destroy()

bool TSL3DCoordSet::destroy ( )

Destroy a TSL3DCoordSet.

NOTE : Instances of TSL3DCoordSet must be allocated on the heap since the allocation is redirected to MapLink. To prevent users creating these objects statically, automatically or embedded, we make the destructor private. To destroy a TSL3DCoordSet, call the public destroy method, rather than the delete operator.

◆ elementAt() [1/2]

TSL3DCoord & TSL3DCoordSet::elementAt ( int index)

Access the coordinate at the specified index.

Parameters
indexIndex into coordinate set
Returns
a reference to the specified coordinate.

◆ elementAt() [2/2]

const TSL3DCoord & TSL3DCoordSet::elementAt ( int index) const

Access the read-only coordinate at the specified index.

Parameters
indexIndex into coordinate set
Returns
a read-only reference to the specified coordinate.

◆ move()

bool TSL3DCoordSet::move ( const TSL3DCoord & location,
const TSL3DCoord & reference )

Moves the coordSet, matching the "reference" point of the coordSet (this can be a point which does not belong to the Entity) with the point defined by "location".

Parameters
locationPoint to move to.
referenceReference point to move from.
Returns
true on success, false otherwise.

◆ nearest()

bool TSL3DCoordSet::nearest ( const TSL3DCoord & coord,
TSL3DCoord & nearestCoord,
int & nearestIndex ) const

Queries for the index and value of the nearest coordinate in the coordset, to the specified point.

Parameters
coordCoord to find nearest to
nearestCoordStorage for nearest coordinate
nearestIndexStorage for index of nearest Coordinate

@returnReturns true on success, false on failure. By reference value and index of nearest coordinate.

◆ operator new() [1/2]

void * TSL3DCoordSet::operator new ( size_t size)

Allocation override for API redirection.

◆ operator new() [2/2]

void * TSL3DCoordSet::operator new ( size_t size,
char * filename,
int line )

When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.

◆ operator[]() [1/2]

TSL3DCoord & TSL3DCoordSet::operator[] ( int index)

Access the coordinate at the specified index.

Parameters
indexIndex into coordinate set
Returns
a reference to the specified coordinate.

◆ operator[]() [2/2]

const TSL3DCoord & TSL3DCoordSet::operator[] ( int index) const

Access the read-only coordinate at the specified index.

Parameters
indexIndex into coordinate set
Returns
a read-only reference to the specified coordinate.

◆ remove()

bool TSL3DCoordSet::remove ( int index)

Remove the coordinate at the specified index.

Parameters
indexPosition for the point to remove.
Returns
false on error, true otherwise.

◆ reserve()

bool TSL3DCoordSet::reserve ( int num)

Data Members for Associations DBLD Add to API

◆ reverse()

bool TSL3DCoordSet::reverse ( )

Reverses the order of the coordinate sequence in the set of coordinates.

Returns true on success, false otherwise.

◆ scale()

bool TSL3DCoordSet::scale ( double scaleParam,
const TSL3DCoord * origin = 0 )

Scales a coordSet. The origin of the scale is the bounding box center of the coordinate set if origin is NULL.

A scale factor of 0 is not valid.

Parameters
scaleParamScale factor
originLocation to scale about.
Returns
true on success, false otherwise.

◆ size()

int TSL3DCoordSet::size ( ) const

Query the number of coordinates in the coordinate set.

◆ translate()

bool TSL3DCoordSet::translate ( double latitudeOffset,
double longitudeOffset,
double altitudeOffset )

Moves the coordSet by the specified offset amounts.

Parameters
latitudeOffsetDelta to translate latitude
longitudeOffsetDelta to translate longitude
altitudeOffsetDelta to translate altitude
Returns
true on success, false otherwise.