> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Graphics

Display and manipulate 3D graphics.

## Classes

| Type | Name |
| - | - |
| class | [AllRenderData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_all_render_data.md) collects all data source settings for all possible combinations: |
| struct | [DataObjectToGraphicsIndices](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_data_object_to_graphics_indices.md) a class that collects data that is required to transfer the data from a DataObject to the vertices of the OpenGL scene. |
| class | [RenderData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_render_data.md) defines the source of visible data |
| class | [Scene](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scene.md) 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](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scene.md) is NO QObject, but SceneQt is. Instances of [Scene](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scene.md) or SceneQt are created with application\_makeScene(), implemented in the sos\_qt\_extensions or sos\_noqt\_extensions module respectively. |
| class | [SceneManager](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scene_manager.md) A manager class for 3D visualization of a structure. |
| struct | [VertexValues](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_vertex_values.md) Data containing information about the field data in simplified form. |
| struct | [VerticesNormalsVisibility](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_vertices_normals_visibility.md) Data containing information about the structure in simplified form. |

## Typedefs

| Type | Name |
| - | - |
|  typedef EntityValueTuple\< [Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md) \*> | **ElementValueTuple** |
|  typedef std::pair\< int, float > | **indexValuePair** |
|  typedef Eigen::MatrixXf | **MatrixXhf** |
|  typedef EntityValueTuple\< Point \*> | **NodeValueTuple** |
|  typedef boost::shared\_ptr\< PaletteType > | **PaletteTypePtr** |
|  typedef Eigen::VectorXf | **VectorXhf** |
|  typedef Eigen::Matrix\< unsigned char, Eigen::Dynamic, 1 > | **VectorXuc** |

## Enumerations

| Type | Name |
| - | - |
| enum | **contourType** \{ **lineContour** =0, **planeContour** } |
| enum | **Position** \{  **center** = 0, **west**, **east**, **north**,  **south**, **southwest**, **northwest**, **northeast**,  **southeast**, **none**  } |
| enum | **renderMode** \{ **drawFaces** =0, **drawLines**, **drawOutline** } |

## Functions

| Type | Name |
| - | - |
| graphics::VertexValues | [extract\_data\_object](#gad2072494c8b03f592b4b8911b172a5fd) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b), [VerticesNormalsVisibility](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_vertices_normals_visibility.md) vnv, DataObject::ptr\_type dataObject) Extract the field data into a simplified triangle representation for visualization. |
| graphics::VerticesNormalsVisibility | [extract\_reference\_mesh](#ga1dbd444c7d5278d56656e29a260f6b1d) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b), bool doTets) Extract the mesh into a simplified triangle representation for visualization. |
| template\<dataobject\_types SET\_TYPE> bool | [isPartOfReferenceSet](#ga7fecef97199c3614077980df64b9e3b0) ([Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md) element, Point point\_A, Point point\_B, Point point\_C, [Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b)) determines if the given vertex belongs to the reference node or element set |
| graphics::SceneManager | [sceneManager](#gae3a9f2c0847694e1063533959c1f676a) () gives access to the global scene manager object |
| std::vector\< bool > | [validTriangles](#ga29c270c266082fc815d4f48a55b6935a) ([Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md) \*current\_element, element::ETFace etface) Checks the validity of the triangles defining one face of an element. |

## Detailed Description

Display and manipulate 3D graphics.

## Function Documentation

### extract\_data\_object()

```cpp theme={null}
graphics::VertexValues extract_data_object(
    Structure database,
    VerticesNormalsVisibility vnv,
    DataObject::ptr_type dataObject
)
```

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

**Parameters**

| Name | Description |
| - | - |
| database | reference mesh |
| vnv | contains the structural information |
| dataObject | field data; the index space must be compatible eith database.indexMapper |

**Returns**

simplified description

### extract\_reference\_mesh()

```cpp theme={null}
graphics::VerticesNormalsVisibility extract_reference_mesh(
    Structure database,
    bool doTets
)
```

Extract the mesh into a simplified triangle representation for visualization.

**Parameters**

| Name | Description |
| - | - |
| database | reference mesh |
| doTets | indicates if volume data should be handled |

**Returns**

simplified description

> [!WARNING]
>
> This method shall be used to create a standalone [Scene](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_scene.md) 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](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) , graphics::VerticesNormalsVisibility , bool ) method.

### isPartOfReferenceSet()

```cpp theme={null}
bool isPartOfReferenceSet(
    Element element,
    Point point_A,
    Point point_B,
    Point point_C,
    Structure 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**

| Name | Description |
| - | - |
| SET\_TYPE | defines if the reference set is the node set or the element set |

**Parameters**

| Name | Description |
| - | - |
| element | the 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\_A | the 1st point of the current OpenGL triangle |
| point\_B | the 2nd point of the current OpenGL triangle |
| point\_C | the 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. |

**Returns**

true if the vertex is part of the reference set, false: if it is not part.

### sceneManager()

```cpp theme={null}
graphics::SceneManager sceneManager()
```

gives access to the global scene manager object

**Returns**

a reference to the object scenemanager\_ptr (the object must be valid!), stored in

**See also**

application\_data

### validTriangles()

```cpp theme={null}
std::vector<bool> validTriangles(
    Element * current_element,
    element::ETFace etface
)
```

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

**Parameters**

| Name | Description |
| - | - |
| current\_element | the element which should be checked |
| etface | the face of the element which should be checked |

**Returns**

a boolean vector defining the validity
