abstract class Tinman.Demo.Tutorials.Tutorial

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:

  1. Once (start-up):

  2. Repeatedly (for each graphics context, e.g. lost device after locking screen):

    1. IGraphicsComponent.GraphicsAttach

    2. Repeatedly (when widget bounds change, e.g. after screen resize):

      1. Widget.SizeChanged

      2. Repeatedly (when the widget becomes the foreground one):

      3. Repeatedly (once per frame):

    3. IGraphicsComponent.GraphicsDetach

  3. Once (shutdown):

Public / Methods


public static method AnimateValue → (4)

time in : float32

Animation time, in seconds.

divisor in : int32

The divisor by which to divide time in, in order to get the input angle for the sine function, in radians.

in : float64

First boundary value.

in : float64

Second boundary value.

returns → float64

The animated value.

Animates a value with a sine curve.


public virtual method ClearCaches → ()

Clears the caches of this tutorial.

This method clears the following caches:

Subclasses may override this method to clear additional caches.


If an I/O error has occurred.


public virtual method ResetView → ()

Resets the current view to default values.


public method UseCacheIfWeb → (1)

file in : IFile

The dataset file.

returns → DatasetFileCache

The file cache or null.

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.

Public / Attributes


public attribute Name → (get)

value : string

The name.

Machine-friendly name of this tutorial.

The name is used to create the settings path.

Protected / Constructors


protected constructor Tutorial → ()

Creates a new instance of Tutorial.

Protected / Methods


[EmptyBody] [OwnerReturn]
protected virtual method CreateGui → (1)

widgetGui in : IWidgetGui

The IWidgetGui instance, will never be null.

returns → Tutorial_GUI

The GUI or null.

Creates the GUI of this tutorial.

This method is called from IWidgetGuiConsumer.WidgetGuiAttach. The returned object will be disposed in IWidgetGuiConsumer.WidgetGuiDetach.


protected virtual method KeyboardMode → (1)

azerty in : bool

true to use AZERTY keyboard mode,
false to use QWERTY/QWERTZ.

Applies the given keyboard mode.


protected method LoadBegin → (1)

path in : string

Engine path to the dataset.

Begins to load a dataset.

Calls to LoadBegin and LoadEnd*() must be performed in the same order.


If the dataset file denoted by path in is not supported.


protected method LoadEndHeightmapDataset → ()

returns → IHeightmapDataset

The loaded dataset.

Returns a loaded heightmap dataset.


If the background task has failed.


protected method LoadEndShape → ()

returns → IShape

The loaded vector shape.

Returns a loaded vector shape.


If the background task has failed.


protected virtual method SetName → (1)

name in : string

The tutorial name.

Specifies the name of this tutorial.



public static readonly attribute Logger → (ILogger)

The logger object of this class.