![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Specialist user defined 3D geometry entity.
The developer should derive a new class from this class and implement the draw method as a minimum.
The save method should be implemented if you wish to persist your object when save is called on a layer. You will need to provide callbacks for loading (see TSL3DUserGeometryEntity).
It is suggested that you write out a header that clearly identifies the object type uniquely within your application or company.
It is the developers responsibility to ensure thread safety.
Public Member Functions | |
virtual | ~TSL3DClientUserGeometryEntity () |
virtual double | boundingSphereRadius () const |
virtual const TSL3DCoord & | centre () const =0 |
virtual bool | draw (int uniqueSurfaceID, TSL3DRenderingInterface *renderingInterface)=0 |
virtual bool | equals (const TSL3DEntity *other) const |
virtual void | releaseResources (int surfaceID) |
virtual void | scale (double scaleParam, const TSL3DCoord *origin=0) |
virtual void | scale (double scaleX, double scaleY, double scaleZ, const TSL3DCoord *origin=0) |
virtual int | save (TSLofstream &stream) |
virtual void | translate (double latitudeOffset, double longitudeOffset, double altitudeOffset) |
virtual bool | valid () |
Protected Member Functions | |
TSL3DClientUserGeometryEntity () | |
|
virtual |
Default destructor for TSL3DClientUserGeometryEntity
|
protected |
Default constructor for TSL3DClientUserGeometryEntity
Declared protected to prevent non-derived classes from accessing this class.
|
virtual |
The developer needs to implement this method in their derived class if the functionality is required.
This method is used during drawing to perform bounding sphere culling of entities. The implementation should return the radius of the bounding sphere of the entity in meters.
The default implementation returns DBL_MAX.
|
pure virtual |
The developer needs to implement this method in their derived class.
This method should return the position around which the entity should be drawn.
|
pure virtual |
The developer needs to implement this method in their derived class.
This method is called to draw the entity.
The entity will be positioned such that 0,0,0 in model space is at the location returned by the centre() method, with the positive Z axis perpendicular to the surface of the earth at that point. The units of the coordinate system are meters.
The user is responsible for setting up the rendering and drawing of the object. MapLink will not set up any rendering or apply any feature rendering to this object.
The OpenGL state on entry to this function is indeterminate. Care should be taken to ensure that any modifications made to the OpenGL state are reversed before returning from this function. Failure to do so may result in incorrect rendering of subsequent entities.
uniqueSurfaceID | A unique surface number. Can be used for caching data as this will be unique to the calling surface. |
renderingInterface | Rendering Interface. Allows the developer to draw using the MapLink 3D Rendering Engine. |
Return true if an object is drawn, false otherwise.
|
virtual |
The developer needs to implement this method in their derived class if the functionality is required. The default implementation returns false.
This function should test to see if the entity is the same as the given entity.
other | Another entity to perform test against. |
Return true if the entities are the same, false otherwise.
|
virtual |
This method is called when the Drawing Surface invalidates its native drawing resources.
The user will need to release any surface specific resources.
The use of this method is very dependent upon the Drawing Surface technology.
surfaceID | A unique surface number. |
|
virtual |
This function is called to save the User Geometry object.
The save method should be implemented if you wish to persist your object when save is called on a layer.
It is suggested that you write out a header that clearly identifies the object type uniquely within your application or company. The value returned from this method is used when re-creating the object.
Note: 1. The returned value is passed to any registered callback functions to identify the geometry object type saved. It is therefore suggested that you publish and track the use of these IDs in your application or SDK (OEM users) as the values must be unique.
2. The value returned will be passed to the load callback when the entity is being loaded.
stream | The output file stream to store the User Geometry object data to. |
|
virtual |
The developer needs to implement this method in their derived class if the functionality is required. The default implementation does nothing.
This function should scale this entity equally in all directions.
scaleParam | Scaling factor to apply. 0 is invalid. |
origin | Origin to scale about. If origin is NULL, the origin of the scale is the centroid of the TSL3DEntity. |
|
virtual |
The developer needs to implement this method in their derived class if the functionality is required. The default implementation does nothing.
This function should scale this entity.
scaleX | Scaling factor to apply in X dimension. 0 is invalid. |
scaleY | Scaling factor to apply in Y dimension. 0 is invalid. |
scaleZ | Scaling factor to apply in Z dimension. 0 is invalid. |
origin | Origin to scale about. If origin is NULL, the origin of the scale is the centroid of the TSL3DEntity. |
|
virtual |
The developer needs to implement this method in their derived class if the functionality is required. The default implementation does nothing.
This function should translate this entity by the given deltas.
latitudeOffset | Offset to apply in Latitude direction. |
longitudeOffset | Offset to apply in Longitude direction. |
altitudeOffset | Offset to apply in Altitude direction |
|
virtual |
The developer needs to implement this method in their derived class if the functionality is required.
Return true if the entity is valid, false otherwise. The default implementation always returns true.