Tutorial

Description

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):
    IWidget.Initialize

  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):
    Disposable.DisposeResources

Public / Methods

Animate​Value


[Pure]
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.

Clear​Caches


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.

IOException

If an I/O error has occurred.

Reset​View


[EmptyBody]
public virtual method ResetView → ()

Resets the current view to default values.

Use​Cache​If​Web


[OwnerReturn]
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

Name


public attribute Name → (get)

value : string

[not-null]
The name.

Machine-friendly name of this tutorial.

The name is used to create the settings path.

Protected / Constructors

Tutorial


protected constructor Tutorial → ()

Creates a new instance of Tutorial.

Protected / Methods

Create​Gui


[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.

Keyboard​Mode


[EmptyBody]
protected virtual method KeyboardMode → (1)

azerty in : bool

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

Applies the given keyboard mode.

Load​Begin


protected method LoadBegin → (1)

path in : string

[not-null]
Engine path to the dataset.

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.

Load​End​Heightmap​Dataset


[OwnerReturn]
protected method LoadEndHeightmapDataset → ()

returns → IHeightmapDataset

The loaded dataset.

Returns a loaded heightmap dataset.

PoolingException

If the background task has failed.

Load​End​Shape


protected method LoadEndShape → ()

returns → IShape

The loaded vector shape.

Returns a loaded vector shape.

PoolingException

If the background task has failed.

Log​Mesh​Buffer​Memory​Consumption


protected static method LogMeshBufferMemoryConsumption → (1)

meshBuffer in : MeshBuffer

The mesh buffer.

Outputs a log message for the memory consumption of the used mesh buffer.

Set​Name


protected virtual method SetName → (1)

name in : string

The tutorial name.

Specifies the name of this tutorial.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.