ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
MarchingSquares Class Reference

#include <MarchingCubes.h>

Static Public Member Functions

static unsigned char GetIndex (const float values[Square::CORNERS], float iso)
 
static unsigned char GetIndex (const double values[Square::CORNERS], double iso)
 
static bool IsAmbiguous (const double v[Square::CORNERS], double isoValue)
 
static bool IsAmbiguous (unsigned char idx)
 
static bool HasRoots (unsigned char mcIndex)
 
static bool HasEdgeRoots (unsigned char mcIndex, int edgeIndex)
 
static int AddEdges (const double v[Square::CORNERS], double isoValue, Edge *edges)
 
static int AddEdgeIndices (const double v[Square::CORNERS], double isoValue, int *edges)
 
static int AddEdgeIndices (unsigned char mcIndex, int *edges)
 

Static Public Attributes

static const unsigned int MAX_EDGES =2
 
static const int edgeMask [1<< Square::CORNERS]
 
static const int edges [1<< Square::CORNERS][2 *MAX_EDGES+1]
 
static double vertexList [Square::EDGES][2]
 
static const int cornerMap [Square::CORNERS] = { 0 , 1 , 3 , 2 }
 

Detailed Description

Definition at line 82 of file MarchingCubes.h.

Member Function Documentation

◆ AddEdgeIndices() [1/2]

int MarchingSquares::AddEdgeIndices ( const double  v[Square::CORNERS],
double  isoValue,
int *  edges 
)
static

Definition at line 472 of file MarchingCubes.cpp.

References GetIndex().

◆ AddEdgeIndices() [2/2]

int MarchingSquares::AddEdgeIndices ( unsigned char  mcIndex,
int *  edges 
)
static

Definition at line 458 of file MarchingCubes.cpp.

References edgeMask, and edges.

◆ AddEdges()

int MarchingSquares::AddEdges ( const double  v[Square::CORNERS],
double  isoValue,
Edge edges 
)
static

Definition at line 430 of file MarchingCubes.cpp.

References edgeMask, edges, GetIndex(), Edge::p, and vertexList.

◆ GetIndex() [1/2]

unsigned char MarchingSquares::GetIndex ( const double  values[Square::CORNERS],
double  iso 
)
static

Definition at line 396 of file MarchingCubes.cpp.

References Square::CornerIndex(), and Square::CORNERS.

◆ GetIndex() [2/2]

unsigned char MarchingSquares::GetIndex ( const float  values[Square::CORNERS],
float  iso 
)
static

Definition at line 409 of file MarchingCubes.cpp.

References Square::CornerIndex(), and Square::CORNERS.

Referenced by AddEdgeIndices(), AddEdges(), and IsAmbiguous().

◆ HasEdgeRoots()

bool MarchingSquares::HasEdgeRoots ( unsigned char  mcIndex,
int  edgeIndex 
)
static

Definition at line 308 of file MarchingCubes.cpp.

References cornerMap, and Square::EdgeCorners().

◆ HasRoots()

bool MarchingSquares::HasRoots ( unsigned char  mcIndex)
static

Definition at line 424 of file MarchingCubes.cpp.

Referenced by MarchingCubes::HasFaceRoots(), and MarchingCubes::HasRoots().

◆ IsAmbiguous() [1/2]

bool MarchingSquares::IsAmbiguous ( const double  v[Square::CORNERS],
double  isoValue 
)
static

Definition at line 423 of file MarchingCubes.cpp.

References GetIndex().

Referenced by MarchingCubes::IsAmbiguous().

◆ IsAmbiguous() [2/2]

bool MarchingSquares::IsAmbiguous ( unsigned char  idx)
static

Definition at line 426 of file MarchingCubes.cpp.

Member Data Documentation

◆ cornerMap

const int MarchingSquares::cornerMap = { 0 , 1 , 3 , 2 }
static

Definition at line 92 of file MarchingCubes.h.

Referenced by HasEdgeRoots().

◆ edgeMask

const int MarchingSquares::edgeMask
static
Initial value:
=
{
0,
9,
3,
10,
12,
5,
15,
6,
6,
15,
5,
12,
10,
3,
9,
0,
}

Definition at line 88 of file MarchingCubes.h.

Referenced by AddEdgeIndices(), and AddEdges().

◆ edges

const int MarchingSquares::edges
static
Initial value:
=
{
{ -1 , -1 , -1 , -1 , -1 } ,
{ 3 , 0 , -1 , -1 , -1 } ,
{ 0 , 1 , -1 , -1 , -1 } ,
{ 3 , 1 , -1 , -1 , -1 } ,
{ 1 , 2 , -1 , -1 , -1 } ,
{ 3 , 2 , 1 , 0 , -1 } ,
{ 0 , 2 , -1 , -1 , -1 } ,
{ 3 , 2 , -1 , -1 , -1 } ,
{ 2 , 3 , -1 , -1 , -1 } ,
{ 2 , 0 , -1 , -1 , -1 } ,
{ 2 , 3 , 0 , 1 , -1 } ,
{ 2 , 1 , -1 , -1 , -1 } ,
{ 1 , 3 , -1 , -1 , -1 } ,
{ 1 , 0 , -1 , -1 , -1 } ,
{ 0 , 3 , -1 , -1 , -1 } ,
{ -1 , -1 , -1 , -1 , -1 } ,
}

Definition at line 89 of file MarchingCubes.h.

Referenced by AddEdgeIndices(), and AddEdges().

◆ MAX_EDGES

const unsigned int MarchingSquares::MAX_EDGES =2
static

Definition at line 87 of file MarchingCubes.h.

◆ vertexList

double MarchingSquares::vertexList
static

Definition at line 90 of file MarchingCubes.h.

Referenced by AddEdges().


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