29 #ifndef MARCHING_CUBES_INCLUDED
30 #define MARCHING_CUBES_INCLUDED
43 enum { CORNERS=4,EDGES=4,NEIGHBORS=4 };
59 enum { CORNERS=8,EDGES=12,NEIGHBORS=6 };
81 static void FaceCorners(
int idx,
int& c1,
int &c2,
int& c3,
int& c4);
86 static double Interpolate(
double v1,
double v2);
87 static void SetVertex(
int e,
const double values[
Square::CORNERS],
double iso);
102 static void SetVertex(
int e,
const double values[
Cube::CORNERS],
double iso);
103 static int GetFaceIndex(
const double values[
Cube::CORNERS],
double iso,
int faceIndex);
105 static void SetVertex(
int e,
const float values[
Cube::CORNERS],
float iso);
106 static int GetFaceIndex(
const float values[
Cube::CORNERS],
float iso,
int faceIndex);
108 static int GetFaceIndex(
int mcIndex,
int faceIndex);
112 enum { MAX_TRIANGLES=5 };
static void FactorFaceIndex(int idx, int &dir, int &offSet)
static int FaceReflectEdgeIndex(int idx, int faceIndex)
static int FaceAdjacentToEdges(int eIndex1, int eIndex2)
static void FactorEdgeIndex(int idx, int &orientation, int &i, int &j)
static void FactorCornerIndex(int idx, int &x, int &y, int &z)
static int FaceIndex(int x, int y, int z)
static void FacesAdjacentToEdge(int eIndex, int &f1Index, int &f2Index)
static int FaceReflectFaceIndex(int idx, int faceIndex)
static int EdgeReflectCornerIndex(int idx, int edgeIndex)
static int FaceReflectCornerIndex(int idx, int faceIndex)
static void FaceCorners(int idx, int &c1, int &c2, int &c3, int &c4)
static int AntipodalCornerIndex(int idx)
static int CornerIndex(int x, int y, int z)
static int EdgeIndex(int orientation, int i, int j)
static int FaceIndex(int dir, int offSet)
static int EdgeReflectEdgeIndex(int edgeIndex)
static void FactorFaceIndex(int idx, int &x, int &y, int &z)
static void EdgeCorners(int idx, int &c1, int &c2)
static double Interpolate(double v1, double v2)
static int AddTriangles(const double v[Cube::CORNERS], double isoValue, Triangle *triangles)
static int HasRoots(const float v[Cube::CORNERS], float isoValue)
static int AddTriangles(const float v[Cube::CORNERS], float isoValue, Triangle *triangles)
static float Interpolate(float v1, float v2)
static const int * cornerMap()
static int HasRoots(int mcIndex)
static int AddTriangleIndices(const float v[Cube::CORNERS], float isoValue, int *triangles)
static int IsAmbiguous(int mcIndex, int faceIndex)
static int IsAmbiguous(const float v[Cube::CORNERS], float isoValue, int faceIndex)
static int AddTriangleIndices(int mcIndex, int *triangles)
static int HasRoots(const float v[Cube::CORNERS], float isoValue, int faceIndex)
static int HasEdgeRoots(int mcIndex, int edgeIndex)
static int HasFaceRoots(int mcIndex, int faceIndex)
static int HasRoots(const double v[Cube::CORNERS], double isoValue, int faceIndex)
static double & vertexList(int i, int j)
static int IsAmbiguous(const double v[Cube::CORNERS], double isoValue, int faceIndex)
static int AddTriangleIndices(const double v[Cube::CORNERS], double isoValue, int *triangles)
static int HasRoots(const double v[Cube::CORNERS], double isoValue)
static int GetIndex(const double values[Cube::CORNERS], double iso)
static int GetIndex(const float values[Cube::CORNERS], float iso)
static const int * edgeMask()
static int triangles(int i, int j)
static int GetIndex(const double values[Square::CORNERS], double iso)
static int edges(int i, int j)
static int AddEdges(const double v[Square::CORNERS], double isoValue, Edge *edges)
static double & vertexList(int i, int j)
static const int * edgeMask()
static int IsAmbiguous(const double v[Square::CORNERS], double isoValue)
static int AddEdgeIndices(const double v[Square::CORNERS], double isoValue, int *edges)
static int EdgeIndex(int orientation, int i)
static void FactorEdgeIndex(int idx, int &orientation, int &i)
static int CornerIndex(int x, int y)
static int ReflectCornerIndex(int idx, int edgeIndex)
static void EdgeCorners(int idx, int &c1, int &c2)
static int AntipodalCornerIndex(int idx)
static void FactorCornerIndex(int idx, int &x, int &y)
static int ReflectEdgeIndex(int idx, int edgeIndex)
Defines all the PCL and non-PCL macros used.