This class represents a drawable model that a user has implemented.
The user will need to create a DLL which satisfies the following interface requirements:
The DLL shall contain a number of "C" code methods:
// Call to delete a model.
- Parameters
-
// Call to obtain an instance of a model.
- Parameters
-
// | index the index as defined in tslmodels.dat |
// | pluginString A user-defined string from tslmodels.dat |
// | filename full path to the model. |
// | Returns // A pointer to an TSL3DCustomModel. void*getModel(int index, const char *filename, const char *pluginString ); |
Once instance of each model will exist per drawing surface. The interface must be thread safe. The Models must be stateless or thread safe.
The user will need to inherit from this class and implement a constructor and the abstract methods.
The base constructor must be called to set the base variables.
- Deprecated
- Deprecated as of MapLink 11.1. Advised to use MapLink Earth SDK instead.
virtual bool TSL3DCustomModel::draw |
( |
int | drawingSurfaceId, |
|
|
double | distanceToEye, |
|
|
int | lodToDraw = 0 ) |
|
pure virtual |
This method is called when the model is to be drawn.
It is assumed in the first release that the drawing state (OpenGL) state is returned to the state it was in on entry to the draw method.
In a future release a GraphicsState object will be implemented to enable the user to set the state as required.
- Parameters
-
drawingSurfaceId | the ID of the drawing surface |
distanceToEye | distance in meters from the eye to the model position. |
lodToDraw | the Level of Detail to draw (draw the nearest to the index passed). |
Notes | The translate and rotation is already setup before the call to draw. |
There will only be one instance of a model per index.
Each instance needs to either be stateless or thread safe.