![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Accessor for a set of 3D entities.
Allows creation and query of 3D entities.
Public Member Functions | |
bool | appendData (const char *filename) |
bool | appendDataFromBuffer (unsigned char *buffer, TSLSize length) |
bool | clear () |
TSL3DAPP6ASymbol * | create3DAPP6ASymbol (TSLFeatureID featureID, TSLAPP6ASymbol *symbol, TSL3DCoord ¢re, double height=0.0, double rotation=0.0) |
TSL3DEllipse * | 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) |
TSL3DEntitySet * | create3DEntitySet (TSLFeatureID featureID) |
TSL3DModel * | create3DModel (TSLFeatureID featureID, const TSL3DCoord &pos) |
TSL3DPolygon * | create3DPolygon (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false) |
TSL3DPolygon * | create3DPolygon (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DPolygon * | create3DPolygon (TSLFeatureID featureID, const TSL3DCoordSet &coordSet, TSL3DInterpolation interpolation) |
TSL3DPolyline * | create3DPolyline (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false) |
TSL3DPolyline * | create3DPolyline (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DPolyline * | create3DPolyline (TSLFeatureID featureID, const TSL3DCoordSet &coords, bool closed, TSL3DInterpolation interpolation, int noOfPoints=0, double postDistance=0.0) |
TSL3DQuad * | create3DQuad (TSLFeatureID featureID, const TSL3DCoord &c1, const TSL3DCoord &c2, const TSL3DCoord &c3, const TSL3DCoord &c4) |
TSL3DQuad * | create3DQuad (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DQuadStrip * | create3DQuadStrip (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false) |
TSL3DQuadStrip * | create3DQuadStrip (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DSensor * | 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) |
TSL3DSymbol * | create3DSymbol (TSLFeatureID featureID, const TSL3DCoord ¢er, double height=0.0, double rotation=0.0) |
TSL3DText * | create3DText (TSLFeatureID featureID, const TSL3DCoord &coord, const char *text, double height, TSLHorizontalAlignment hAlignment=TSLHorizontalAlignmentUndefined, TSLVerticalAlignment vAlignment=TSLVerticalAlignmentUndefined, double rotation=0.0) |
TSL3DTriangle * | create3DTriangle (TSLFeatureID featureID, const TSL3DCoord &c1, const TSL3DCoord &c2, const TSL3DCoord &c3) |
TSL3DTriangle * | create3DTriangle (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DTriangleFan * | create3DTriangleFan (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false) |
TSL3DTriangleFan * | create3DTriangleFan (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DTriangleStrip * | create3DTriangleStrip (TSLFeatureID featureID, TSL3DCoordSet *coords, bool keepCoordSet=false) |
TSL3DTriangleStrip * | create3DTriangleStrip (TSLFeatureID featureID, const TSL3DCoordSet &coords) |
TSL3DEntity * | createClone (const TSL3DEntity *source) |
TSLExtruded2DPolygon * | createExtruded2DPolygon (TSLFeatureID featureID, TSLPolygon *polygon, bool ownsPolygon=true) |
TSLExtruded2DPolygon * | createExtruded2DPolygon (TSLFeatureID featureID, TSLPolygon *polygon, TSL3DInterpolation interpolation, bool ownsPolygon=true) |
TSLExtruded2DPolyline * | createExtruded2DPolyline (TSLFeatureID featureID, TSLPolyline *polyline, bool ownsPolyline=true) |
TSLExtruded2DPolyline * | createExtruded2DPolyline (TSLFeatureID featureID, TSLPolyline *polyline, TSL3DInterpolation interpolation, int noOfPoints=0, double postDistance=0.0, bool ownsPolyline=true) |
TSLExtruded2DRectangle * | createExtruded2DRectangle (TSLFeatureID featureID, TSLRectangle *rectangle, bool ownsRectangle=true) |
TSL3DUserGeometryEntity * | create3DUserGeometry (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) |
TSL3DEntity * | operator[] (int index) |
const TSL3DEntity * | operator[] (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 () |
![]() | |
TSL3DBoundingBox | boundingBox (int surfaceID=-1) const |
void | boundingBox (TSL3DCoord &bottomLeft, TSL3DCoord &topRight, int surfaceID=-1) const |
TSL3DCoord | centroid () const |
TSL3DEntity * | clone () 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) |
TSL3DEntitySet * | parent () |
const TSL3DEntitySet * | parent () 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) |
![]() | |
bool | addDataSet () |
bool | addDataSet (TSLDataHandler *toUseDataHandler) |
bool | clearRenderingAttributes () |
TSLDataSet * | dataSet () |
const TSLDataSet * | dataSet () 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 |
TSL3DEntity * | is3DEntity () |
const TSL3DEntity * | is3DEntity () const |
TSLEntity * | isEntity () |
const TSLEntity * | isEntity () 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 TSL3DEntitySet * | create () |
static const TSL3DEntitySet * | is3DEntitySet (const TSL3DEntity *entity) |
static TSL3DEntitySet * | is3DEntitySet (TSL3DEntity *entity) |
Additional Inherited Members | |
![]() | |
~TSLEntityBase () | |
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.
filename | Load data file name. |
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.
buffer | Buffer containing data to load. |
length | Length of data in buffer. |
bool TSL3DEntitySet::clear | ( | ) |
This method clears the set of entities, without deleting it. Returns true if successful, false otherwise.
|
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.
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.
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. |
centre | Coordinate at which to place the 3D APP6A symbol |
height | Size of text in metres (currently ignored) |
rotation | As 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. |
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.
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. |
coord | Coordinate at which to place the 3d ellipse |
radiusX | Radius in the x-axis in metres, this is dependent on the ENURotation flag |
radiusY | Radius in the y-axis in metres, this is dependent on the ENURotation flag |
interpolate | Flag to set whether polyline representation points are recalculated for each render. |
angularIncrement | The angular difference, in radians, between points about the centre coordinate used to create a polyline representation of the ellipse used for rendering. |
ENURotation | Set 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. |
rotationX | Rotation about the x-axis, +ve anticlockwise and in radians; this is dependent on the ENURotation flag |
rotationY | Rotation about the y-axis, +ve anticlockwise and in radians; this is dependent on the ENURotation flag |
rotationZ | Rotation about the z-axis, +ve anticlockwise and in radians; this is dependent on the ENURotation flag |
TSL3DEntitySet * TSL3DEntitySet::create3DEntitySet | ( | TSLFeatureID | featureID | ) |
Creates an instance of a 3D entity set within this entity set.
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. |
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.
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. |
pos | Coordinate at which to place the 3d model |
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.
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. |
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.
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.
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. |
keepCoordSet | Flag 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. |
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.
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 polyline. |
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.
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 3D polyline. |
closed | Sets whether the 3D polyline is closed. |
interpolation | Type of interpolation to undertake. Defaults to None. |
TSL3DInterpolationNone | no interpolation |
TSL3DInterpolationXXXCreation | interpolate at creation time. Requires noOf Points or postDistance to be set. |
TSL3DInterpolationXXXDisplay | interpolation at display time. noOfPoints is taken as a maximum number of Points and postDistance is ignored. |
Where XXX is either Sphere or Ellipsoid.
noOfPoints | Number of points to create when doing the interpolation. Defaults to 0 (no-limit) |
postDistance | The distance in KM between interpolation points. Defaults to 0.0. |
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.
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 polyline. |
keepCoordSet | Flag 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. |
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.
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. |
c1,c2,c3,c4 | Coordinates describing the quad |
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.
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 quad. This must contain 4 points |
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.
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 quad strip. If the number of vertices is odd the last vertex is ignored. |
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.
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 quad strip. If the number of vertices is odd the last vertex is ignored. |
keepCoordSet | Flag 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. |
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.
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. |
coord | Coordinate at which to place the 3d sensor |
radius | Radius of the sensor in metres, this is dependent on the ENURotation flag |
minAzimuth | Minimum 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 |
maxAzimuth | Maximum 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 |
minElevation | Minimum 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 |
maxElevation | Maximum 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 |
ENURotation | Set 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. |
rotationX | Rotation about the x-axis, anti-clockwise being +ve, in radians; this is dependent on the ENURotation flag |
rotationY | Rotation about the y-axis, anti-clockwise being +ve, in radians; this is dependent on the ENURotation flag |
rotationZ | Rotation about the z-axis, anti-clockwise being +ve, in radians; this is dependent on the ENURotation flag |
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.
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. |
centre | Coordinate at which to place the 3d symbol |
rotation | As 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. |
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.
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. |
coord | Coordinate at which to place the 3d text |
value | The character string to be displayed by this text object |
height | Size of text in metres. |
hAlignment | Horizontal alignment of text. |
vAlignment | Vertical alignment of text. |
rotation | As 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. |
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.
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. |
c1,c2,c3,Coordinates | describing the triangle |
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.
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 triangle This must contain 3 points |
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.
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 triangle fan |
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.
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 triangle fan |
keepCoordSet | Flag 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. |
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.
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 triangle strip |
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.
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 triangle strip |
keepCoordSet | Flag 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. |
TSL3DUserGeometryEntity * TSL3DEntitySet::create3DUserGeometry | ( | TSL3DClientUserGeometryEntity * | client, |
bool | takeOwnership = true ) |
Creates a user-implemented geometry object with the specified parameters.
client | An instance of a class inheriting from TSLClientUserGeometryEntity |
takeOwnership | if true this instance takes ownership of the client. |
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.
source | Source entity to clone. |
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.
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. |
polygon | Base 2D polygon to use. |
ownsPolygon | If 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. |
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.
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. |
polygon | Base 2D Polygon to use. |
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. |
ownsPolygon | If 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. |
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.
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. |
polyline | Base 2D Polyline to use. |
ownsPolyline | If 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. |
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.
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. |
polyline | Base 2D Polyline to use. |
interpolation | Type of interpolation to undertake. Defaults to None. |
TSL3DInterpolationNone | no interpolation |
TSL3DInterpolationXXXCreation | interpolate at creation time. Requires noOf Points or postDistance to be set. |
TSL3DInterpolationXXXDisplay | interpolation at display time. noOfPoints is taken as a maximum number of Points and postDistance is ignored. |
Where XXX is either Sphere or Ellipsoid.
noOfPoints | Number of points to create when doing the interpolation. Defaults to 0 (no-limit) |
postDistance | The distance in KM between interpolation points. Defaults to 0.0. |
ownsPolyline | If 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. |
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.
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. |
rectangle | Base 2D rectangle to use. |
ownsRectangle | If 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. |
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.
buffer | Buffer to be deleted, returned from saveDataToBuffer. |
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.
source | Entity to insert into the set. |
index | Position to place entity. If this is out of range of the current entity set, then it is appended to the set. |
|
static |
Query whether the entity is a 3d entity set.
If this entity is a 3D Entity Set, returns an accessor, otherwise returns NULL.
entity | the entity to query. |
|
static |
Query whether the entity is a 3d entity set.
If this entity is a 3D Entity Set, returns an accessor, otherwise returns NULL.
entity | the entity to query. |
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.
filename | Load data file name. |
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.
buffer | Buffer containing data to load. |
length | Length of data in buffer. |
TSL3DEntity * TSL3DEntitySet::operator[] | ( | int | index | ) |
Queries the 3D entity at the specified index.
index | Index into set to return |
const TSL3DEntity * TSL3DEntitySet::operator[] | ( | int | index | ) | const |
Queries the read-only 3D entity at the specified index.
index | Index into set to return |
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.
filename | Save data file name. |
ver | MapLink version to save as. |
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.
length | Storage for length of returned buffer. |
ver | MapLink version to save as. |
int TSL3DEntitySet::size | ( | ) | const |
Queries the number of entities within the entity set.
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.