Tutorials and Examples

The Ceetron Desktop Components documentation provides a large collection of examples, tutorials and code samples. These pages cover a range of topics, from basic viewers to step-by-step tutorials for specific features.

The examples and tutorials are provided with full source code and can be compiled and run on several platforms and UI toolkits.

Examples

To help you getting started, we have provided some simple examples on how to set up the basics (OpenGL context, windows, rendering and event handling) using Qt (Windows/Linux), MFC, Win32, Windows Forms, WPF and wxWidgets (Windows/Linux).

These minimal examples show how to initialize the Ceetron Desktop Components and how to do basic rendering and event handling.

All the examples (code and project-/makefiles) are found under /Examples/<framework>

For more information on the examples and on how to use Ceetron Desktop Components with the different frameworks, have a look at the following pages:

Tutorials

The tutorials focuses on how to use the different visualization features provided in Ceetron Desktop Components. Select one of the tutorials in the list below to go directly to the documentation and the step-by-step instructions.

UnstructGrid: Simple model with two triangles
Shows how to create your own part and to use it in a model. The geometry is a very simple structure containing two triangles only.
UnstructGrid: A simple model with results
Shows how to build an UnstructGridModel geometry, part and results. The geometry is a very simple structure containing a single triangle and a scalar result mapped as fringes, a vector result and a displacement result.
UnstructGrid: Load model from file and set up model specification
Shows how to create a data source by loading a VTFx file and how to setup a model specification.
UnstructGrid: Create a cutting plane with a scalar result as fringes.
Shows how to create a cutting plane and show a scalar result mapped as fringes to the surface.
UnstructGrid: Create an isosurface
Shows how to create an isosurface based on a scalar result id and a scalar value. In addition, the scalar result will be shown as fringes on the isosurface.
UnstructGrid: Create an isovolume
Shows how to create an isovolume based on a scalar result id and a maximum and minimum scalar value. In addition, the scalar result will be shown as fringes on the isosurface.
UnstructGrid: Apply part settings to a model.
Shows how to apply some part settings to parts in the model. (Part 1: Set invisible, Part 2: Set color to blue, Part 3: Set draw style surface mesh, Part 4: Set opacity)
UnstructGrid: Set scalar settings on a loaded model.
Shows how to change scalar settings for visualized result.

UnstructGrid: Set vector settings on a loaded model.
Shows how to change vector settings for visualized result.

UnstructGrid: Using DataElementSets to filter the model
Shows how to use DataElementSets to filter the model by specifying which elements that are visible.

UnstructGrid: Create a custom DataReader to add support for your file format
Shows how to get your own analysis results into the UnstructGridModel by creating a DataReader. It is a very simple reader that returns one hexahedron element with one scalar, one vector, one displacement and one transformation result, but it will work as a starting point for building your own file reader.

Visualization: Draw bounding box using markup model
Shows how to create a data source by loading a VTFx file and drawing the models bounding box as a markup model.
Visualization: Create a custom navigation handler to support a custom navigation scheme
Shows how to create a custom navigation scheme by subclassing the cee::vis::CameraInputHandler.
Geometry: Highlight clicked parts
Shows how highlight parts as a response to a mouse press event.
Geometry: Create a geometry model
Shows how to create a geometry model with different parts and effects.
Geometry: Create a geometry model with texture
Shows how to create a geometry model using the texture effect to show a scalar result.
Geometry: Create a geometry model with geometric primitives
Shows how to create a geometry with geometric primitives like spheres, boxes and cylinders.
Report: Create a Word report with a 3D model
Shows how to generate a Word report containg a 3D model.
Plot2d: Create an overlay plot
Creates a basic 2D plot and shows it as an overlay item in the view.

The code of the tutorials is also available without the step-by-step instructions on the Code snippets page to make it easier to copy the code into your projects.

TutorialRunner

The tutorials can also be tested directly in one of the TutorialRunner applications. These are called QtTutorialRunner, MfcTutorialRunner, and WxTutorialRunner and can be found in their respective folders under /Tutorials/ in your installation.

Please note that the TutorialRunner framework is not meant to represent best-practice code, and only serves as a convenient way to demonstrate the code in the tutorials. Please compile them in-source to find necessary test data.

Demo applications

We have created two demo applications; One for Qt and one for Windows Forms. These can serve as a starting point for your own application, as inspiration and a best-practice-coding-guide. They also give a more in-depth demonstration of the Core, Visualization, and UnstructGrid components.

Using Ceetron Desktop Components with Qt
Location: Examples/Qt/QtDemoApp
A small Post Processor written in Qt to showcase some of the features in the UnstructGrid component.
Using Ceetron Desktop Components with Windows Forms
Location: Examples/WinForms/WinFormsDemoApp
A small Post Processor written in Windows Forms to showcase some of the features in the UnstructGrid component.