OpendTect-6_4  6.4
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MarchingCubesModel Class Reference

Public Member Functions

 MarchingCubesModel ()
 
 MarchingCubesModel (const MarchingCubesModel &)
 
MarchingCubesModeloperator= (const MarchingCubesModel &)
 
bool operator== (const MarchingCubesModel &) const
 
bool set (const Array3D< float > &arr, int i0, int i1, int i2, float threshold)
 
bool isEmpty () const
 
bool writeTo (od_ostream &, bool binary=true) const
 
bool readFrom (od_istream &, bool binary=true)
 

Static Public Member Functions

static unsigned char determineModel (bool c000, bool c001, bool c010, bool c011, bool c100, bool c101, bool c110, bool c111)
 
static bool getCornerSign (unsigned char model, int corner)
 

Public Attributes

unsigned char model_
 
unsigned char submodel_
 
unsigned char axispos_ [3]
 

Static Public Attributes

static const unsigned char cUdfAxisPos
 
static const unsigned char cMaxAxisPos
 
static const unsigned char cAxisSpacing
 

Detailed Description

Representation of a triangulated MarchingCubessurface in a volume defined by eight voxels.

If the MarchingCubessurface crosses any of x,y or z axes within the volume, a coordinate of that intersectionpoint is created in a coordinate list. Those positions are used by the triangles in this and neighboring volumes.

Each of the voxels are on either side of the threshold. Since there are eight voxels, 256 different configurations are possible.

Depending on the configuration of the voxels, one of 256 models are chosen, and some of those models have multiple submodels.

Each model/submodel corresponds to static configuration of triangles. The trianlges are drawn between this volume's coordinates, and the neighbor volume's coordinates.

Constructor & Destructor Documentation

MarchingCubesModel::MarchingCubesModel ( )
MarchingCubesModel::MarchingCubesModel ( const MarchingCubesModel )

Member Function Documentation

static unsigned char MarchingCubesModel::determineModel ( bool  c000,
bool  c001,
bool  c010,
bool  c011,
bool  c100,
bool  c101,
bool  c110,
bool  c111 
)
static
static bool MarchingCubesModel::getCornerSign ( unsigned char  model,
int  corner 
)
static
bool MarchingCubesModel::isEmpty ( ) const
MarchingCubesModel& MarchingCubesModel::operator= ( const MarchingCubesModel )
bool MarchingCubesModel::operator== ( const MarchingCubesModel ) const
bool MarchingCubesModel::readFrom ( od_istream ,
bool  binary = true 
)
bool MarchingCubesModel::set ( const Array3D< float > &  arr,
int  i0,
int  i1,
int  i2,
float  threshold 
)
bool MarchingCubesModel::writeTo ( od_ostream ,
bool  binary = true 
) const

Member Data Documentation

unsigned char MarchingCubesModel::axispos_[3]
const unsigned char MarchingCubesModel::cAxisSpacing
static
const unsigned char MarchingCubesModel::cMaxAxisPos
static
const unsigned char MarchingCubesModel::cUdfAxisPos
static
unsigned char MarchingCubesModel::model_
unsigned char MarchingCubesModel::submodel_

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019