DelaunayTriangulation
A C++ Object Oriented data structure with algorithms that could be used to generate a Delaunay triangulation
IMesh.hpp
Go to the documentation of this file.
1//
2// Created by matt on 26/11/2019.
3//
4
5#pragma once
6#include "Vec.hpp"
14class IMesh {
15public:
19 typedef std::pair<int, int> edge;
23 typedef int vertInd;
27 typedef int triInd;
31 virtual ~IMesh() {};
38 virtual std::vector<Vec> resolvePoints(std::vector<vertInd> vertInds) = 0;
44 virtual void recalcCircum(int vertInd) = 0;
51 virtual std::vector<std::pair<int, int> > newEdges(int triInd, const std::vector<vertInd> &vert) = 0;
57 virtual void removeEdges(int triInd, const std::vector<edge> &rEdge) = 0;
64 virtual void updateVertTri(int triInd, std::vector<vertInd> vertInds) = 0;
70 virtual void removeVertTri(int triInd, std::vector<vertInd> rVertInds) = 0;
71};
72
Vec class header.
Shallow class allowing Mesh to be imported in classes which Mesh owns.
Definition: IMesh.hpp:14
virtual ~IMesh()
Virtual destructor.
Definition: IMesh.hpp:31
int vertInd
Type representing an index of a vertex.
Definition: IMesh.hpp:23
std::pair< int, int > edge
Type representing an edge, two vertex indices.
Definition: IMesh.hpp:19
virtual void recalcCircum(int vertInd)=0
Recalculate the Triangle::circumcircle of all Triangles using vertex represented by vertInd.
virtual void removeVertTri(int triInd, std::vector< vertInd > rVertInds)=0
Remove triangle index from vertTri.
virtual std::vector< Vec > resolvePoints(std::vector< vertInd > vertInds)=0
Resolves vector of vertex indices to vector of vertex pointers.
int triInd
Type representing an index of a triangle.
Definition: IMesh.hpp:27
virtual std::vector< std::pair< int, int > > newEdges(int triInd, const std::vector< vertInd > &vert)=0
Adds triangle's new edges to map.
virtual void removeEdges(int triInd, const std::vector< edge > &rEdge)=0
Remove triangle's old edges from map.
virtual void updateVertTri(int triInd, std::vector< vertInd > vertInds)=0
Add Triangle represented by triInd to vertTri.