Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

DataObjectToGraphicsIndices Struct Reference

Last update: 16.07.2025

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

Public Member Functions

 init (int n_point, int n_line, int n_tri, int n_tet)
 initializes the struct, allocates vectors and sets them to zero More...
 

Static Public Member Functions

static Eigen::VectorXf getData (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 More...
 
static VectorXuc getHasData (std::vector< bool > has_data)
 translates a given data vector to the index space of visualization data More...
 

Public Attributes

std::vector< size_t > GL_to_data_indices_line
 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
 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
 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
 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
 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
 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
 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
 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()

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
indicesthe indices that translate the data
has_datadefines which GL indices are associated with data
datathe data vector
Returns
the translated data vector

◆ getHasData()

static VectorXuc getHasData ( std::vector< bool >  has_data)
static

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

Parameters
has_datathe mask defining which GL indices are associated with data
Returns
the translated raw data

◆ init()

init ( int  n_point,
int  n_line,
int  n_tri,
int  n_tet 
)

initializes the struct, allocates vectors and sets them to zero

Parameters
n_pointnumber of point vertices
n_linenumber of line vertices
n_trinumber of triangle vertices
n_tetnumber of tetrahedron vertices

Connect with Ansys