IGLMesh
Module: meshvs
OpenGL mesh representation for visualization and interaction.
Manages the visual presentation of finite element meshes, including shaded
surface rendering and wireframe edge display with multiple display modes.
__init__
method
__init__(self, meshds)
Initializes the mesh visualization object.
Args
| Name | Type | Description |
|---|---|---|
| meshds | Mesh data source object providing topology and geometry. |
SetViewer
method
SetViewer(self, wglview)
Associates this mesh with a viewer for rendering context.
Args
| Name | Type | Description |
|---|---|---|
| wglview | OpenGL viewer/context object. |
GetViewer
method
GetViewer(self)
Return associated viewer
GetBoundingBox
method
GetBoundingBox(self)
Retrieves the axis-aligned bounding box of the mesh.
Returns
Bounding box coordinates from the mesh data source.
SetDrawEdges
method
SetDrawEdges(self, bOn: bool)
Enables or disables edge rendering.
Args
| Name | Type | Description |
|---|---|---|
| bOn | True to draw edges, False to hide them. |
SetDrawContours
method
SetDrawContours(self, bOn: bool)
Enables or disables contour rendering.
Args
| Name | Type | Description |
|---|---|---|
| bOn | True to draw contours, False to hide them. |
SetPlotScale
method
SetPlotScale(self, aScale)
ComputePrs
method
ComputePrs(self)
Computes and builds GPU presentation objects for mesh rendering.
Extracts vertices, elements, edges, and normals from the mesh data source,
then creates shaded and wireframe vertex array objects for OpenGL rendering.
GetMeshDS
method
GetMeshDS(self)
Returns the associated mesh data source.
Returns
The mesh data source object.
SetShaderAttribs
method
SetShaderAttribs(self)
Configures shader vertex attributes. Reserved for future use.
Display
method
Display(self, theDisplayMode)
Renders the mesh in the specified display mode.
Args
| Name | Type | Description |
|---|---|---|
| theDisplayMode | Display mode from IGLDisplayMode enum controlling | shading, wireframe, and edge visibility. |
SetDeformTyp
method
SetDeformTyp(self, dtyp)
SetScalarField
method
SetScalarField(self, values)
Sets scalar field values for contour visualization.
Args
| Name | Type | Description |
|---|---|---|
| values | Array of scalar values corresponding to mesh vertices. |
UpdateDisplacements
method
UpdateDisplacements(self, displacements)
_create_lut_texture
method
_create_lut_texture(self)
delete
method
delete(self)
Releases GPU resources associated with mesh presentation objects.