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

Detailed Description

Accessor for a set of 3D entities.

Allows creation and query of 3D entities.

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

Public Member Functions

bool appendData (const char *filename)
 
bool appendDataFromBuffer (unsigned char *buffer, TSLSize length)
 
bool clear ()
 
TSL3DAPP6ASymbolcreate3DAPP6ASymbol (TSLFeatureID featureID, TSLAPP6ASymbol *symbol, TSL3DCoord &centre, double height=0.0, double rotation=0.0)
 
TSL3DEllipsecreate3DEllipse (TSLFeatureID featureID, const TSL3DCoord &coord, double radiusX, double radiusY, bool interpolate=true, double angularIncrement=0.0, bool ENURotation=true, double rotationX=0.0, double rotationY=0.0, double rotationZ=0.0)
 
TSL3DEntitySetcreate3DEntitySet (TSLFeatureID featureID)
 
TSL3DModelcreate3DModel (TSLFeatureID featureID, const TSL3DCoord &pos)
 
TSL3DPolygoncreate3DPolygon (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false)
 
TSL3DPolygoncreate3DPolygon (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DPolygoncreate3DPolygon (TSLFeatureID featureID, const TSL3DCoordSet &coordSet, TSL3DInterpolation interpolation)
 
TSL3DPolylinecreate3DPolyline (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false)
 
TSL3DPolylinecreate3DPolyline (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DPolylinecreate3DPolyline (TSLFeatureID featureID, const TSL3DCoordSet &coords, bool closed, TSL3DInterpolation interpolation, int noOfPoints=0, double postDistance=0.0)
 
TSL3DQuadcreate3DQuad (TSLFeatureID featureID, const TSL3DCoord &c1, const TSL3DCoord &c2, const TSL3DCoord &c3, const TSL3DCoord &c4)
 
TSL3DQuadcreate3DQuad (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DQuadStripcreate3DQuadStrip (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false)
 
TSL3DQuadStripcreate3DQuadStrip (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DSensorcreate3DSensor (TSLFeatureID featureID, const TSL3DCoord &coord, double radius, double minAzimuth, double maxAzimuth, double minElevation, double maxElevation, bool ENURotation=true, double rotationX=0.0, double rotationY=0.0, double rotationZ=0.0)
 
TSL3DSymbolcreate3DSymbol (TSLFeatureID featureID, const TSL3DCoord &center, double height=0.0, double rotation=0.0)
 
TSL3DTextcreate3DText (TSLFeatureID featureID, const TSL3DCoord &coord, const char *text, double height, TSLHorizontalAlignment hAlignment=TSLHorizontalAlignmentUndefined, TSLVerticalAlignment vAlignment=TSLVerticalAlignmentUndefined, double rotation=0.0)
 
TSL3DTrianglecreate3DTriangle (TSLFeatureID featureID, const TSL3DCoord &c1, const TSL3DCoord &c2, const TSL3DCoord &c3)
 
TSL3DTrianglecreate3DTriangle (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DTriangleFancreate3DTriangleFan (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false)
 
TSL3DTriangleFancreate3DTriangleFan (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DTriangleStripcreate3DTriangleStrip (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false)
 
TSL3DTriangleStripcreate3DTriangleStrip (TSLFeatureID featureID, const TSL3DCoordSet &coords)
 
TSL3DEntitycreateClone (const TSL3DEntity *source)
 
TSLExtruded2DPolygoncreateExtruded2DPolygon (TSLFeatureID featureID, TSLPolygon *polygon, bool ownsPolygon=true)
 
TSLExtruded2DPolygoncreateExtruded2DPolygon (TSLFeatureID featureID, TSLPolygon *polygon, TSL3DInterpolation interpolation, bool ownsPolygon=true)
 
TSLExtruded2DPolylinecreateExtruded2DPolyline (TSLFeatureID featureID, TSLPolyline *polyline, bool ownsPolyline=true)
 
TSLExtruded2DPolylinecreateExtruded2DPolyline (TSLFeatureID featureID, TSLPolyline *polyline, TSL3DInterpolation interpolation, int noOfPoints=0, double postDistance=0.0, bool ownsPolyline=true)
 
TSLExtruded2DRectanglecreateExtruded2DRectangle (TSLFeatureID featureID, TSLRectangle *rectangle, bool ownsRectangle=true)
 
TSL3DUserGeometryEntitycreate3DUserGeometry (TSL3DClientUserGeometryEntity *client, bool takeOwnership=true)
 
bool deleteBufferData (unsigned char *buffer) const
 
bool insert (TSL3DEntity *source, int index=-1)
 
bool loadData (const char *filename)
 
bool loadDataFromBuffer (unsigned char *buffer, TSLTMC length)
 
TSL3DEntityoperator[] (int index)
 
const TSL3DEntityoperator[] (int index) const
 
bool saveData (const char *filename, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const
 
unsigned char * saveDataToBuffer (TSLSize *length, TSLMapLinkVersion ver=TSL_CURRENT_MAPLINK_VERSION) const
 
int size () const
 
void updateBoundingBox ()
 
- 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 TSL3DEntitySetcreate ()
 
static const TSL3DEntitySetis3DEntitySet (const TSL3DEntity *entity)
 
static TSL3DEntitySetis3DEntitySet (TSL3DEntity *entity)
 

Additional Inherited Members

- Protected Member Functions inherited from TSLEntityBase
 ~TSLEntityBase ()
 

Member Function Documentation

◆ appendData()

bool TSL3DEntitySet::appendData ( const char * filename)

Appends data from the specified file.

This method allows the user to append data from the given filename into the TSL3DEntitySet. The data is appended at the end of the TSL3DEntitySet.

Parameters
filenameLoad data file name.
Returns
true on success, or false on error.

◆ appendDataFromBuffer()

bool TSL3DEntitySet::appendDataFromBuffer ( unsigned char * buffer,
TSLSize length )

Loads data from the specified buffer.

This method allows the user to load data from the given buffer into the TSL3DEntitySet. The data is appended at the end of the TSL3DEntitySet.

Parameters
bufferBuffer containing data to load.
lengthLength of data in buffer.
Returns
true on success, or false on error.

◆ clear()

bool TSL3DEntitySet::clear ( )

This method clears the set of entities, without deleting it. Returns true if successful, false otherwise.

◆ create()

static TSL3DEntitySet * TSL3DEntitySet::create ( )
static

Creates an empty entity set.

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.

◆ create3DAPP6ASymbol()

TSL3DAPP6ASymbol * TSL3DEntitySet::create3DAPP6ASymbol ( TSLFeatureID featureID,
TSLAPP6ASymbol * symbol,
TSL3DCoord & centre,
double height = 0.0,
double rotation = 0.0 )

Creates an instance of a 3D APP6A symbol with the specified parameters.

The new entity is automatically added to this entity set.

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.
centreCoordinate at which to place the 3D APP6A symbol
heightSize of text in metres (currently ignored)
rotationAs a symbol will always face the camera, the angle of rotation is about the axis made between the symbol and the camera. It should be specified in radians, +ve anti-clockwise.
Returns
NULL on error.

◆ create3DEllipse()

TSL3DEllipse * TSL3DEntitySet::create3DEllipse ( TSLFeatureID featureID,
const TSL3DCoord & coord,
double radiusX,
double radiusY,
bool interpolate = true,
double angularIncrement = 0.0,
bool ENURotation = true,
double rotationX = 0.0,
double rotationY = 0.0,
double rotationZ = 0.0 )

Creates an instance of a 3D ellipse with the specified parameters.

The new entity is automatically added to this entity set.

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.
coordCoordinate at which to place the 3d ellipse
radiusXRadius in the x-axis in metres, this is dependent on the ENURotation flag
radiusYRadius in the y-axis in metres, this is dependent on the ENURotation flag
interpolateFlag to set whether polyline representation points are recalculated for each render.
angularIncrementThe angular difference, in radians, between points about the centre coordinate used to create a polyline representation of the ellipse used for rendering.
ENURotationSet whether to use geocentric coordinate space for the rotations and radii or East, North and Up from the ellipse's position tangentally on the earth.
rotationXRotation about the x-axis, +ve anticlockwise and in radians; this is dependent on the ENURotation flag
rotationYRotation about the y-axis, +ve anticlockwise and in radians; this is dependent on the ENURotation flag
rotationZRotation about the z-axis, +ve anticlockwise and in radians; this is dependent on the ENURotation flag
Returns
NULL on error.

◆ create3DEntitySet()

TSL3DEntitySet * TSL3DEntitySet::create3DEntitySet ( TSLFeatureID featureID)

Creates an instance of a 3D entity set within this entity set.

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.
Returns
NULL on error.

◆ create3DModel()

TSL3DModel * TSL3DEntitySet::create3DModel ( TSLFeatureID featureID,
const TSL3DCoord & pos )

Creates an instance of a 3D model with the specified parameters.

The new entity is automatically added to this entity set.

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.
posCoordinate at which to place the 3d model
Returns
NULL on error.

◆ create3DPolygon() [1/3]

TSL3DPolygon * TSL3DEntitySet::create3DPolygon ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D polygon with the specified parameters.

A polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole. All coordinate for the 3D polygon must lie in a single plane.

The new entity is automatically added to this entity set.

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 polygon.
Returns
NULL on error.

◆ create3DPolygon() [2/3]

TSL3DPolygon * TSL3DEntitySet::create3DPolygon ( TSLFeatureID featureID,
const TSL3DCoordSet & coordSet,
TSL3DInterpolation interpolation )

Creates a 3D interpolated Polygon with the specified parameters.

A 3D polygon is a closed, filled, planar feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole.

All points for inners and outer of a 3D polygon must lie in the same plane.

The resultant polygon will be interpolated across the surface of the Earth.

Polygons which are interpolated at Creation time can only have height components which are relative to Mean Sea Level.

Creation and Sphere interpolation are the least computational intensive.

The new entity is automatically added to this entity set.

Argument description list:

featureID: ID 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.

coords: Coordinate set describing the polygon.

interpolation : Type of interpolation to undertake. Defaults to None. TSL3DInterpolationNone : no interpolation TSL3DInterpolationGrid: Creates points where the polygon intersects with a Grid. The number of subdivisions in a grid is based on the height of the polygon from the Earth's surface.

Returns NULL on error.

◆ create3DPolygon() [3/3]

TSL3DPolygon * TSL3DEntitySet::create3DPolygon ( TSLFeatureID featureID,
TSL3DCoordSet * coords,
bool keepCoordSet = false )

Creates a 3D polygon with the specified parameters.

A polygon is a closed, filled feature. It must be non-complex, ie. edges must not cross, although they may touch. In addition, any holes may not touch or cross the outer, nor touch or cross any other hole. All coordinate for the 3D polygon must lie in a single plane.

The new entity is automatically added to this entity set.

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 polygon.
keepCoordSetFlag to indicate whether the polygon should keep the specified coordinate set, or clone it. Note that if this flag is set, the polygon 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.

◆ create3DPolyline() [1/3]

TSL3DPolyline * TSL3DEntitySet::create3DPolyline ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D polyline with the specified parameters.

The new entity is automatically added the this entity set.

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 polyline.
Returns
NULL on error.

◆ create3DPolyline() [2/3]

TSL3DPolyline * TSL3DEntitySet::create3DPolyline ( TSLFeatureID featureID,
const TSL3DCoordSet & coords,
bool closed,
TSL3DInterpolation interpolation,
int noOfPoints = 0,
double postDistance = 0.0 )

Creates a 3D Polyline with the specified parameters.

The new entity is automatically added to this entity set.

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
noOfPointsNumber 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 noOfPoints or postDistance should be set. If both values are non zero then the postDistance is ignored.

◆ create3DPolyline() [3/3]

TSL3DPolyline * TSL3DEntitySet::create3DPolyline ( TSLFeatureID featureID,
TSL3DCoordSet * coords,
bool keepCoordSet = false )

Creates a 3D polyline with the specified parameters.

The new entity is automatically added the this entity set.

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 polyline.
keepCoordSetFlag to indicate whether the polyline should keep the specified coordinate set, or clone it. Note that if this flag is set, the 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.

◆ create3DQuad() [1/2]

TSL3DQuad * TSL3DEntitySet::create3DQuad ( TSLFeatureID featureID,
const TSL3DCoord & c1,
const TSL3DCoord & c2,
const TSL3DCoord & c3,
const TSL3DCoord & c4 )

Creates a 3D quad with the specified parameters.

A quad is a closed, filled, 4 point feature. It must be non-complex. All points of the quad must lie in the same plane.

The new entity is automatically added to this entity set.

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.
c1,c2,c3,c4Coordinates describing the quad
Returns
NULL on error.

◆ create3DQuad() [2/2]

TSL3DQuad * TSL3DEntitySet::create3DQuad ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D quad with the specified parameters.

A quad is a closed, filled, 4 point feature. It must be non-complex. All points of the quad must lie in the same plane.

The new entity is automatically added to this entity set.

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 quad. This must contain 4 points
Returns
NULL on error.

◆ create3DQuadStrip() [1/2]

TSL3DQuadStrip * TSL3DEntitySet::create3DQuadStrip ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D quad strip with the specified parameters.

The new entity is automatically added to this entity set.

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 quad strip. If the number of vertices is odd the last vertex is ignored.
Returns
NULL on error.

◆ create3DQuadStrip() [2/2]

TSL3DQuadStrip * TSL3DEntitySet::create3DQuadStrip ( TSLFeatureID featureID,
TSL3DCoordSet * coords,
bool keepCoordSet = false )

Creates a 3D quad strip with the specified parameters.

The new entity is automatically added to this entity set.

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 quad strip. If the number of vertices is odd the last vertex is ignored.
keepCoordSetFlag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity 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.

◆ create3DSensor()

TSL3DSensor * TSL3DEntitySet::create3DSensor ( TSLFeatureID featureID,
const TSL3DCoord & coord,
double radius,
double minAzimuth,
double maxAzimuth,
double minElevation,
double maxElevation,
bool ENURotation = true,
double rotationX = 0.0,
double rotationY = 0.0,
double rotationZ = 0.0 )

Creates a 3D sensor with the specified parameters.

The new entity is automatically added to this entity set.

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.
coordCoordinate at which to place the 3d sensor
radiusRadius of the sensor in metres, this is dependent on the ENURotation flag
minAzimuthMinimum sweep angle in the unrotated z-axis, specified in radians where +ve is the same as the +ve z-axis; this is dependent on the ENURotation flag
maxAzimuthMaximum sweep angle in the unrotated z-axis, specified in radians where +ve is the same as the +ve z-axis; this is dependent on the ENURotation flag
minElevationMinimum sweep angle in the unrotated y-axis, specified in radians where +ve is the same as the +ve y-axis; this is dependent on the ENURotation flag
maxElevationMaximum sweep angle in the unrotated y-axis, specified in radians where +ve is the same as the +ve y-axis; this is dependent on the ENURotation flag
ENURotationSet whether to use geocentric coordinate space for the rotations of the sensor or Easting, Northing and Up from the sensor's coord tangentally on the earth. With this flag set to false, the sensor is created down the x-axis, rotated and then translated; set to true and the sensor is created down the easting axis, rotated and translated. This value also determines how the azimuth and elevation angles are interpreted; set to false then the azimuth and elevation sweep in the unrotated z and y axes respectively, set to true then they sweep in the unrotated Up and Northing axes respectively.
rotationXRotation about the x-axis, anti-clockwise being +ve, in radians; this is dependent on the ENURotation flag
rotationYRotation about the y-axis, anti-clockwise being +ve, in radians; this is dependent on the ENURotation flag
rotationZRotation about the z-axis, anti-clockwise being +ve, in radians; this is dependent on the ENURotation flag
Returns
NULL on error.

◆ create3DSymbol()

TSL3DSymbol * TSL3DEntitySet::create3DSymbol ( TSLFeatureID featureID,
const TSL3DCoord & center,
double height = 0.0,
double rotation = 0.0 )

Creates a 3D symbol with the specified parameters.

The new entity is automatically added to this entity set.

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.
centreCoordinate at which to place the 3d symbol
rotationAs a symbol will always face the camera, the angle of rotation is about the axis made between the symbol and the camera. It should be specified in radians, +ve anti-clockwise.
Returns
NULL on error.

◆ create3DText()

TSL3DText * TSL3DEntitySet::create3DText ( TSLFeatureID featureID,
const TSL3DCoord & coord,
const char * text,
double height,
TSLHorizontalAlignment hAlignment = TSLHorizontalAlignmentUndefined,
TSLVerticalAlignment vAlignment = TSLVerticalAlignmentUndefined,
double rotation = 0.0 )

Creates a 3D text with the specified parameters.

The new entity is automatically added to this entity set.

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.
coordCoordinate at which to place the 3d text
valueThe character string to be displayed by this text object
heightSize of text in metres.
hAlignmentHorizontal alignment of text.
vAlignmentVertical alignment of text.
rotationAs a text will always face the camera, the angle of rotation is about the axis made between the symbol and the camera. It should be specified in radians, +ve anti-clockwise.
Returns
NULL on error.

◆ create3DTriangle() [1/2]

TSL3DTriangle * TSL3DEntitySet::create3DTriangle ( TSLFeatureID featureID,
const TSL3DCoord & c1,
const TSL3DCoord & c2,
const TSL3DCoord & c3 )

Creates a 3D triangle with the specified parameters.

A triangle is a closed, filled, 3 point feature.

The new entity is automatically added to this entity set.

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.
c1,c2,c3,Coordinatesdescribing the triangle
Returns
NULL on error.

◆ create3DTriangle() [2/2]

TSL3DTriangle * TSL3DEntitySet::create3DTriangle ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D triangle with the specified parameters.

A triangle is a closed, filled, 3 point feature.

The new entity is automatically added to this entity set.

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 triangle This must contain 3 points
Returns
NULL on error.

◆ create3DTriangleFan() [1/2]

TSL3DTriangleFan * TSL3DEntitySet::create3DTriangleFan ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D triangle fan with the specified parameters.

The new entity is automatically added to this entity set.

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 triangle fan
Returns
NULL on error.

◆ create3DTriangleFan() [2/2]

TSL3DTriangleFan * TSL3DEntitySet::create3DTriangleFan ( TSLFeatureID featureID,
TSL3DCoordSet * coords,
bool keepCoordSet = false )

Creates a 3D triangle fan with the specified parameters.

The new entity is automatically added to this entity set.

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 triangle fan
keepCoordSetFlag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity 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.

◆ create3DTriangleStrip() [1/2]

TSL3DTriangleStrip * TSL3DEntitySet::create3DTriangleStrip ( TSLFeatureID featureID,
const TSL3DCoordSet & coords )

Creates a 3D triangle strip with the specified parameters.

The new entity is automatically added to this entity set.

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 triangle strip
Returns
NULL on error.

◆ create3DTriangleStrip() [2/2]

TSL3DTriangleStrip * TSL3DEntitySet::create3DTriangleStrip ( TSLFeatureID featureID,
TSL3DCoordSet * coords,
bool keepCoordSet = false )

Creates a 3D triangle strip with the specified parameters.

The new entity is automatically added to this entity set.

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 triangle strip
keepCoordSetFlag to indicate whether the entity should keep the specified coordinate set, or clone it. Note that if this flag is set, the entity 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.

◆ create3DUserGeometry()

TSL3DUserGeometryEntity * TSL3DEntitySet::create3DUserGeometry ( TSL3DClientUserGeometryEntity * client,
bool takeOwnership = true )

Creates a user-implemented geometry object with the specified parameters.

Parameters
clientAn instance of a class inheriting from TSLClientUserGeometryEntity
takeOwnershipif true this instance takes ownership of the client.

◆ createClone()

TSL3DEntity * TSL3DEntitySet::createClone ( const TSL3DEntity * source)

Creates a clone of the specified 3D entity.

Once created, the clone is added to this entity set and returned for further manipulation.

Parameters
sourceSource entity to clone.
Returns
entity pointer, NULL on error.

◆ createExtruded2DPolygon() [1/2]

TSLExtruded2DPolygon * TSL3DEntitySet::createExtruded2DPolygon ( TSLFeatureID featureID,
TSLPolygon * polygon,
bool ownsPolygon = true )

Creates an extruded 2D polygon with the specified parameters.

The new entity is automatically added to this entity set.

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.
polygonBase 2D polygon to use.
ownsPolygonIf true, the extruded 2D polygon will assume ownership of the base 2D polygon. Otherwise a copy of the polygon is made. The default is true.
Returns
NULL on error.

◆ createExtruded2DPolygon() [2/2]

TSLExtruded2DPolygon * TSL3DEntitySet::createExtruded2DPolygon ( TSLFeatureID featureID,
TSLPolygon * polygon,
TSL3DInterpolation interpolation,
bool ownsPolygon = true )

Creates an extruded 2D polyline with the specified parameters.

The new entity is automatically added to this entity set.

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.
polygonBase 2D Polygon to use.
interpolationType of interpolation to undertake. Defaults to None.
TSL3DInterpolationNoneno interpolation
TSL3DInterpolationGridCreates points where the polygon intersects with a Grid. The number of subdivisions in a grid is based on the height of the polygon from the Earth's surface.
ownsPolygonIf true, the extruded 2D polygon will assume ownership of the base 2D polygon. Otherwise a copy of the polygon is made. The default is true.
Returns
NULL on error.

◆ createExtruded2DPolyline() [1/2]

TSLExtruded2DPolyline * TSL3DEntitySet::createExtruded2DPolyline ( TSLFeatureID featureID,
TSLPolyline * polyline,
bool ownsPolyline = true )

Creates an extruded 2D polyline with the specified parameters.

The new entity is automatically added to this entity set.

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.

◆ createExtruded2DPolyline() [2/2]

TSLExtruded2DPolyline * TSL3DEntitySet::createExtruded2DPolyline ( TSLFeatureID featureID,
TSLPolyline * polyline,
TSL3DInterpolation interpolation,
int noOfPoints = 0,
double postDistance = 0.0,
bool ownsPolyline = true )

Creates an extruded 2D polyline with the specified parameters.

The new entity is automatically added to this entity set.

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.
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
noOfPointsNumber 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 noOfPoints or postDistance should be set. If both values are non zero then the postDistance is ignored.

◆ createExtruded2DRectangle()

TSLExtruded2DRectangle * TSL3DEntitySet::createExtruded2DRectangle ( TSLFeatureID featureID,
TSLRectangle * rectangle,
bool ownsRectangle = true )

Creates an extruded 2D rectangle with the specified parameters.

The new entity is automatically added to this entity set.

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.
rectangleBase 2D rectangle to use.
ownsRectangleIf true, the extruded 2D rectangle will assume ownership of the base 2D rectangle. Otherwise a copy of the rectangle is made. The default is true.
Returns
NULL on error.

◆ deleteBufferData()

bool TSL3DEntitySet::deleteBufferData ( unsigned char * buffer) const

Delete the buffer returned from 'saveDataToBuffer'.

This method must be used to delete the buffer after a call to 'saveDataTo Buffer'. If this does not happen then memory will be leaked.

Parameters
bufferBuffer to be deleted, returned from saveDataToBuffer.

◆ insert()

bool TSL3DEntitySet::insert ( TSL3DEntity * source,
int index = -1 )

Inserts an entity into this 3D entity set.

The entity is placed at the specified index. If the index is out of the current range, then it is appended to the entity set.

An entity may only exist in one entity set. It is removed from its current entity set before being inserted into the new one.

Parameters
sourceEntity to insert into the set.
indexPosition to place entity. If this is out of range of the current entity set, then it is appended to the set.
Returns
false on error, true otherwise.

◆ is3DEntitySet() [1/2]

static const TSL3DEntitySet * TSL3DEntitySet::is3DEntitySet ( const TSL3DEntity * entity)
static

Query whether the entity is a 3d entity set.

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

Parameters
entitythe entity to query.

◆ is3DEntitySet() [2/2]

static TSL3DEntitySet * TSL3DEntitySet::is3DEntitySet ( TSL3DEntity * entity)
static

Query whether the entity is a 3d entity set.

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

Parameters
entitythe entity to query.

◆ loadData()

bool TSL3DEntitySet::loadData ( const char * filename)

Loads data from the specified file.

This method allows the user to load data from the given filename into the TSL3DEntitySet. The TSL3DEntitySet is cleared first.

Parameters
filenameLoad data file name.
Returns
true on success, or false on error.

◆ loadDataFromBuffer()

bool TSL3DEntitySet::loadDataFromBuffer ( unsigned char * buffer,
TSLTMC length )

Loads data from the specified buffer.

This method allows the user to load data from the given buffer into the TSL3DEntitySet. The TSL3DEntitySet is cleared first.

Parameters
bufferBuffer containing data to load.
lengthLength of data in buffer.
Returns
true on success, or false on error.

◆ operator[]() [1/2]

TSL3DEntity * TSL3DEntitySet::operator[] ( int index)

Queries the 3D entity at the specified index.

Parameters
indexIndex into set to return
Returns
entity pointer, NULL on error.

◆ operator[]() [2/2]

const TSL3DEntity * TSL3DEntitySet::operator[] ( int index) const

Queries the read-only 3D entity at the specified index.

Parameters
indexIndex into set to return
Returns
read-only entity pointer, NULL on error.

◆ saveData()

bool TSL3DEntitySet::saveData ( const char * filename,
TSLMapLinkVersion ver = TSL_CURRENT_MAPLINK_VERSION ) const

Saves data to the specified file.

This method allows the user to save the data currently loaded in the TSL3DEntitySet to the given filename.

Parameters
filenameSave data file name.
verMapLink version to save as.
Returns
true on success, or false on error.

◆ saveDataToBuffer()

unsigned char * TSL3DEntitySet::saveDataToBuffer ( TSLSize * length,
TSLMapLinkVersion ver = TSL_CURRENT_MAPLINK_VERSION ) const

Saves data to the specified buffer.

This method allows the user to save the data currently loaded in the TSL3DEntitySet to a buffer. It is the callers responsibility to free the buffer using the 'deleteBufferData' call.

Parameters
lengthStorage for length of returned buffer.
verMapLink version to save as.
Returns
address of the buffer where the data has been saved, NULL on error.

◆ size()

int TSL3DEntitySet::size ( ) const

Queries the number of entities within the entity set.

◆ updateBoundingBox()

void TSL3DEntitySet::updateBoundingBox ( )

Informs the entity set that it needs to recalculate its bounding box. The recalculation is not performed immediately, instead it is done the next time the bounding box is used.

The main use of this function is in conjunction with 3D User Geometry entities. It allows the user geometry to notify the entity set when it has moves or its bounding sphere otherwise changes.