![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Specialist data layer to be used with TSLAcceleratedCustomDataLayer.
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.
Note: Requires the user to draw using OpenGL or DirectX (depends on what Accelerated Surface has been created).
The user should ensure that the OpenGL/DirectX settings are reset to what they were on entry to the drawLayer method.
The model matrix will contain the appropriate translation, rotation and scaling.
The rendering interface provides methods to query the display centre, rotation and scaling.
Scaling will only be using if Dynamic Arc is enabled and a Dynamic Arc map has been loaded.
To ensure that an object is not distorted by the scaling you need to apply the inverse of the X and Y scale to some of the position data. The sample custom datalayer shows how to use the view rotation, display center and scale information to draw an un-distorted square, either rotating with the surface or unrotated.
Public Member Functions | |
virtual | ~TSLAcceleratedClientCustomDataLayer () |
virtual bool | drawLayer (const TSLAcceleratorEnvelope *extent, TSLAcceleratedRenderingInterface *renderingInterface)=0 |
virtual void | releaseResources (void *device) |
Protected Member Functions | |
TSLAcceleratedClientCustomDataLayer () | |
|
virtual |
|
protected |
|
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 developer should always ensure that the OpenGL matrix stack and state variables are returned to their original state on entry to this method.
extent | Provides the extent of the drawing area in Accelerator Device units (this includes the view expansion and rotation bounding box). |
renderinginterface | parameters for drawing OpenGL and conversion from Lat Lon to device units. |
The implementation should return true if the drawing succeeds, or false otherwise.
|
virtual |
This method is called when the DirectX device is about to be invalidated.
The user will need to release any DirectX resources.
device | A 'void *' pointer to LPDIRECT3DDEVICE9 |