cee::ug::VisualizationPartQuery

class VisualizationPartQuery

Query for visible nodes, elements or triangles for a given part.

Public Functions

VisualizationPartQuery(const UnstructGridModel *model, size_t frameIndex, size_t geometryIndex, int partId)

Constructs a part query object.

void visibleNodes(std::vector<size_t> *visibleNodes)

Returns an array of indices for visible nodes.

void visibleElements(std::vector<size_t> *elementIndices)

Returns an array of indices for visible elements.

void visibleElementSurfaces(std::vector<size_t> *elementIndices, std::vector<unsigned char> *surfaceIndices)

Returns an array of indices for visible elements.

void visibleTriangles(std::vector<unsigned int> *indices)

Returns an array of indices for visible triangles.

void outlineEdges(std::vector<unsigned int> *edgeSegmentsNodeIndices)

Gets the outline edges of the part.

The edgeSegmentsNodeIndices array will contain line segments (with node indices) for the outline edges. Example <0,1,1,2,5,8> is three line segments: <0,1> <1,2> <5,8>

void visibleIndexedTriangles(std::vector<unsigned int> *indices, std::vector<cee::Vec3d> *nodes)

Gets a compact indexed triangles representation of the model.

Will return all triangles in this part of the model that is visible in the given frame. The returned nodes are in world coordinates (including any transformations and/or displacements).

void visibleIndexedLines(std::vector<unsigned int> *indices, std::vector<cee::Vec3d> *nodes)

Gets a compact indexed lines representation of the lines in the model.

Will return all lines in this part of the model that is visible in the given frame. The returned nodes are in world coordinates (including any transformations and/or displacements).

Note: Will return empty arrays if no lines in the model.

void visiblePoints(std::vector<cee::Vec3d> *points)

Gets a compact indexed lines representation of the points in the model.

Will return all points in this part of the model that is visible in the given frame. The returned points are in world coordinates (including any transformations and/or displacements).

Note: Will return empty arrays if no points in the model.

void visibleNodesNormals(std::vector<cee::Vec3d> *normals)

Gets normals for visible triangles.

Note: Will return empty arrays if no triangles in the model.

void visibleNodesTextureCoordinates(std::vector<cee::Vec2f> *textureCoordinates)

Gets texture coordinates for visible triangles.

Note: Will return empty arrays if no triangles in the model.

void fringesLegendTextureImage(Image *image)

Gets the legends texture image.

bool hasTriangles() const

Returns true if the part has at least one visible triangle.

bool hasLines() const

Returns true if the part has at least one visible line.

bool hasPoints() const

Returns true if the part has at least one visible point.