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);
90 glBegin(GL_TRIANGLES);
93 glNormal3fv(nrm); nrm += 3;
98 e1.
SetXYZ(v1[0]-v0[0], v1[1]-v0[1], v1[2]-v0[2]);
99 e2.
SetXYZ(v2[0]-v0[0], v2[1]-v0[1], v2[2]-v0[2]);
101 if (!isScaled) n.
SetMag(1);
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);
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
GL-renderer for TEveTriangleSet class.
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.
virtual void SetBBox()
Set bounding-box from the model.
void SetXYZ(Double_t x, Double_t y, Double_t z)
Base-class for direct OpenGL renderers.
TObject * fExternalObj
first replica
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
Bool_t IsScale(Double_t low=0.9, Double_t high=1.1) const
Test if the transformation is a scale.
TVector3 is a general three vector class, which can be used for the description of different vectors ...
TVector3 Cross(const TVector3 &) const
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Low-level GL rendering.
TEveTriangleSetGL()
Constructor.
Made from a list of vertices and a list of triangles (triplets of vertex indices).
virtual ~TEveTriangleSetGL()
Destructor.
Mother of all ROOT objects.
Float_t * Vertex(Int_t i)
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
static void Color3ubv(const UChar_t *rgb)
Wrapper for glColor3ubv.