Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveLineGL.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#include "TEveLineGL.h"
13#include "TEveLine.h"
14
15#include "TGLRnrCtx.h"
16#include "TGLIncludes.h"
17
18/** \class TEveLineGL
19\ingroup TEve
20GL-renderer for TEveLine class.
21*/
22
23
24////////////////////////////////////////////////////////////////////////////////
25/// Constructor.
26
28{
29 // fDLCache = false; // Disable display list.
31}
32
33////////////////////////////////////////////////////////////////////////////////
34/// Set model object.
35
37{
39 return kTRUE;
40}
41
42////////////////////////////////////////////////////////////////////////////////
43/// Direct GL rendering for TEveLine.
44
46{
47 // printf("TEveLineGL::DirectDraw Style %d, LOD %d\n", rnrCtx.Style(), rnrCtx.LOD());
48
49 TEveLine& q = *fM;
50 if (q.Size() <= 0) return;
51
52 TGLUtil::LockColor(); // Keep color from TGLPhysicalShape.
53 if (q.fRnrLine) {
56 TGLUtil::RenderPolyLine(q, q.GetMainTransparency(), q.GetP(), q.Size());
57 }
59 if (q.fRnrPoints) {
60 TGLUtil::RenderPolyMarkers(q, 0,q.GetP(), q.Size(),
61 rnrCtx.GetPickRadius(),
62 rnrCtx.Selection());
63 }
64}
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
float * q
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Direct GL rendering for TEveLine.
TEveLine * fM
Definition TEveLineGL.h:30
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
TEveLineGL()
Constructor.
An arbitrary polyline with fixed line and marker attributes.
Definition TEveLine.h:26
Bool_t fMultiColor
Definition TGLObject.h:28
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition TGLRnrCtx.h:41
static UInt_t LockColor()
Prevent further color changes.
Definition TGLUtil.cxx:1660
static void RenderPolyLine(const TAttLine &aline, Char_t transp, Float_t *p, Int_t n, Int_t pick_radius=0, Bool_t selection=kFALSE)
Render poly-line as specified by the p-array.
Definition TGLUtil.cxx:2243
static UInt_t UnlockColor()
Allow color changes.
Definition TGLUtil.cxx:1668
static void RenderPolyMarkers(const TAttMarker &marker, Char_t transp, Float_t *p, Int_t n, Int_t pick_radius=0, Bool_t selection=kFALSE, Bool_t sec_selection=kFALSE)
Render polymarkers at points specified by p-array.
Definition TGLUtil.cxx:1971
Mother of all ROOT objects.
Definition TObject.h:41
Direct OpenGL renderer for TPointSet3D.