12 #ifndef ROOT_TGLMarchingCubes 13 #define ROOT_TGLMarchingCubes 138 fCells.resize(w * h);
166 template<
class H,
class E>
173 : fSrc(0), fW(0), fH(0), fD(0), fSliceSize(0)
194 fSrc = hist->GetArray();
195 fW = hist->GetNbinsX() + 2;
196 fH = hist->GetNbinsY() + 2;
197 fD = hist->GetNbinsZ() + 2;
198 fSliceSize = fW * fH;
208 return fSrc[k * fSliceSize + j * fW + i];
247 void SetDataSource(
const TF3 *
f);
315 template<
class E,
class V>
318 const V delta = val2 - val1;
321 return (iso - val1) / delta;
324 template<
class H,
class E,
class V>
331 V
x, V
y, V
z, V iso)
const 335 cell.
fVals[eConn[i][1]],
337 v[0] = x + (vOff[eConn[i][0]][0] + offset * eDir[i][0]) * this->fStepX;
338 v[1] = y + (vOff[eConn[i][0]][1] + offset * eDir[i][1]) * this->fStepY;
339 v[2] = z + (vOff[eConn[i][0]][2] + offset * eDir[i][2]) * this->fStepZ;
425 template<
class DataSource,
class ValueType>
435 using DataSourceBase_t::GetW;
436 using DataSourceBase_t::GetH;
437 using DataSourceBase_t::GetD;
438 using DataSourceBase_t::GetData;
439 using SplitterBase_t::SplitEdge;
449 : fAvgNormals(averagedNormals), fMesh(0), fIso(), fEpsilon(eps)
454 MeshType_t *mesh, ValueType iso);
459 SliceType_t fSlices[2];
464 void NextStep(
UInt_t depth,
const SliceType_t *prevSlice,
465 SliceType_t *curr)
const;
467 void BuildFirstCube(SliceType_t *slice)
const;
468 void BuildRow(SliceType_t *slice)
const;
469 void BuildCol(SliceType_t *slice)
const;
470 void BuildSlice(SliceType_t *slice)
const;
471 void BuildFirstCube(
UInt_t depth,
const SliceType_t *prevSlice,
472 SliceType_t *slice)
const;
473 void BuildRow(
UInt_t depth,
const SliceType_t *prevSlice,
474 SliceType_t *slice)
const;
475 void BuildCol(
UInt_t depth,
const SliceType_t *prevSlice,
476 SliceType_t *slice)
const;
477 void BuildSlice(
UInt_t depth,
const SliceType_t *prevSlice,
478 SliceType_t *slice)
const;
480 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
3-D histogram with a float per channel (see TH1 documentation)}
void SplitEdge(TCell< E > &cell, TIsoMesh< V > *mesh, UInt_t i, V x, V y, V z, V iso) const
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)
void FetchDensities() const
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
3-D histogram with an int per channel (see TH1 documentation)}
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)
3-D histogram with a double per channel (see TH1 documentation)}
A 3-Dim function with parameters.
TSplitterSelector< DataSource, ValueType >::Type_t SplitterBase_t
void SetDataSource(const H *hist)
constexpr Double_t E()
Base of natural log: .
std::vector< TCell< V > > fCells
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
3-D histogram with a byte per channel (see TH1 documentation)
TCell< ElementType_t > CellType_t
Binding & operator=(OUT(*fun)(void))
const UChar_t eConn[12][2]
you should not use this method at all Int_t Int_t z
TIsoMesh< ValueType > MeshType_t
DataSourceBase_t::ElementType_t ElementType_t
TH3Adapter< TH3I, Int_t > Type_t
ElementType_t GetData(UInt_t i, UInt_t j, UInt_t k) const
void FetchDensities() const