DelaunayTriangulation
A C++ Object Oriented data structure with algorithms that could be used to generate a Delaunay triangulation
Public Types | Public Member Functions | List of all members
IMesh Class Referenceabstract

Shallow class allowing Mesh to be imported in classes which Mesh owns. More...

#include <IMesh.hpp>

Inheritance diagram for IMesh:
Inheritance graph
Collaboration diagram for IMesh:
Collaboration graph

Public Types

typedef std::pair< int, int > edge
 Type representing an edge, two vertex indices.
 
typedef int vertInd
 Type representing an index of a vertex.
 
typedef int triInd
 Type representing an index of a triangle.
 

Public Member Functions

virtual ~IMesh ()
 Virtual destructor.
 
virtual std::vector< VecresolvePoints (std::vector< vertInd > vertInds)=0
 Resolves vector of vertex indices to vector of vertex pointers. More...
 
virtual void recalcCircum (int vertInd)=0
 Recalculate the Triangle::circumcircle of all Triangles using vertex represented by vertInd. More...
 
virtual std::vector< std::pair< int, int > > newEdges (int triInd, const std::vector< vertInd > &vert)=0
 Adds triangle's new edges to map. More...
 
virtual void removeEdges (int triInd, const std::vector< edge > &rEdge)=0
 Remove triangle's old edges from map. More...
 
virtual void updateVertTri (int triInd, std::vector< vertInd > vertInds)=0
 Add Triangle represented by triInd to vertTri. More...
 
virtual void removeVertTri (int triInd, std::vector< vertInd > rVertInds)=0
 Remove triangle index from vertTri. More...
 

Detailed Description

Shallow class allowing Mesh to be imported in classes which Mesh owns.

Member Function Documentation

◆ newEdges()

virtual std::vector< std::pair< int, int > > IMesh::newEdges ( int  triInd,
const std::vector< vertInd > &  vert 
)
pure virtual

Adds triangle's new edges to map.

Parameters
triIndindex of the triangle using the vertices
vertVector of vertex indices being used by the triangle
Returns
Vector of pairs of vectors representing an edge

Implemented in Mesh.

◆ recalcCircum()

virtual void IMesh::recalcCircum ( int  vertInd)
pure virtual

Recalculate the Triangle::circumcircle of all Triangles using vertex represented by vertInd.

  • called after coordinates of a Vertex changed using mutator
    Parameters
    vertIndIndex of changed Vector

Implemented in Mesh.

◆ removeEdges()

virtual void IMesh::removeEdges ( int  triInd,
const std::vector< edge > &  rEdge 
)
pure virtual

Remove triangle's old edges from map.

Parameters
triIndindex of triangle using the vertices
rEdgeVector of edges that are no longer in use by the triangle

Implemented in Mesh.

◆ removeVertTri()

virtual void IMesh::removeVertTri ( int  triInd,
std::vector< vertInd rVertInds 
)
pure virtual

Remove triangle index from vertTri.

Parameters
triIndIndex of triangle to be removed
rVertIndsOld indices used by Triangle

Implemented in Mesh.

◆ resolvePoints()

virtual std::vector< Vec > IMesh::resolvePoints ( std::vector< vertInd vertInds)
pure virtual

Resolves vector of vertex indices to vector of vertex pointers.

Parameters
vertIndsVector of indices of vertexes
Returns
Vector of pointers to vertexes matching the indices given by pointIndices
Exceptions
std::runtime_errorif index is out of range of valid vertices

Implemented in Mesh.

◆ updateVertTri()

virtual void IMesh::updateVertTri ( int  triInd,
std::vector< vertInd vertInds 
)
pure virtual

Add Triangle represented by triInd to vertTri.

Implemented in Mesh.


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