OpendTect  7.0
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 &)
 
virtual ~MarchingCubesModel ()
 
bool isEmpty () const
 
MarchingCubesModeloperator= (const MarchingCubesModel &)
 
bool operator== (const MarchingCubesModel &) const
 
bool readFrom (od_istream &, bool binary=true)
 
bool set (const Array3D< float > &arr, int i0, int i1, int i2, float threshold)
 
bool writeTo (od_ostream &, bool binary=true) const
 

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 axispos_ [3]
 
unsigned char model_
 
unsigned char submodel_
 

Static Public Attributes

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

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() [1/2]

MarchingCubesModel::MarchingCubesModel ( )

◆ MarchingCubesModel() [2/2]

MarchingCubesModel::MarchingCubesModel ( const MarchingCubesModel )

◆ ~MarchingCubesModel()

virtual MarchingCubesModel::~MarchingCubesModel ( )
virtual

Member Function Documentation

◆ determineModel()

static unsigned char MarchingCubesModel::determineModel ( bool  c000,
bool  c001,
bool  c010,
bool  c011,
bool  c100,
bool  c101,
bool  c110,
bool  c111 
)
static

◆ getCornerSign()

static bool MarchingCubesModel::getCornerSign ( unsigned char  model,
int  corner 
)
static

◆ isEmpty()

bool MarchingCubesModel::isEmpty ( ) const

◆ operator=()

MarchingCubesModel& MarchingCubesModel::operator= ( const MarchingCubesModel )

◆ operator==()

bool MarchingCubesModel::operator== ( const MarchingCubesModel ) const

◆ readFrom()

bool MarchingCubesModel::readFrom ( od_istream ,
bool  binary = true 
)

◆ set()

bool MarchingCubesModel::set ( const Array3D< float > &  arr,
int  i0,
int  i1,
int  i2,
float  threshold 
)

◆ writeTo()

bool MarchingCubesModel::writeTo ( od_ostream ,
bool  binary = true 
) const

Member Data Documentation

◆ axispos_

unsigned char MarchingCubesModel::axispos_[3]

◆ cAxisSpacing

const unsigned char MarchingCubesModel::cAxisSpacing
static

◆ cMaxAxisPos

const unsigned char MarchingCubesModel::cMaxAxisPos
static

◆ cUdfAxisPos

const unsigned char MarchingCubesModel::cUdfAxisPos
static

◆ model_

unsigned char MarchingCubesModel::model_

◆ submodel_

unsigned char MarchingCubesModel::submodel_

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