Loading...
Searching...
No Matches
meshkit::plan::MeshTriangle Struct Reference

Mesh cell: a triangle, or a quadrilateral when v3 is nonnegative. More...

#include <meshkit/detail/planmodel.hpp>

Collaboration diagram for meshkit::plan::MeshTriangle:

Public Member Functions

bool isQuad () const
 Return true when v3 is nonnegative (a quadrilateral); indices are not checked.
 
int vertexCount () const
 Return 4 for a quadrilateral and 3 for a triangle.
 
int vertex (int k) const
 Corner index stored in slot k.
 
void setVertex (int k, int v)
 Store a corner index in one slot, leaving the other fields unchanged.
 

Public Attributes

int v0 = 0
 First corner index.
 
int v1 = 0
 Second corner index.
 
int v2 = 0
 Third corner index.
 
int v3 = -1
 Fourth corner index of a quadrilateral; a negative value (default -1) marks a triangle.
 
Text tag
 Cell label (for example the patch or region tag); empty when untagged.
 

Detailed Description

Mesh cell: a triangle, or a quadrilateral when v3 is nonnegative.

Corner indices are in cyclic order and refer to the owning vertex array (for example MeshResult::vertices, or PatchMesh::xy for a patch). Nothing here checks index ranges, distinctness, orientation or geometry.

Member Function Documentation

◆ isQuad()

bool meshkit::plan::MeshTriangle::isQuad ( ) const
inline

Return true when v3 is nonnegative (a quadrilateral); indices are not checked.

Here is the caller graph for this function:

◆ setVertex()

void meshkit::plan::MeshTriangle::setVertex ( int k,
int v )
inline

Store a corner index in one slot, leaving the other fields unchanged.

Parameters
[in]kSlot 0..3; any other value is ignored.
[in]vIndex to store, not validated. A nonnegative value in slot 3 makes the cell a quadrilateral and a negative one a triangle.

◆ vertex()

int meshkit::plan::MeshTriangle::vertex ( int k) const
inline

Corner index stored in slot k.

Parameters
[in]kSlot 0..3.
Returns
v0, v1, v2 or v3 for slots 0..3 (slot 3 of a triangle returns its negative sentinel); -1 for any other k.
Here is the caller graph for this function:

◆ vertexCount()

int meshkit::plan::MeshTriangle::vertexCount ( ) const
inline

Return 4 for a quadrilateral and 3 for a triangle.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ tag

Text meshkit::plan::MeshTriangle::tag

Cell label (for example the patch or region tag); empty when untagged.

◆ v0

int meshkit::plan::MeshTriangle::v0 = 0

First corner index.

◆ v1

int meshkit::plan::MeshTriangle::v1 = 0

Second corner index.

◆ v2

int meshkit::plan::MeshTriangle::v2 = 0

Third corner index.

◆ v3

int meshkit::plan::MeshTriangle::v3 = -1

Fourth corner index of a quadrilateral; a negative value (default -1) marks a triangle.


The documentation for this struct was generated from the following file: