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;
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);
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.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Low-level GL rendering.
TEveTriangleSetGL()
Constructor.
virtual ~TEveTriangleSetGL()
Destructor.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
virtual void SetBBox()
Set bounding-box from the model.
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.
TVector3 is a general three vector class, which can be used for the description of different vectors ...
void SetXYZ(Double_t x, Double_t y, Double_t z)
TVector3 Cross(const TVector3 &) const