cee::ug::VisualizationPartQuery Class Reference

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

Public Member Functions

 VisualizationPartQuery (const UnstructGridModel *model, size_t frameIndex, size_t geometryIndex, int partId)
 Constructs a part query object. More...
 
void visibleNodes (std::vector< size_t > *visibleNodes)
 Returns an array of indices for visible nodes. More...
 
void visibleElements (std::vector< size_t > *elementIndices)
 Returns an array of indices for visible elements. More...
 
void visibleElementSurfaces (std::vector< size_t > *elementIndices, std::vector< unsigned char > *surfaceIndices)
 Returns an array of indices for visible elements. More...
 
void visibleTriangles (std::vector< unsigned int > *indices)
 Returns an array of indices for visible triangles. More...
 
void outlineEdges (std::vector< unsigned int > *edgeSegmentsNodeIndices)
 Gets the outline edges of the part. More...
 
void visibleIndexedTriangles (std::vector< unsigned int > *indices, std::vector< cee::Vec3d > *nodes)
 Gets a compact indexed triangles representation of the model. More...
 
void visibleIndexedLines (std::vector< unsigned int > *indices, std::vector< cee::Vec3d > *nodes)
 Gets a compact indexed lines representation of the lines in the model. More...
 
void visiblePoints (std::vector< cee::Vec3d > *points)
 Gets a compact indexed lines representation of the points in the model. More...
 
void visibleNodesNormals (std::vector< cee::Vec3d > *normals)
 Gets normals for visible triangles. More...
 
void visibleNodesTextureCoordinates (std::vector< cee::Vec2f > *textureCoordinates)
 Gets texture coordinates for visible triangles. More...
 
void fringesLegendTextureImage (Image *image)
 Gets the legends texture image. More...
 
bool hasTriangles () const
 Returns true if the part has at least one visible triangle. More...
 
bool hasLines () const
 Returns true if the part has at least one visible line. More...
 
bool hasPoints () const
 Returns true if the part has at least one visible point. More...
 

Detailed Description

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

Constructor & Destructor Documentation

cee::ug::VisualizationPartQuery::VisualizationPartQuery ( const UnstructGridModel model,
size_t  frameIndex,
size_t  geometryIndex,
int  partId 
)

Constructs a part query object.

Member Function Documentation

void cee::ug::VisualizationPartQuery::fringesLegendTextureImage ( Image image)

Gets the legends texture image.

bool cee::ug::VisualizationPartQuery::hasLines ( ) const

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

bool cee::ug::VisualizationPartQuery::hasPoints ( ) const

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

bool cee::ug::VisualizationPartQuery::hasTriangles ( ) const

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

void cee::ug::VisualizationPartQuery::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 cee::ug::VisualizationPartQuery::visibleElements ( std::vector< size_t > *  elementIndices)

Returns an array of indices for visible elements.

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

Returns an array of indices for visible elements.

void cee::ug::VisualizationPartQuery::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 cee::ug::VisualizationPartQuery::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 cee::ug::VisualizationPartQuery::visibleNodes ( std::vector< size_t > *  visibleNodes)

Returns an array of indices for visible nodes.

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

Gets normals for visible triangles.

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

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

Gets texture coordinates for visible triangles.

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

void cee::ug::VisualizationPartQuery::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 cee::ug::VisualizationPartQuery::visibleTriangles ( std::vector< unsigned int > *  indices)

Returns an array of indices for visible triangles.