12 #ifndef ROOT_TGLMarchingCubes 13 #define ROOT_TGLMarchingCubes 21 #ifndef ROOT_TGLIsoMesh 24 #ifndef ROOT_TKDEAdapter 144 fCells.resize(w * h);
172 template<
class H,
class E>
179 : fSrc(0), fW(0), fH(0), fD(0), fSliceSize(0)
200 fSrc = hist->GetArray();
201 fW = hist->GetNbinsX() + 2;
202 fH = hist->GetNbinsY() + 2;
203 fD = hist->GetNbinsZ() + 2;
204 fSliceSize = fW * fH;
214 return fSrc[k * fSliceSize + j * fW + i];
253 void SetDataSource(
const TF3 *
f);
321 template<
class E,
class V>
324 const V delta = val2 - val1;
327 return (iso - val1) / delta;
330 template<
class H,
class E,
class V>
337 V
x, V
y, V
z, V iso)
const 341 cell.
fVals[eConn[i][1]],
343 v[0] = x + (vOff[eConn[i][0]][0] + offset * eDir[i][0]) * this->fStepX;
344 v[1] = y + (vOff[eConn[i][0]][1] + offset * eDir[i][1]) * this->fStepY;
345 v[2] = z + (vOff[eConn[i][0]][2] + offset * eDir[i][2]) * this->fStepZ;
431 template<
class DataSource,
class ValueType>
441 using DataSourceBase_t::GetW;
442 using DataSourceBase_t::GetH;
443 using DataSourceBase_t::GetD;
445 using SplitterBase_t::SplitEdge;
455 : fAvgNormals(averagedNormals), fMesh(0), fIso(), fEpsilon(eps)
460 MeshType_t *mesh, ValueType iso);
465 SliceType_t fSlices[2];
470 void NextStep(
UInt_t depth,
const SliceType_t *prevSlice,
471 SliceType_t *curr)
const;
473 void BuildFirstCube(SliceType_t *slice)
const;
474 void BuildRow(SliceType_t *slice)
const;
475 void BuildCol(SliceType_t *slice)
const;
476 void BuildSlice(SliceType_t *slice)
const;
477 void BuildFirstCube(
UInt_t depth,
const SliceType_t *prevSlice,
478 SliceType_t *slice)
const;
479 void BuildRow(
UInt_t depth,
const SliceType_t *prevSlice,
480 SliceType_t *slice)
const;
481 void BuildCol(
UInt_t depth,
const SliceType_t *prevSlice,
482 SliceType_t *slice)
const;
483 void BuildSlice(
UInt_t depth,
const SliceType_t *prevSlice,
484 SliceType_t *slice)
const;
486 void BuildNormals()
const;
TH3Adapter< TH3D, Double_t > Type_t
TSlice< ElementType_t > SliceType_t
void ResizeSlice(UInt_t w, UInt_t h)
TDefaultSplitter< TH3C, Char_t, V > Type_t
tomato 3-D histogram with a float per channel (see TH1 documentation)}
TH3Adapter< TH3C, Char_t > Type_t
TH3Adapter< TH3S, Short_t > Type_t
void SetNormalEvaluator(const H *)
TDefaultSplitter< TH3F, Float_t, V > Type_t
TMeshBuilder(Bool_t averagedNormals, ValueType eps=1e-7)
const Float_t eDir[12][3]
TDefaultSplitter< TH3D, Double_t, V > Type_t
V GetOffset(E val1, E val2, V iso)
UInt_t AddVertex(const V *v)
TH3Adapter< TH3F, Float_t > Type_t
TDefaultSplitter< TKDEFGT, Float_t, Float_t > Type_t
TSourceAdapterSelector< DataSource >::Type_t DataSourceBase_t
const Int_t conTbl[256][16]
TDefaultSplitter< TH3S, Short_t, V > Type_t
tomato 3-D histogram with an int per channel (see TH1 documentation)}
tomato 3-D histogram with a short per channel (see TH1 documentation)
const ElementType_t * fSrc
TDefaultSplitter< TH3I, Int_t, V > Type_t
void SetNormalEvaluator(const TF3 *tf3)
tomato 3-D histogram with a double per channel (see TH1 documentation)}
A 3-Dim function with parameters.
void SplitEdge(TCell< E > &cell, TIsoMesh< V > *mesh, UInt_t i, V x, V y, V z, V iso) const
TSplitterSelector< DataSource, ValueType >::Type_t SplitterBase_t
void SetDataSource(const H *hist)
std::vector< TCell< V > > fCells
void FetchDensities() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
tomato 3-D histogram with a byte per channel (see TH1 documentation)
TCell< ElementType_t > CellType_t
const UChar_t eConn[12][2]
you should not use this method at all Int_t Int_t z
void FetchDensities() const
TIsoMesh< ValueType > MeshType_t
ElementType_t GetData(UInt_t i, UInt_t j, UInt_t k) const
DataSourceBase_t::ElementType_t ElementType_t
void GetData(std::string s, double *x, double *y, double *ey)
TH3Adapter< TH3I, Int_t > Type_t