![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Specialist entity for the handling of user-defined 3D geometry objects.
The 3D User Geometry Entity allows the developer to create an object that can be stored inside a TMF file and drawn as part of the drawing of a 3D Standard Data-Layer.
The developer should at minimum derive from TSL3DClientUserGeometryEntity in the application and implement the pure virtual draw method. Additional methods on TS3DLClientUserGeometryEntity may be overridden as necessary.
Only the methods defined on TSL3DClientUserGeometryEntity are supported for a user defined Entity at present. This means that setting of attributes etc. is not supported.
This extension is purely for rendering of objects defined by the user.
It is the developers responsibility to ensure thread safety.
When the position or size of the user geometry changes it is necessary to call the updateBoundingBox() method on the TSL3DEntitySet that contains the associated TSL3DUserGeometyEntity. This ensures that the viewport culling performed on the TSL3DEntitySet uses the current bounding sphere of the user geometry.
Note: If you are not using the version of Visual Studio that MapLink was built with then you need to manage the deletion of the TSL3DClientUser GeometryEntity derived object yourself.
Public Member Functions | |
TSL3DClientUserGeometryEntity * | getClientUserGeometryEntity () |
const TSL3DClientUserGeometryEntity * | getClientUserGeometryEntity () const |
void | setClientUserGeometryEntity (TSL3DClientUserGeometryEntity *client, bool ownsClient=false) |
bool | valid () const |
![]() | |
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 TSL3DUserGeometryEntity * | create (TSL3DClientUserGeometryEntity *client, bool takeOwnership=true) |
static TSL3DUserGeometryEntity * | isUserGeometry (TSL3DEntity *entity) |
static const TSL3DUserGeometryEntity * | isUserGeometry (const TSL3DEntity *entity) |
static bool | registerUserGeometryClientLoadCallback (TSL3DUserGeometryLoadCallback callback) |
Additional Inherited Members | |
![]() | |
~TSLEntityBase () | |
|
static |
Creates a 3D user geometry object 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.
client | An instance of TSL3DClientUserGeometryEntity |
takeOwnership | if true this instance takes ownership of the client. |
TSL3DClientUserGeometryEntity * TSL3DUserGeometryEntity::getClientUserGeometryEntity | ( | ) |
Returns the client user geometry entity instance attached to this TSL3DUser GeometryEntity.
const TSL3DClientUserGeometryEntity * TSL3DUserGeometryEntity::getClientUserGeometryEntity | ( | ) | const |
Returns the client user geometry entity instance attached to this TSL3DUser GeometryEntity.
|
static |
Query whether the entity is an TSL3DUserGeometryEntity.
If this entity is an TSL3DUserGeometryEntity, returns an accessor, otherwise returns NULL.
entity | the entity to query |
|
static |
Query whether the entity is an TSL3DUserGeometryEntity
If this entity is an TSL3DUserGeometryEntity returns an accessor, otherwise returns NULL.
entity | the entity to query |
|
static |
This function stores a pointer to the callback function to the User defined Load function that reads, creates and returns the 3D User Geometry object.
You can register more than one callback. Once registered you can not remove a callback.
callback | function to call to load user geometry object. |
void TSL3DUserGeometryEntity::setClientUserGeometryEntity | ( | TSL3DClientUserGeometryEntity * | client, |
bool | ownsClient = false ) |
Attaches an instance of TSL3DClientUserGeometryEntity to the TSL3DUser GeometryEntity.
This should be used to attach a handle to the developers TSL3DClientUser GeometryEntity derived class.
If this instance already has a client attached the client is deleted if it is owned otherwise the client is replaced.
client | A pointer to a TSL3DClientUserGeometryEntity derived class. |
ownsClient | Indicates if the TSL3DUserGeometryEntity owns the client. If true the attached TSL3DClientUserGeometryEntity will be deleted when the TSL3DUserGeometryEntity is destroyed. The default value is false. |
bool TSL3DUserGeometryEntity::valid | ( | ) | const |
Queries the validity of the 3D User Geometry (calls through to the Client valid method).
Returns true if it has, false otherwise.