xmsextractor  1.0
xms::XmUGridTriangles2d Class Referenceabstract

Class to store XmUGrid triangles. Tracks where midpoints and triangles came from. More...

Public Member Functions

virtual ~XmUGridTriangles2d ()
 Destructor.
 
virtual void BuildTriangles (const XmUGrid &a_ugrid, bool a_addTriangleCenters)=0
 Generate triangles for the UGrid. More...
 
virtual void BuildEarcutTriangles (const XmUGrid &a_ugrid)=0
 Generate triangles for the UGrid using earcut algorithm. More...
 
virtual void SetCellActivity (const DynBitset &a_cellActivity)=0
 Set triangle activity based on each triangles cell. More...
 
virtual const VecPt3d & GetPoints () const =0
 Get the generated triangle points. More...
 
virtual const VecInt & GetTriangles () const =0
 Get the generated triangles. More...
 
virtual BSHP< VecPt3d > GetPointsPtr ()=0
 Get the generated triangle points as a shared pointer. More...
 
virtual BSHP< VecInt > GetTrianglesPtr ()=0
 Get the generated triangles as a shared pointer. More...
 
virtual int GetCellCentroid (int a_cellIdx) const =0
 Get the centroid of a cell. More...
 
virtual int GetIntersectedCell (const Pt3d &a_point, VecInt &a_idxs, VecDbl &a_weights)=0
 Get the cell index and interpolation values intersected by a point. More...
 

Static Public Member Functions

static BSHP< XmUGridTriangles2dNew ()
 Build an instance of XmUGridTriangles2d. More...
 

Protected Member Functions

 XmUGridTriangles2d ()
 Default contructor.
 

Detailed Description

Class to store XmUGrid triangles. Tracks where midpoints and triangles came from.

Definition at line 38 of file XmUGridTriangles2d.h.

Member Function Documentation

◆ BuildEarcutTriangles()

virtual void xms::XmUGridTriangles2d::BuildEarcutTriangles ( const XmUGrid &  a_ugrid)
pure virtual

Generate triangles for the UGrid using earcut algorithm.

Parameters
[in]a_ugridThe UGrid for which triangles are generated.

◆ BuildTriangles()

virtual void xms::XmUGridTriangles2d::BuildTriangles ( const XmUGrid &  a_ugrid,
bool  a_addTriangleCenters 
)
pure virtual

Generate triangles for the UGrid.

Parameters
[in]a_ugridThe UGrid for which triangles are generated.
[in]a_addTriangleCentersWhether or not triangle cells get a centroid added.

◆ GetCellCentroid()

virtual int xms::XmUGridTriangles2d::GetCellCentroid ( int  a_cellIdx) const
pure virtual

Get the centroid of a cell.

Parameters
[in]a_cellIdxThe cell index.
Returns
The index of the cell point.

◆ GetIntersectedCell()

virtual int xms::XmUGridTriangles2d::GetIntersectedCell ( const Pt3d &  a_point,
VecInt &  a_idxs,
VecDbl &  a_weights 
)
pure virtual

Get the cell index and interpolation values intersected by a point.

Parameters
[in]a_pointThe point to intersect with the UGrid.
[out]a_idxsThe interpolation points.
[out]a_weightsThe interpolation weights.
Returns
The cell intersected by the point or -1 if outside of the UGrid.

◆ GetPoints()

virtual const VecPt3d& xms::XmUGridTriangles2d::GetPoints ( ) const
pure virtual

Get the generated triangle points.

Returns
The triangle points

◆ GetPointsPtr()

virtual BSHP<VecPt3d> xms::XmUGridTriangles2d::GetPointsPtr ( )
pure virtual

Get the generated triangle points as a shared pointer.

Returns
The triangle points

◆ GetTriangles()

virtual const VecInt& xms::XmUGridTriangles2d::GetTriangles ( ) const
pure virtual

Get the generated triangles.

Returns
a vector of indices for the triangles.

◆ GetTrianglesPtr()

virtual BSHP<VecInt> xms::XmUGridTriangles2d::GetTrianglesPtr ( )
pure virtual

Get the generated triangles as a shared pointer.

Returns
a vector of indices for the triangles.

◆ New()

BSHP< XmUGridTriangles2d > xms::XmUGridTriangles2d::New ( )
static

Build an instance of XmUGridTriangles2d.

Returns
The new instance.

Definition at line 518 of file XmUGridTriangles2d.cpp.

◆ SetCellActivity()

virtual void xms::XmUGridTriangles2d::SetCellActivity ( const DynBitset &  a_cellActivity)
pure virtual

Set triangle activity based on each triangles cell.

Parameters
[in]a_cellActivityThe cell activity to set on the triangles.

The documentation for this class was generated from the following files: