Files
LBPM/analysis/dcel.h
2018-09-17 13:14:17 -04:00

64 lines
944 B
C++

#include <vector>
#include "analysis/pmmc.h"
/*
Doubly-connected edge list (DECL)
*/
// Vertex structure
class Vertex{
public:
Vertex();
~Vertex();
void add(Point P);
void assign( int idx, Point P);
int size();
Point coords(int idx);
int IncidentEdge();
private:
std::vector<double> vertex_data;
int size_;
};
// Halfedge structure
// Face
class Halfedge{
public:
Halfedge();
~Halfedge();
int v1(int edge);
int v2(int edge);
int twin(int edge);
int face(int edge);
int next(int edge);
int prev(int edge);
int size();
Array<int> data;
private:
int size_;
};
// DECL
class DECL{
public:
DECL();
~DECL();
int face();
Vertex vertex;
Halfedge halfedge;
void LocalIsosurface(const DoubleArray A, double value, int i, int j, int k);
int Face(int index);
double origin(int edge);
double EdgeAngle(int edge);
Point TriNormal(int edge);
int TriangleCount;
int VertexCount;
private:
Array <int> FaceData;
};