12 #ifndef ROOT_TGLIsoMesh
13 #define ROOT_TGLIsoMesh
40 UInt_t AddVertex(
const V *v)
42 const UInt_t index = UInt_t(fVerts.size() / 3);
43 fVerts.push_back(v[0]);
44 fVerts.push_back(v[1]);
45 fVerts.push_back(v[2]);
50 void AddNormal(
const V *n)
52 fNorms.push_back(n[0]);
53 fNorms.push_back(n[1]);
54 fNorms.push_back(n[2]);
57 UInt_t AddTriangle(
const UInt_t *t)
59 const UInt_t index = UInt_t(fTris.size() / 3);
60 fTris.push_back(t[0]);
61 fTris.push_back(t[1]);
62 fTris.push_back(t[2]);
67 void Swap(TIsoMesh &rhs)
69 std::swap(fVerts, rhs.fVerts);
70 std::swap(fNorms, rhs.fNorms);
71 std::swap(fTris, rhs.fTris);
81 std::vector<V> fVerts;
82 std::vector<V> fNorms;
83 std::vector<UInt_t> fTris;
98 TGridGeometry() : fMinX(0), fStepX(0),
108 TGridGeometry(
const TAxis *x,
const TAxis *y,
const TAxis *z,
109 Double_t xs = 1., Double_t ys = 1., Double_t zs = 1.,
110 EVertexPosition pos = kBinCenter)
111 : fMinX(0), fStepX(0),
119 if (pos == kBinCenter) {
120 fMinX = V(x->GetBinCenter(x->GetFirst()));
121 fStepX = V((x->GetBinCenter(x->GetLast()) - fMinX) / (x->GetNbins() - 1));
122 fMinY = V(y->GetBinCenter(y->GetFirst()));
123 fStepY = V((y->GetBinCenter(y->GetLast()) - fMinY) / (y->GetNbins() - 1));
124 fMinZ = V(z->GetBinCenter(z->GetFirst()));
125 fStepZ = V((z->GetBinCenter(z->GetLast()) - fMinZ) / (z->GetNbins() - 1));
127 fMinX *= xs, fStepX *= xs;
128 fMinY *= ys, fStepY *= ys;
129 fMinZ *= zs, fStepZ *= zs;
130 }
else if (pos == kBinEdge) {
131 fMinX = V(x->GetBinLowEdge(x->GetFirst()));
132 fStepX = V((x->GetBinUpEdge(x->GetLast()) - fMinX) / (x->GetNbins()));
133 fMinY = V(y->GetBinLowEdge(y->GetFirst()));
134 fStepY = V((y->GetBinUpEdge(y->GetLast()) - fMinY) / (y->GetNbins()));
135 fMinZ = V(z->GetBinLowEdge(z->GetFirst()));
136 fStepZ = V((z->GetBinUpEdge(z->GetLast()) - fMinZ) / (z->GetNbins()));
138 fMinX *= xs, fStepX *= xs;
139 fMinY *= ys, fStepY *= ys;
140 fMinZ *= zs, fStepZ *= zs;
143 fXScaleInverted = 1. / xs;
144 fYScaleInverted = 1. / ys;
145 fZScaleInverted = 1. / zs;
165 void DrawMesh(
const std::vector<Float_t> &vs,
const std::vector<Float_t> &ns,
166 const std::vector<UInt_t> &ts);
167 void DrawMesh(
const std::vector<Double_t> &vs,
const std::vector<Double_t> &ns,
168 const std::vector<UInt_t> &ts);
170 void DrawMesh(
const std::vector<Float_t> &vs,
const std::vector<UInt_t> &fTS);
171 void DrawMesh(
const std::vector<Double_t> &vs,
const std::vector<UInt_t> &fTS);
173 void DrawMesh(
const std::vector<Float_t> &vs,
const std::vector<Float_t> &ns,
174 const std::vector<UInt_t> &ts,
const TGLBoxCut &box);
175 void DrawMesh(
const std::vector<Double_t> &vs,
const std::vector<Double_t> &ns,
176 const std::vector<UInt_t> &ts,
const TGLBoxCut &box);
178 void DrawMesh(
const std::vector<Float_t> &vs,
const std::vector<UInt_t> &ts,
179 const TGLBoxCut &box);
180 void DrawMesh(
const std::vector<Double_t> &vs,
const std::vector<UInt_t> &ts,
181 const TGLBoxCut &box);
183 void DrawMesh(
const std::vector<Double_t> &vs,
const std::vector<UInt_t> &ts,
184 const TGLBoxCut &box);
185 void DrawMesh(
const std::vector<Float_t> &vs,
const std::vector<UInt_t> &ts,
186 const TGLBoxCut &box);
188 void DrawMapleMesh(
const std::vector<Double_t> &vs,
const std::vector<Double_t> &ns,
189 const std::vector<UInt_t> &ts);
190 void DrawMapleMesh(
const std::vector<Double_t> &vs,
const std::vector<Double_t> &ns,
191 const std::vector<UInt_t> &ts,
const TGLBoxCut & box);