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

Detailed Description

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.

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

Public Member Functions

TSL3DClientUserGeometryEntitygetClientUserGeometryEntity ()
 
const TSL3DClientUserGeometryEntitygetClientUserGeometryEntity () const
 
void setClientUserGeometryEntity (TSL3DClientUserGeometryEntity *client, bool ownsClient=false)
 
bool valid () const
 
- 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 TSL3DUserGeometryEntitycreate (TSL3DClientUserGeometryEntity *client, bool takeOwnership=true)
 
static TSL3DUserGeometryEntityisUserGeometry (TSL3DEntity *entity)
 
static const TSL3DUserGeometryEntityisUserGeometry (const TSL3DEntity *entity)
 
static bool registerUserGeometryClientLoadCallback (TSL3DUserGeometryLoadCallback callback)
 

Additional Inherited Members

- Protected Member Functions inherited from TSLEntityBase
 ~TSLEntityBase ()
 

Member Function Documentation

◆ create()

static TSL3DUserGeometryEntity * TSL3DUserGeometryEntity::create ( TSL3DClientUserGeometryEntity * client,
bool takeOwnership = true )
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.

Parameters
clientAn instance of TSL3DClientUserGeometryEntity
takeOwnershipif true this instance takes ownership of the client.
Returns
an instance of TSLUserGeometryEntity. NULL is returned if an error occurred and the client will not be owned.

◆ getClientUserGeometryEntity() [1/2]

TSL3DClientUserGeometryEntity * TSL3DUserGeometryEntity::getClientUserGeometryEntity ( )

Returns the client user geometry entity instance attached to this TSL3DUser GeometryEntity.

◆ getClientUserGeometryEntity() [2/2]

const TSL3DClientUserGeometryEntity * TSL3DUserGeometryEntity::getClientUserGeometryEntity ( ) const

Returns the client user geometry entity instance attached to this TSL3DUser GeometryEntity.

◆ isUserGeometry() [1/2]

static const TSL3DUserGeometryEntity * TSL3DUserGeometryEntity::isUserGeometry ( const TSL3DEntity * entity)
static

Query whether the entity is an TSL3DUserGeometryEntity.

If this entity is an TSL3DUserGeometryEntity, returns an accessor, otherwise returns NULL.

Parameters
entitythe entity to query

◆ isUserGeometry() [2/2]

static TSL3DUserGeometryEntity * TSL3DUserGeometryEntity::isUserGeometry ( TSL3DEntity * entity)
static

Query whether the entity is an TSL3DUserGeometryEntity

If this entity is an TSL3DUserGeometryEntity returns an accessor, otherwise returns NULL.

Parameters
entitythe entity to query

◆ registerUserGeometryClientLoadCallback()

static bool TSL3DUserGeometryEntity::registerUserGeometryClientLoadCallback ( TSL3DUserGeometryLoadCallback callback)
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.

Parameters
callbackfunction to call to load user geometry object.

◆ setClientUserGeometryEntity()

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.

Parameters
clientA pointer to a TSL3DClientUserGeometryEntity derived class.
ownsClientIndicates if the TSL3DUserGeometryEntity owns the client. If true the attached TSL3DClientUserGeometryEntity will be deleted when the TSL3DUserGeometryEntity is destroyed. The default value is false.

◆ valid()

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.