    

 ## On this page

  

 

 # Graphics

 Last update: 16.07.2025 

Display and manipulate 3D graphics. [More...](#details)

## <a name="nested-classes"></a>Classes

class [AllRenderData](class_all_render_data.xhtml) collects all data source settings for all possible combinations: [More...](class_all_render_data.xhtml#details)  
 struct [DataObjectToGraphicsIndices](struct_data_object_to_graphics_indices.xhtml) a class that collects data that is required to transfer the data from a DataObject to the vertices of the OpenGL scene. [More...](struct_data_object_to_graphics_indices.xhtml#details)  
 class [RenderData](class_render_data.xhtml) defines the source of visible data [More...](class_render_data.xhtml#details)  
 class [Scene](class_scene.xhtml) A class for 3D visualization of a structure Additionally, it can display palettes and text annotations as well as rich text labels. Internally, a representation in terms of triangles only is used. Qt separation: This class contains no functionality relying on Qt classes. All methods using Qt classes are virtual and have no implementation, calling DYNARDO\_LOG\_WARN instead. Their implementation is done in SceneQt, part of the sos\_qt\_extensions module. Class [Scene](class_scene.xhtml "A class for 3D visualization of a structure Additionally, it can display palettes and text annotation...") is NO QObject, but SceneQt is. Instances of [Scene](class_scene.xhtml "A class for 3D visualization of a structure Additionally, it can display palettes and text annotation...") or SceneQt are created with application\_makeScene(), implemented in the sos\_qt\_extensions or sos\_noqt\_extensions module respectively. [More...](class_scene.xhtml#details)  
 class [SceneManager](class_scene_manager.xhtml) A manager class for 3D visualization of a structure. [More...](class_scene_manager.xhtml#details)  
 struct [VertexValues](struct_vertex_values.xhtml) Data containing information about the field data in simplified form. [More...](struct_vertex_values.xhtml#details)  
 struct [VerticesNormalsVisibility](struct_vertices_normals_visibility.xhtml) Data containing information about the structure in simplified form. [More...](struct_vertices_normals_visibility.xhtml#details)  
 ## <a name="typedef-members"></a>Typedefs

<a id="ga1dccaa74dccf6c2d491b62af355f4d66"></a>typedef EntityValueTuple&lt; [Element](class_element.xhtml) \*&gt; **ElementValueTuple** <a id="gaa2307c1f5f1bc5bb174536f7823297e6"></a>typedef std::pair&lt; int, float &gt; **indexValuePair** <a id="ga9c87499e19bca8c99168255a6d7ded16"></a>typedef Eigen::MatrixXf **MatrixXhf** <a id="gac78ee30e292a8518dcd7d24907fe8cd4"></a>typedef EntityValueTuple&lt; Point \*&gt; **NodeValueTuple** <a id="ga887f8f478a81e47db0784cc764b39582"></a>typedef boost::shared\_ptr&lt; PaletteType &gt; **PaletteTypePtr** <a id="ga47045ea68618350723b73c38b5feeddf"></a>typedef Eigen::VectorXf **VectorXhf** <a id="ga702e03492b8a430e2951c568a47e1a0e"></a>typedef Eigen::Matrix&lt; unsigned char, Eigen::Dynamic, 1 &gt; **VectorXuc** ## <a name="enum-members"></a>Enumerations

<a id="ga4c474d2ab45fc796266bff9ba22d8323"></a>enum **contourType** { **lineContour** =0, **planeContour** } <a id="gab91b34ae619fcdfcba4522b4f335bf83"></a>enum **Position** {   
 **center** = 0, **west**, **east**, **north**,   
 **south**, **southwest**, **northwest**, **northeast**,   
 **southeast**, **none**  
 } <a id="gaf8d4f5b763081475bc51b404e276bab5"></a>enum **renderMode** { **drawFaces** =0, **drawLines**, **drawOutline** } ## <a name="func-members"></a>Functions

graphics::VertexValues [extract\_data\_object](group__graphics.xhtml#gad2072494c8b03f592b4b8911b172a5fd) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), [VerticesNormalsVisibility](struct_vertices_normals_visibility.xhtml) vnv, DataObject::ptr\_type dataObject) Extract the field data into a simplified triangle representation for visualization. [More...](#gad2072494c8b03f592b4b8911b172a5fd)  
 graphics::VerticesNormalsVisibility [extract\_reference\_mesh](group__graphics.xhtml#ga1dbd444c7d5278d56656e29a260f6b1d) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), bool doTets) Extract the mesh into a simplified triangle representation for visualization. [More...](#ga1dbd444c7d5278d56656e29a260f6b1d)  
 template&lt;dataobject\_types SET\_TYPE&gt; bool [isPartOfReferenceSet](group__graphics.xhtml#ga7fecef97199c3614077980df64b9e3b0) ([Element](class_element.xhtml) element, Point point\_A, Point point\_B, Point point\_C, [Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) determines if the given vertex belongs to the reference node or element set [More...](#ga7fecef97199c3614077980df64b9e3b0)  
 graphics::SceneManager [sceneManager](group__graphics.xhtml#gae3a9f2c0847694e1063533959c1f676a) () gives access to the global scene manager object [More...](#gae3a9f2c0847694e1063533959c1f676a)  
 std::vector&lt; bool &gt; [validTriangles](group__graphics.xhtml#ga29c270c266082fc815d4f48a55b6935a) ([Element](class_element.xhtml) \*current\_element, element::ETFace etface) Checks the validity of the triangles defining one face of an element. [More...](#ga29c270c266082fc815d4f48a55b6935a)  
 <a id="details" name="details"></a>## Detailed Description

Display and manipulate 3D graphics.

## Function Documentation

<a id="gad2072494c8b03f592b4b8911b172a5fd"></a>## [◆ ](#gad2072494c8b03f592b4b8911b172a5fd)extract\_data\_object()

 graphics::VertexValues extract\_data\_object  ( [Structure](class_structure.xhtml)  *database*,    [VerticesNormalsVisibility](struct_vertices_normals_visibility.xhtml)  *vnv*,    DataObject::ptr\_type  *dataObject*   ) 

Extract the field data into a simplified triangle representation for visualization.

Parameters databasereference mesh vnvcontains the structural information dataObjectfield data; the index space must be compatible eith database.indexMapper Returnssimplified description 



<a id="ga1dbd444c7d5278d56656e29a260f6b1d"></a>## [◆ ](#ga1dbd444c7d5278d56656e29a260f6b1d)extract\_reference\_mesh()

 graphics::VerticesNormalsVisibility extract\_reference\_mesh  ( [Structure](class_structure.xhtml)  *database*,    bool  *doTets*   ) 

Extract the mesh into a simplified triangle representation for visualization.

Parameters databasereference mesh doTetsindicates if volume data should be handled Returnssimplified descriptionWarningThis method shall be used to create a standalone [Scene](class_scene.xhtml "A class for 3D visualization of a structure Additionally, it can display palettes and text annotation...") via script API only! It's currently used in test cases and in customer scripts. Therefor, do not remove it! In C++ use the overloaded extract\_refernce\_mesh ( [Structure](class_structure.xhtml "The central data structure for SoS. ") , graphics::VerticesNormalsVisibility , bool ) method. 



<a id="ga7fecef97199c3614077980df64b9e3b0"></a>## [◆ ](#ga7fecef97199c3614077980df64b9e3b0)isPartOfReferenceSet()

 bool isPartOfReferenceSet  ( [Element](class_element.xhtml)  *element*,    Point  *point\_A*,    Point  *point\_B*,    Point  *point\_C*,    [Structure](class_structure.xhtml)  *database*   ) 

determines if the given vertex belongs to the reference node or element set

The decision on chosing the element reference set or the node reference set is done trough the template parameter SET\_TYPE

Template Parameters SET\_TYPEdefines if the reference set is the node set or the element set Parameters elementthe element to which the current graphics vertex belongs to. If an element set is used as reference, only the element is taken for test purposes point\_Athe 1st point of the current OpenGL triangle point\_Bthe 2nd point of the current OpenGL triangle point\_Cthe 3rd point of the current OpenGL triangle. If the reference set type is of type node, then all of the triangle vertices must be part of the reference node set in order to be visible. Returnstrue if the vertex is part of the reference set, false: if it is not part. 



<a id="gae3a9f2c0847694e1063533959c1f676a"></a>## [◆ ](#gae3a9f2c0847694e1063533959c1f676a)sceneManager()

 graphics::SceneManager sceneManager  ( ) 

gives access to the global scene manager object

Returnsa reference to the object scenemanager\_ptr (the object must be valid!), stored in See alsoapplication\_data 



<a id="ga29c270c266082fc815d4f48a55b6935a"></a>## [◆ ](#ga29c270c266082fc815d4f48a55b6935a)validTriangles()

 std::vector&lt;bool&gt; validTriangles  ( [Element](class_element.xhtml) \*  *current\_element*,    element::ETFace  *etface*   ) 

Checks the validity of the triangles defining one face of an element.

Parameters current\_elementthe element which should be checked etfacethe face of the element which should be checked Returnsa boolean vector defining the validity