16#include "TGLIncludes.h"
48 fM = SetModelDynCast<TEveTriangleSet>(obj);
71 glGetIntegerv(GL_SHADE_MODEL, &ex_shade_model);
72 glShadeModel(GL_FLAT);
74 glPushAttrib(GL_ENABLE_BIT | GL_POLYGON_BIT);
76 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
77 glEnable(GL_COLOR_MATERIAL);
78 glDisable(GL_CULL_FACE);
79 if (isScaled) glEnable(GL_NORMALIZE);
80 glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
81 glVertexPointer(3, GL_FLOAT, 0, refTS.
fVerts);
82 glEnableClientState(GL_VERTEX_ARRAY);
93 glNormal3fv(nrm); nrm += 3;
102 glNormal3d(
n.x(),
n.y(),
n.z());
107 glArrayElement(tng[0]);
108 glArrayElement(tng[1]);
109 glArrayElement(tng[2]);
116 glShadeModel(ex_shade_model);
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
Bool_t IsScale(Double_t low=0.9, Double_t high=1.1) const
Test if the transformation is a scale.
GL-renderer for TEveTriangleSet class.
void SetBBox() override
Set bounding-box from the model.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Low-level GL rendering.
TEveTriangleSetGL()
Constructor.
~TEveTriangleSetGL() override
Destructor.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
Made from a list of vertices and a list of triangles (triplets of vertex indices).
Float_t * Vertex(Int_t i)
TObject * fExternalObj
first replica
Base-class for direct OpenGL renderers.
void SetAxisAlignedBBox(Float_t xmin, Float_t xmax, Float_t ymin, Float_t ymax, Float_t zmin, Float_t zmax)
Set axis-aligned bounding-box.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
static void Color3ubv(const UChar_t *rgb)
Wrapper for glColor3ubv.
Mother of all ROOT objects.
void SetXYZ(Double_t x, Double_t y, Double_t z)
TVector3 Cross(const TVector3 &) const