24void DrawMesh(GLenum type,
const std::vector<V> &vs,
const std::vector<V> &ns,
25 const std::vector<UInt_t> &fTS)
27 glEnableClientState(GL_VERTEX_ARRAY);
28 glEnableClientState(GL_NORMAL_ARRAY);
29 glVertexPointer(3, type, 0, &vs[0]);
30 glNormalPointer(type, 0, &ns[0]);
31 glDrawElements(GL_TRIANGLES, fTS.size(), GL_UNSIGNED_INT, &fTS[0]);
32 glDisableClientState(GL_NORMAL_ARRAY);
33 glDisableClientState(GL_VERTEX_ARRAY);
58void DrawMesh(GLenum type,
const std::vector<V> &vs,
const std::vector<UInt_t> &fTS)
60 glEnableClientState(GL_VERTEX_ARRAY);
61 glVertexPointer(3, type, 0, &vs[0]);
62 glDrawElements(GL_TRIANGLES, fTS.size(), GL_UNSIGNED_INT, &fTS[0]);
63 glDisableClientState(GL_VERTEX_ARRAY);
192void DrawMapleMesh(
const std::vector<Double_t> &vs,
const std::vector<Double_t> &ns,
193 const std::vector<UInt_t> &fTS)
195 Double_t color[] = {0., 0., 0., 0.15};
197 glBegin(GL_TRIANGLES);
199 for (
UInt_t i = 0,
e = fTS.size() / 3; i <
e; ++i) {
200 const UInt_t *t = &fTS[i * 3];
205 glVertex3dv(&vs[t[0] * 3]);
210 glVertex3dv(&vs[t[1] * 3]);
215 glVertex3dv(&vs[t[2] * 3]);
224void DrawMapleMesh(
const std::vector<Double_t> &vs,
const std::vector<Double_t> &ns,
227 Double_t color[] = {0., 0., 0., 0.15};
229 glBegin(GL_TRIANGLES);
231 for (
UInt_t i = 0,
e = fTS.size() / 3; i <
e; ++i) {
232 const UInt_t *t = &fTS[i * 3];
233 if (
box.IsInCut(&vs[t[0] * 3]))
235 if (
box.IsInCut(&vs[t[1] * 3]))
237 if (
box.IsInCut(&vs[t[2] * 3]))
243 glVertex3dv(&vs[t[0] * 3]);
248 glVertex3dv(&vs[t[1] * 3]);
253 glVertex3dv(&vs[t[2] * 3]);
void DrawMapleMesh(const std::vector< Double_t > &vs, const std::vector< Double_t > &ns, const std::vector< UInt_t > &ts)
Colored mesh with lighting disabled.