.. _example-example:

################
Advanced Example 
################

.. image:: ../../../images/vtfx/example_example.png
    :height: 250px
    :align: center


A more complex example demonstrating different ways of populating the blocks. For 
instance a node block (:class:`NodeBlock <cee::vtfx::NodeBlock>`) can be populated with 
either setting all nodes at once with :func:`setNodes() <cee::vtfx::NodeBlock::setNodes>`
or setting them one at a time using :func:`addNode() <cee::vtfx::NodeBlock::addNode>`.

This example contains two parts, two states, a scalar result, a vector result and a 
displacement result. 

It also uses properties for the following features:

-   Show Part 1 as lines
-   Show scalar result as fringes. Set legend range 1.0 to 5.0.
-   Show vector result. Color vector arrows by fringes.
-   Set initial camera position

This example can be overwhelming to start with, but is a very good reference for
more practiced users.

**Source file**

.. literalinclude:: ../../../../../../EnvisionDesktop/Examples/VTFx/VTFxExample/VTFxExample.cpp
    :language: cpp
    :lines: 42-555

**Header file**

.. literalinclude:: ../../../../../../EnvisionDesktop/Examples/VTFx/VTFxExample/VTFxExample.h
    :language: cpp
    :lines: 19-266

