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

Detailed Description

TSL3DEntity is an interface to a generic 3D entity.

TSL3DEntity and its derived classes are not instantiable classes. They may only be created by other calls to the API.

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

Public Member Functions

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
 

Additional Inherited Members

- Protected Member Functions inherited from TSLEntityBase
 ~TSLEntityBase ()
 

Member Function Documentation

◆ boundingBox() [1/2]

TSL3DBoundingBox TSL3DEntity::boundingBox ( int surfaceID = -1) const

Query the minimum bounding box of the entity.

Parameters
surfaceIDan id for a drawing surface. Since some entities, such as Symbol and Text, can vary according to the zoom factor, an optional surfaceID may be passed in. This is the id that has been attached to an individual drawing surface using TSLDrawingSurface::id(). By default these id's are -1 and therefore all drawing surfaces will share a common envelope.
Returns
the minimum bounding box of the entity.

◆ boundingBox() [2/2]

void TSL3DEntity::boundingBox ( TSL3DCoord & bottomLeft,
TSL3DCoord & topRight,
int surfaceID = -1 ) const

Query the minimum bounding box of the entity.

Parameters
bottomLeftStorage for bottom left of bounding box
topRightStorage for top right of bounding box
surfaceIDan id for a drawing surface. Since some entities, such as Symbol and Text, can vary according to the zoom factor, an optional surfaceID may be passed in. This is the id that has been attached to an individual drawing surface using TSLDrawingSurface::id(). By default these IDs are -1 and therefore all drawing surfaces will share a common envelope.

◆ centroid()

TSL3DCoord TSL3DEntity::centroid ( ) const

Query the centre of the entity extent.

This is the centre of the extent, rather than the centre of mass, which only applies to certain classes of object.

Returns a TSL3DCoord which is the centre of the TSL3DEntity.

◆ clone()

TSL3DEntity * TSL3DEntity::clone ( ) const

Returns a clone of the entity.

Note: You can not clone a entity which is a user geometry object.

◆ distance()

double TSL3DEntity::distance ( const TSL3DCoord & point,
bool useRenderedExtent = true,
int drawingSurfaceID = -1 ) const

Query the shortest distance between this entity and the specified point.

Parameters
pointPosition to query for distance from.
useRenderedExtentFlag to indicate whether to use last rendered extent of object. If this flag is true, then for text and symbols, and point inside the rendered extent will return 0.0 as the distance. If this flag is false, then for text and symbols, the distance to the object position is used. Default true
drawingSurfaceIDID of drawing surface to use for rendered extent.
Returns
the shortest distance between any points in the TSLEntity and the specified position. If the entity does not contain any points then returns 0.0 and places an error in TSLErrorStack.

◆ equals()

bool TSL3DEntity::equals ( const TSL3DEntity * other) const

Test for spatial equality with another entity.

Parameters
otherAnother entity to perform test against.
Returns
true if the entities are the same, false otherwise.

◆ move()

void TSL3DEntity::move ( const TSL3DCoord & location,
const TSL3DCoord & reference )

Moves this entity to the specified point.

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

Parameters
locationNew position for reference point.
referencePoint to translate

◆ parent() [1/2]

TSL3DEntitySet * TSL3DEntity::parent ( )

Query the entity set containing this entity.

If this is a free-standing or top-level entity, then NULL is returned.

◆ parent() [2/2]

const TSL3DEntitySet * TSL3DEntity::parent ( ) const

Query the read-only entity set containing this entity.

If this is a free-standing or top-level entity, then NULL is returned.

◆ scale() [1/2]

void TSL3DEntity::scale ( double scaleParam,
const TSL3DCoord * origin = 0 )

Scales this entity, equally in all directions.

Parameters
scaleParamScaling factor to apply. 0 is invalid.
originOrigin to scale about. If origin is NULL, the origin of the scale is the centroid of the TSL3DEntity.

◆ scale() [2/2]

void TSL3DEntity::scale ( double scaleX,
double scaleY,
double scaleZ,
const TSL3DCoord * origin = 0 )

Scales this entity.

Parameters
scaleXScaling factor to apply in X dimension. 0 is invalid.
scaleYScaling factor to apply in Y dimension. 0 is invalid.
scaleZScaling factor to apply in Z dimension. 0 is invalid.
originOrigin to scale about. If origin is NULL, the origin of the scale is the centroid of the TSL3DEntity.

For extruded entities the scaleX and scaleY are applied to the 2D shape in relation to the origin and the scaleZ is applied to the whole values of the extruded altitude and height. For non-extruded entities the scale factors are applied to the 3D position of the entity in the dimensions specified where the positive Z-axis passes from the centre of the earth through the north pole, the positive X-axis passes from the centre of the earth to the latitude of 0 and longitude of 0 and the positive Y-axis passes from the centre of the earth to the latitude 0 and longitude 90.

◆ squareDistance()

double TSL3DEntity::squareDistance ( const TSL3DCoord & point,
bool useRenderedExtent = true,
int drawingSurfaceID = -1 ) const

Query the shortest square distance between the entity and the specified point.

Parameters
pointPosition to query for square distance from.
useRenderedExtentFlag to indicate whether to use last rendered extent of object. If this flag is true, then for text and symbols, and point inside the rendered extent will return 0.0 as the distance. If this flag is false, then for text and symbols, the distance to the object position is used. Default true
drawingSurfaceIDID of drawing surface to use for rendered extent.
Returns
the shortest square distance between any points in the TSL3DEntity and the specified position. If the entity does not contain any points then return 0.0 and place error in TSLErrorStack.

◆ translate()

void TSL3DEntity::translate ( double latitudeOffset,
double longitudeOffset,
double altitudeOffset )

Translates this entity by delta.

Parameters
latitudeOffsetOffset to apply in Latitude direction.
longitudeOffsetOffset to apply in Longitude direction.
altitudeOffsetOffset to apply in Altitude direction