MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSL3DClientCustomDataLayer Class Referenceabstract

Detailed Description

Specialist data layer to be used with TSL3DCustomDataLayer.

The developer should derive a new class from here and overload the draw Layer() method to receive callbacks when the layer requires redrawing. This allows the developer to custom draw into the drawing surface.

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

Public Member Functions

virtual ~TSL3DClientCustomDataLayer ()
 
virtual void deleteDrawingSurfaceData (int surfaceID)
 
virtual bool drawLayer (const TSLEnvelope *extent)=0
 
virtual bool drawLayer (TSL3DRenderingInterface *renderingInterface)=0
 
virtual TSL3DBoundingBox get3DExtent () const
 
virtual void invalidateDrawingSurfaceData (int surfaceID)
 
virtual TSLClientCustomPickResultpickItem (void *handle)
 
virtual TSLClientCustomPickResultpickItem (int id)
 

Protected Member Functions

 TSL3DClientCustomDataLayer ()
 

Constructor & Destructor Documentation

◆ ~TSL3DClientCustomDataLayer()

virtual TSL3DClientCustomDataLayer::~TSL3DClientCustomDataLayer ( )
virtual

Default destructor for TSLClientCustomDataLayer.

◆ TSL3DClientCustomDataLayer()

TSL3DClientCustomDataLayer::TSL3DClientCustomDataLayer ( )
protected

Default constructor for TSL3DClientCustomDataLayer.

Declared protected to prevent non-derived classes from accessing this class.

Member Function Documentation

◆ deleteDrawingSurfaceData()

virtual void TSL3DClientCustomDataLayer::deleteDrawingSurfaceData ( int surfaceID)
virtual

This method is triggered when any data pertaining to a drawing surface must be deleted.

This will occur when the data layer is removed from a drawing surface.

The developer should override this method to free any resources allocated that are drawing surface dependent.

Parameters
surfaceIDthe ID, set by the developer, of the Drawing Surface

◆ drawLayer() [1/2]

virtual bool TSL3DClientCustomDataLayer::drawLayer ( const TSLEnvelope * extent)
pure virtual

Provides callbacks to the application when the layer is redrawing.

The developer should provide an implementation of this method to allow custom drawing within the application.

Parameters
extentProvides the extent of the custom layer.

The implementation should return true if the drawing succeeds, or false otherwise.

◆ drawLayer() [2/2]

virtual bool TSL3DClientCustomDataLayer::drawLayer ( TSL3DRenderingInterface * renderingInterface)
pure virtual

Provides callbacks to the application when the layer is redrawing.

The developer should provide an implementation of this method to allow custom drawing within the application.

The OpenGL State should be returned to exactly the same state as found on entry to the method.

Parameters
renderingInterface3D rendering interface.

◆ get3DExtent()

virtual TSL3DBoundingBox TSL3DClientCustomDataLayer::get3DExtent ( ) const
virtual

Query method to return 3D Bounding Box of the data layers contents.

Returns 3D Bounding Box.

◆ invalidateDrawingSurfaceData()

virtual void TSL3DClientCustomDataLayer::invalidateDrawingSurfaceData ( int surfaceID)
virtual

This method is triggered when any cached drawing surface data must be cleared.

This will occur when the conversion from latitude, longitude and altitude to x, y, z changes.

The developer should override this method when they cache information which is drawing surface dependent.

Parameters
surfaceIDthe ID, set by the developer, of the Drawing Surface being invalidated.

◆ pickItem() [1/2]

virtual TSLClientCustomPickResult * TSL3DClientCustomDataLayer::pickItem ( int id)
virtual

This method is triggered when the OpenGL renderer identifies that an object is picked.

The 'id' passed is the value set by the call to the TSL3DRendering Interface::setPickData(id) method when there is no associated entity.

The Custom Data Layer should return a custom pick object, or NULL if the object is not to be picked.

The return value ownership is passed to the caller.

id : The value set by a call to TSL3DRenderingInterface::setPickData(id).

Returns
NULL if the item is not to be picked or a TSLClientCustomPickResult (ownership is passed to the caller).

◆ pickItem() [2/2]

virtual TSLClientCustomPickResult * TSL3DClientCustomDataLayer::pickItem ( void * handle)
virtual

This method is triggered when the OpenGL renderer identifies that an object is picked.

The 'handle' is a TSL3DEntity picked by the user.

This method is called if an entity is picked from a 3D Standard Data-layer or the user has called TSL3DRenderingInterface::drawEntity(entity3D).

In the case of drawEntity having been called it is assumed that the entity has been retained by the user until the next layer draw.

The Custom Data Layer should return a custom pick object, or NULL if the object is not to be picked.

The return value ownership is passed to the caller.

handle : the entity associated with TSL3DRenderingInterface::setPick Data(id) and drawn by the call to TSL3DRenderingInterface::draw Entity(entity3D).

Returns
NULL if the item is not to be picked or a TSLClientCustomPickResult (ownership is passed to the caller).