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

# DataObjectToGraphicsIndices Struct Reference

Part of [Graphics](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__graphics)

a class that collects data that is required to transfer the data from a DataObject to the vertices of the OpenGL scene.

## Public Member Functions

| Type | Name |
| - | - |
| | [init](#a738c70d933145c214382f4752b2dfb8b) (int n\_point, int n\_line, int n\_tri, int n\_tet) initializes the struct, allocates vectors and sets them to zero |

## Static Public Member Functions

| Type | Name |
| - | - |
| static Eigen::VectorXf | [getData](#a8777db20d13ae82d05cdd8c48178afe1) (std::vector\< size\_t > indices, std::vector\< bool > has\_data, Eigen::VectorXd data) translates a given data vector to the index space of visualization data The data object indices refer to database.indexMapper |
| static VectorXuc | [getHasData](#a9d74cc00d57dac7f8e4bbaebd83e6201) (std::vector\< bool > has\_data) translates a given data vector to the index space of visualization data |

## Public Attributes

| Type | Name |
| - | - |
|  std::vector\< size\_t > | [GL\_to\_data\_indices\_line](#a7b03266474d77668bb8fa6d5ea998219) defines the transition of line data a vector of dimension of all vertices describing GL lines each value defines which data item of the corresponding DataObject is visualized. |
|  std::vector\< size\_t > | [GL\_to\_data\_indices\_point](#a4b715bea770f22d8c763de4375c94d22) defines the transition of point data a vector of dimension of all vertices describing GL points each value defines which data item of the corresponding DataObject is visualized. |
|  std::vector\< size\_t > | [GL\_to\_data\_indices\_tet](#aa9ae49e7a428b2cdcca5c9126044694d) defines the transition of volume data a vector of dimension of all vertices describing GL tetrahedra each value defines which data item of the corresponding DataObject is visualized. |
|  std::vector\< size\_t > | [GL\_to\_data\_indices\_tri](#a744fc173e53fa31f3b0586bd4342d714) defines the transition of shell data a vector of dimension of all vertices describing GL triangles each value defines which data item of the corresponding DataObject is visualized. |
|  std::vector\< bool > | [has\_data\_line](#a5cee6e492aaa90d5c6b90bd3db22ed61) defines the transition of line data a vector of dimension of all vertices describing GL lines each value defines if there is data at all assciated with the respective GL vertex. |
|  std::vector\< bool > | [has\_data\_point](#a26905c29ee82d9abb26f1dbeb11d7ba8) defines the transition of point data a vector of dimension of all vertices describing GL points each value defines if there is data at all assciated with the respective GL vertex. |
|  std::vector\< bool > | [has\_data\_tet](#ac7ce58a8165ba60af1bcd140caab3dd2) defines the transition of tetrahedron data a vector of dimension of all vertices describing GL tets each value defines if there is data at all assciated with the respective GL vertex. |
|  std::vector\< bool > | [has\_data\_tri](#ab8a7958bdc32ae0713cbd1058571be73) defines the transition of triangle data a vector of dimension of all vertices describing GL triangles each value defines if there is data at all assciated with the respective GL vertex. |

## Detailed Description

a class that collects data that is required to transfer the data from a DataObject to the vertices of the OpenGL scene.

## Member Function Documentation

### getData()

```cpp theme={null}
static Eigen::VectorXf getData(
    std::vector< size_t > indices,
    std::vector< bool > has_data,
    Eigen::VectorXd data
)
```

`static`

translates a given data vector to the index space of visualization data The data object indices refer to database.indexMapper

**Parameters**

| Name | Description |
| - | - |
| indices | the indices that translate the data |
| has\_data | defines which GL indices are associated with data |
| data | the data vector |

**Returns**

the translated data vector

### getHasData()

```cpp theme={null}
static VectorXuc getHasData(std::vector< bool > has_data)
```

`static`

translates a given data vector to the index space of visualization data

**Parameters**

| Name | Description |
| - | - |
| has\_data | the mask defining which GL indices are associated with data |

**Returns**

the translated raw data

### init()

```cpp theme={null}
init(
    int n_point,
    int n_line,
    int n_tri,
    int n_tet
)
```

initializes the struct, allocates vectors and sets them to zero

**Parameters**

| Name | Description |
| - | - |
| n\_point | number of point vertices |
| n\_line | number of line vertices |
| n\_tri | number of triangle vertices |
| n\_tet | number of tetrahedron vertices |
