Tutorial
Description
- Derived from
-
Widget abstract
- Extended by
-
Tutorial_00_Engine sealed
Tutorial_01_Conway sealed
Tutorial_02_Mandelbrot sealed
Tutorial_03_Widget abstract
Tutorial_10_Tinman abstract
Tutorial_37_Views sealed
Full source code is included in the Tinman 3D SDK download. |
This is the base class for Tinman 3D tutorials.
Basically each tutorial is a mini application that is run by the DemoApplication. The Tutorial class provides some useful standard functionality.
For an example on how to use Tinman 3D outside of the DemoApplication context, please have a look at the Example_Application.
The tutorials Tutorial_0*
explain basic usage of Tinman 3D that is unrelated to terrain visualization.
The tutorials Tutorial_1*
cover the Low-level Terrain API, which is intended for use-cases where an existing terrain engine is being replaced with Tinman 3D. In this case, the various low-level objects can be used directly to implement the required terrain features.
The tutorials Tutorial_2*
cover the High-level Terrain API, which is designed to add new terrain features to an application that already has some kind of 3D scene visualization.
The tutorials Tutorial_3*
demonstrate the Scene API, which is suitable for building new applications from scratch or adding 2D/3D scene visualization features to an existing application.
The tutorials Tutorial_4*
focus on data import, processing and export.
The tutorials Tutorial_5*
showcase some of the ready-to-use IWidget s in Tinman 3D, for example pixel-perfect 2D rendering of raster data or smooth 2D map rendering with scrolling, zooming and rotation.
All IWidgets and hence all Tutorials make use of the application engine. All terrain features of Tinman 3D can of course be used without the application engine.
This is the order of callbacks provided by the Tinman 3D application engine:
-
Once (start-up):
IWidget.Initialize -
Repeatedly (for each graphics context, e.g. lost device after locking screen):
-
Repeatedly (when widget bounds change, e.g. after screen resize):
-
Repeatedly (when the widget becomes the foreground one):
-
Repeatedly (once per frame):
-
Zero or more times:
Widget.DoConsumeInput -
Once:
IRenderable.Render
-
-
Once (shutdown):
Disposable.DisposeResources
Public / Methods
ClearCaches
Clears the caches of this tutorial.
This method clears the following caches:
-
All object pools (see ObjectPoolUtil.PoolClear.
-
GPU resource cache (see IGraphicsContext.ClearCache)
-
Raster dataset cache (see DatasetFileCache.Clear) for streamed data (see UseCacheIfWeb).
Subclasses may override this method to clear additional caches.
- IOException
-
If an I/O error has occurred.
UseCacheIfWeb
This method is used as a DatasetFileCacheDelegate in order to provide the default file cache for dataset.
The method will return the shared dataset file cache if the given file is streamed from the internet.
Protected / Methods
CreateGui
Creates the GUI of this tutorial.
This method is called from IWidgetGuiConsumer.WidgetGuiAttach. The returned object will be disposed in IWidgetGuiConsumer.WidgetGuiDetach.
LoadBegin
Begins to load a dataset.
Calls to LoadBegin and LoadEnd*()
must be performed in the same order.
- IOException
-
If the dataset file denoted by path in is not supported.
- See also
LoadEndHeightmapDataset
Returns a loaded heightmap dataset.
- PoolingException
-
If the background task has failed.
- See also
LoadEndShape
Returns a loaded vector shape.
- PoolingException
-
If the background task has failed.
- See also