Logo ROOT   6.12/07
Reference Guide
TEveGeoShape.cxx
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel 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 "TEveGeoShape.h"
13 #include "TEveTrans.h"
14 #include "TEveManager.h"
16 #include "TEveProjections.h"
17 #include "TEveProjectionManager.h"
18 
19 #include "TEveGeoShapeExtract.h"
20 #include "TEveGeoPolyShape.h"
21 
22 #include "TROOT.h"
23 #include "TBuffer3D.h"
24 #include "TBuffer3DTypes.h"
25 #include "TVirtualViewer3D.h"
26 #include "TColor.h"
27 #include "TFile.h"
28 
29 #include "TGeoShape.h"
30 #include "TGeoVolume.h"
31 #include "TGeoNode.h"
32 #include "TGeoShapeAssembly.h"
33 #include "TGeoCompositeShape.h"
34 #include "TGeoBoolNode.h"
35 #include "TGeoManager.h"
36 #include "TGeoMatrix.h"
37 #include "TVirtualGeoPainter.h"
38 
39 namespace
40 {
41  TGeoManager* init_geo_mangeur()
42  {
43  // Create a phony geo manager that can be used for storing free
44  // shapes. Otherwise shapes register themselves to current
45  // geo-manager (or even create one).
46 
47  TGeoManager *old = gGeoManager;
48  TGeoIdentity *old_id = gGeoIdentity;
49  gGeoManager = 0;
50  TGeoManager* mgr = new TGeoManager();
51  mgr->SetNameTitle("TEveGeoShape::fgGeoMangeur",
52  "Static geo manager used for wrapped TGeoShapes.");
53  gGeoIdentity = new TGeoIdentity("Identity");
54  gGeoManager = old;
55  gGeoIdentity = old_id;
56  return mgr;
57  }
58 
59  TGeoHMatrix localGeoHMatrixIdentity;
60 }
61 
62 /** \class TEveGeoShape
63 \ingroup TEve
64 Wrapper for TGeoShape with absolute positioning and color
65 attributes allowing display of extracted TGeoShape's (without an
66 active TGeoManager) and simplified geometries (needed for non-linear
67 projections).
68 
69 TGeoCompositeShapes and TGeoAssemblies are supported.
70 
71 If fNSegments data-member is < 2 (0 by default), the default number of
72 segments is used for tesselation and special GL objects are
73 instantiated for selected shapes (spheres, tubes). If fNSegments is > 2,
74 it gets forwarded to geo-manager and this tesselation detail is
75 used when creating the buffer passed to GL.
76 */
77 
79 
80 TGeoManager* TEveGeoShape::fgGeoMangeur = init_geo_mangeur();
81 
82 ////////////////////////////////////////////////////////////////////////////////
83 /// Return static geo-manager that is used internally to make shapes
84 /// lead a happy life.
85 /// Set gGeoManager to this object when creating TGeoShapes to be
86 /// passed into TEveGeoShapes.
87 
89 {
90  return fgGeoMangeur;
91 }
92 
93 ////////////////////////////////////////////////////////////////////////////////
94 /// Return static identity matrix in homogeneous representation.
95 /// This is needed because TGeoCompositeShape::PaintComposite()
96 /// assumes TGeoShape::fgTransform is a TGeoHMatrix and we need to pass in
97 /// an identity matrix when painting a composite shape.
98 
100 {
101  return &localGeoHMatrixIdentity;
102 }
103 
104 ////////////////////////////////////////////////////////////////////////////////
105 /// Constructor.
106 
107 TEveGeoShape::TEveGeoShape(const char* name, const char* title) :
108  TEveShape (name, title),
109  fNSegments (0),
110  fShape (0),
111  fCompositeShape (0)
112 {
113  InitMainTrans();
114 }
115 
116 ////////////////////////////////////////////////////////////////////////////////
117 /// Destructor.
118 
120 {
121  SetShape(0);
122 }
123 
124 ////////////////////////////////////////////////////////////////////////////////
125 /// Create derived TEveGeoShape form a TGeoCompositeShape.
126 
128 {
130 }
131 
132 ////////////////////////////////////////////////////////////////////////////////
133 /// Set number of segments.
134 
136 {
137  if (s != fNSegments && fCompositeShape != 0)
138  {
139  delete fShape;
140  fShape = MakePolyShape();
141  }
142  fNSegments = s;
143 }
144 
145 ////////////////////////////////////////////////////////////////////////////////
146 /// Set TGeoShape shown by this object.
147 ///
148 /// The shape is owned by TEveGeoShape but TGeoShape::fUniqueID is
149 /// used for reference counting so you can pass the same shape to
150 /// several TEveGeoShapes.
151 ///
152 /// If it if is taken from an existing TGeoManager, manually
153 /// increase the fUniqueID before passing it to TEveGeoShape.
154 
156 {
158 
159  if (fCompositeShape)
160  {
161  delete fShape;
163  }
164  if (fShape)
165  {
167  if (fShape->GetUniqueID() == 0)
168  {
169  delete fShape;
170  }
171  }
172  fShape = s;
173  if (fShape)
174  {
176  fCompositeShape = dynamic_cast<TGeoCompositeShape*>(fShape);
177  if (fCompositeShape)
178  {
179  fShape = MakePolyShape();
180  }
181  }
182 }
183 
184 ////////////////////////////////////////////////////////////////////////////////
185 /// Compute bounding-box.
186 
188 {
189  TGeoBBox *bb = dynamic_cast<TGeoBBox*>(fShape);
190  if (bb)
191  {
192  BBoxInit();
193  const Double_t *o = bb->GetOrigin();
194  BBoxCheckPoint(o[0] - bb->GetDX(), o[0] - bb->GetDY(), o[0] - bb->GetDZ());
195  BBoxCheckPoint(o[0] + bb->GetDX(), o[0] + bb->GetDY(), o[0] + bb->GetDZ());
196  }
197  else
198  {
199  BBoxZero();
200  }
201 }
202 
203 ////////////////////////////////////////////////////////////////////////////////
204 /// Paint object.
205 
206 void TEveGeoShape::Paint(Option_t* /*option*/)
207 {
208  static const TEveException eh("TEveGeoShape::Paint ");
209 
210  if (fShape == 0)
211  return;
212 
214 
215  if (fCompositeShape)
216  {
217  Double_t halfLengths[3] = { fCompositeShape->GetDX(), fCompositeShape->GetDY(), fCompositeShape->GetDZ() };
218 
220  buff.fID = this;
221  buff.fColor = GetMainColor();
223  RefMainTrans().SetBuffer3D(buff);
224  buff.fLocalFrame = kTRUE; // Always enforce local frame (no geo manager).
225  buff.SetAABoundingBox(fCompositeShape->GetOrigin(), halfLengths);
227 
228  Bool_t paintComponents = kTRUE;
229 
230  // Start a composite shape, identified by this buffer
231  if (TBuffer3D::GetCSLevel() == 0)
232  paintComponents = gPad->GetViewer3D()->OpenComposite(buff);
233 
235 
236  // Paint the boolean node - will add more buffers to viewer
239  if (paintComponents) fCompositeShape->GetBoolNode()->Paint("");
241  // Close the composite shape
242  if (TBuffer3D::DecCSLevel() == 0)
243  gPad->GetViewer3D()->CloseComposite();
244  }
245  else
246  {
249 
250  buff.fID = this;
251  buff.fColor = GetMainColor();
253  RefMainTrans().SetBuffer3D(buff);
254  buff.fLocalFrame = kTRUE; // Always enforce local frame (no geo manager).
255 
257  if (fNSegments > 2)
259  fShape->GetBuffer3D(sections, kTRUE);
260 
261  Int_t reqSec = gPad->GetViewer3D()->AddObject(buff);
262 
263  if (reqSec != TBuffer3D::kNone) {
264  // This shouldn't happen, but I suspect it does sometimes.
265  if (reqSec & TBuffer3D::kCore)
266  Warning(eh, "Core section required again for shape='%s'. This shouldn't happen.", GetName());
267  fShape->GetBuffer3D(reqSec, kTRUE);
268  reqSec = gPad->GetViewer3D()->AddObject(buff);
269  }
270 
271  if (reqSec != TBuffer3D::kNone)
272  Warning(eh, "Extra section required: reqSec=%d, shape=%s.", reqSec, GetName());
273  }
274 }
275 
276 ////////////////////////////////////////////////////////////////////////////////
277 /// Save the shape tree as TEveGeoShapeExtract.
278 /// File is always recreated.
279 /// This function is obsolete, use SaveExtractInstead().
280 
281 void TEveGeoShape::Save(const char* file, const char* name)
282 {
283  Warning("Save()", "This function is deprecated, use SaveExtract() instead.");
284  SaveExtract(file, name);
285 }
286 
287 ////////////////////////////////////////////////////////////////////////////////
288 /// Save the shape tree as TEveGeoShapeExtract.
289 /// File is always recreated.
290 
291 void TEveGeoShape::SaveExtract(const char* file, const char* name)
292 {
293  TEveGeoShapeExtract* gse = DumpShapeTree(this, 0);
294 
295  TFile f(file, "RECREATE");
296  gse->Write(name);
297  f.Close();
298 }
299 
300 ////////////////////////////////////////////////////////////////////////////////
301 /// Write the shape tree as TEveGeoShapeExtract to current directory.
302 
304 {
305  TEveGeoShapeExtract* gse = DumpShapeTree(this, 0);
306  gse->Write(name);
307 }
308 
309 ////////////////////////////////////////////////////////////////////////////////
310 /// Export this shape and its descendants into a geoshape-extract.
311 
313  TEveGeoShapeExtract* parent)
314 {
315  TEveGeoShapeExtract* she = new TEveGeoShapeExtract(gsre->GetName(), gsre->GetTitle());
316  she->SetTrans(gsre->RefMainTrans().Array());
317  {
318  Int_t ci = gsre->GetFillColor();
319  TColor *c = gROOT->GetColor(ci);
320  Float_t rgba[4] = { 1, 0, 0, Float_t(1 - gsre->GetMainTransparency()/100.) };
321  if (c)
322  {
323  rgba[0] = c->GetRed();
324  rgba[1] = c->GetGreen();
325  rgba[2] = c->GetBlue();
326  }
327  she->SetRGBA(rgba);
328  }
329  {
330  Int_t ci = gsre->GetLineColor();
331  TColor *c = gROOT->GetColor(ci);
332  Float_t rgba[4] = { 1, 0, 0, 1 };
333  if (c)
334  {
335  rgba[0] = c->GetRed();
336  rgba[1] = c->GetGreen();
337  rgba[2] = c->GetBlue();
338  }
339  she->SetRGBALine(rgba);
340  }
341  she->SetRnrSelf(gsre->GetRnrSelf());
342  she->SetRnrElements(gsre->GetRnrChildren());
343  she->SetRnrFrame(gsre->GetDrawFrame());
344  she->SetMiniFrame(gsre->GetMiniFrame());
345  she->SetShape(gsre->GetShape());
346  if (gsre->HasChildren())
347  {
348  TList* ele = new TList();
349  she->SetElements(ele);
350  she->GetElements()->SetOwner(true);
352  while (i != gsre->EndChildren()) {
353  TEveGeoShape* l = dynamic_cast<TEveGeoShape*>(*i);
354  DumpShapeTree(l, she);
355  i++;
356  }
357  }
358  if (parent)
359  parent->GetElements()->Add(she);
360 
361  return she;
362 }
363 
364 ////////////////////////////////////////////////////////////////////////////////
365 /// Import a shape extract 'gse' under element 'parent'.
366 
368  TEveElement* parent)
369 {
372  TEveGeoShape* gsre = SubImportShapeExtract(gse, parent);
373  gsre->ElementChanged();
374  return gsre;
375 }
376 
377 ////////////////////////////////////////////////////////////////////////////////
378 /// Recursive version for importing a shape extract tree.
379 
381  TEveElement* parent)
382 {
383  TEveGeoShape* gsre = new TEveGeoShape(gse->GetName(), gse->GetTitle());
384  gsre->RefMainTrans().SetFromArray(gse->GetTrans());
385  const Float_t* rgba = gse->GetRGBA();
386  gsre->SetMainColorRGB(rgba[0], rgba[1], rgba[2]);
387  gsre->SetMainAlpha(rgba[3]);
388  rgba = gse->GetRGBALine();
389  gsre->SetLineColor(TColor::GetColor(rgba[0], rgba[1], rgba[2]));
390  gsre->SetRnrSelf(gse->GetRnrSelf());
391  gsre->SetRnrChildren(gse->GetRnrElements());
392  gsre->SetDrawFrame(gse->GetRnrFrame());
393  gsre->SetMiniFrame(gse->GetMiniFrame());
394  gsre->SetShape(gse->GetShape());
395 
396  if (parent)
397  parent->AddElement(gsre);
398 
399  if (gse->HasElements())
400  {
401  TIter next(gse->GetElements());
402  TEveGeoShapeExtract* chld;
403  while ((chld = (TEveGeoShapeExtract*) next()) != 0)
404  SubImportShapeExtract(chld, gsre);
405  }
406 
407  return gsre;
408 }
409 
410 ////////////////////////////////////////////////////////////////////////////////
411 /// Return class for projected objects:
412 /// - 2D projections: TEvePolygonSetProjected,
413 /// - 3D projections: TEveGeoShapeProjected.
414 /// Virtual from TEveProjectable.
415 
417 {
418  if (p->Is2D())
420  else
422 }
423 
424 ////////////////////////////////////////////////////////////////////////////////
425 /// Create a TBuffer3D suitable for presentation of the shape.
426 /// Transformation matrix is also applied.
427 
429 {
430  if (fShape == 0) return 0;
431 
432  if (dynamic_cast<TGeoShapeAssembly*>(fShape)) {
433  // TGeoShapeAssembly makes a bad TBuffer3D.
434  return 0;
435  }
436 
438 
439  TBuffer3D* buff = fShape->MakeBuffer3D();
440  TEveTrans& mx = RefMainTrans();
441  if (mx.GetUseTrans())
442  {
443  Int_t n = buff->NbPnts();
444  Double_t* pnts = buff->fPnts;
445  for(Int_t k = 0; k < n; ++k)
446  {
447  mx.MultiplyIP(&pnts[3*k]);
448  }
449  }
450  return buff;
451 }
452 
453 
454 /** \class TEveGeoShapeProjected
455 \ingroup TEve
456 A 3D projected TEveGeoShape.
457 */
458 
460 
461 ////////////////////////////////////////////////////////////////////////////////
462 /// Constructor.
463 
465  TEveShape("TEveGeoShapeProjected"),
466  fBuff(0)
467 {
468 }
469 
470 ////////////////////////////////////////////////////////////////////////////////
471 /// This should never be called as this class is only used for 3D
472 /// projections.
473 /// The implementation is required as this metod is abstract.
474 /// Just emits a warning if called.
475 
477 {
478  Warning("SetDepthLocal", "This function only exists to fulfill an abstract interface.");
479 }
480 
481 ////////////////////////////////////////////////////////////////////////////////
482 /// This is virtual method from base-class TEveProjected.
483 
486 {
487  TEveProjected::SetProjection(mng, model);
488 
489  TEveGeoShape* gre = dynamic_cast<TEveGeoShape*>(fProjectable);
490  CopyVizParams(gre);
491 }
492 
493 ////////////////////////////////////////////////////////////////////////////////
494 /// This is virtual method from base-class TEveProjected.
495 
497 {
498  TEveGeoShape *gre = dynamic_cast<TEveGeoShape*>(fProjectable);
500 
501  delete fBuff;
502  fBuff = gre->MakeBuffer3D();
503 
504  if (fBuff)
505  {
507 
508  Double_t *p = fBuff->fPnts;
509  for (UInt_t i = 0; i < fBuff->NbPnts(); ++i, p+=3)
510  {
511  prj->ProjectPointdv(p, 0);
512  }
513  }
514 
515  ResetBBox();
516 }
517 
518 ////////////////////////////////////////////////////////////////////////////////
519 /// Override of virtual method from TAttBBox.
520 
522 {
523  if (fBuff && fBuff->NbPnts() > 0)
524  {
525  BBoxInit();
526 
527  Double_t *p = fBuff->fPnts;
528  for (UInt_t i = 0; i < fBuff->NbPnts(); ++i, p+=3)
529  {
530  BBoxCheckPoint(p[0], p[1], p[2]);
531  }
532  }
533  else
534  {
535  BBoxZero();
536  }
537 }
void SetTrans(const Double_t arr[16])
Set transformation matrix.
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition: TEveTrans.h:26
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TObject.cxx:785
Abstract base-class for 2D/3D shapes.
Definition: TEveShape.h:22
virtual UInt_t GetUniqueID() const
Return the unique object id.
Definition: TObject.cxx:375
List_i EndChildren()
Definition: TEveElement.h:165
virtual void SetMiniFrame(Bool_t r)
Definition: TEveShape.h:64
virtual void ComputeBBox()
Override of virtual method from TAttBBox.
The manager class for any TGeo geometry.
Definition: TGeoManager.h:38
Box class.
Definition: TGeoBBox.h:17
void SetRGBA(const Float_t arr[4])
Set RGBA color.
Float_t GetRed() const
Definition: TColor.h:56
static TGeoHMatrix * GetGeoHMatrixIdentity()
Return static identity matrix in homogeneous representation.
Globally positioned TGeoShape with rendering attributes and an optional list of daughter shape-extrac...
virtual Char_t GetMainTransparency() const
Definition: TEveElement.h:279
virtual Double_t GetDX() const
Definition: TGeoBBox.h:70
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
Geometrical transformation package.
Definition: TGeoMatrix.h:40
void SetRnrSelf(Bool_t r)
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
Int_t fNSegments
Definition: TEveGeoShape.h:30
Bool_t HasChildren() const
Definition: TEveElement.h:169
An identity transformation.
Definition: TGeoMatrix.h:383
virtual Bool_t Is2D() const =0
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
void ProjectPointdv(Double_t *v, Float_t d)
Project double array.
List_t::iterator List_i
Definition: TEveElement.h:70
virtual void SetLineColor(Color_t c)
Definition: TEveShape.h:60
#define gROOT
Definition: TROOT.h:402
virtual Bool_t GetDrawFrame() const
Definition: TEveShape.h:55
UInt_t NbPnts() const
Definition: TBuffer3D.h:80
void Save(const char *file, const char *name="Extract")
Save the shape tree as TEveGeoShapeExtract.
Matrix class used for computing global transformations Should NOT be used for node definition...
Definition: TGeoMatrix.h:420
int Int_t
Definition: RtypesCore.h:41
A 3D projected TEveGeoShape.
Definition: TEveGeoShape.h:74
bool Bool_t
Definition: RtypesCore.h:59
virtual void UpdateProjection()
This is virtual method from base-class TEveProjected.
TGeoShape * fShape
Definition: TEveGeoShape.h:31
virtual void SetProjection(TEveProjectionManager *mng, TEveProjectable *model)
Sets projection manager and reference in the projectable object.
void MultiplyIP(TVector3 &v, Double_t w=1) const
Multiply vector in-place.
Definition: TEveTrans.cxx:729
virtual void Paint(Option_t *option="")
Paint object.
TGeoCompositeShape * fCompositeShape
Definition: TEveGeoShape.h:32
virtual Bool_t GetRnrSelf() const
Definition: TEveElement.h:254
static UInt_t GetCSLevel()
Return CS level.
Definition: TBuffer3D.cxx:496
virtual Color_t GetLineColor() const
Definition: TEveShape.h:53
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Definition: TNamed.cxx:154
virtual ~TEveGeoShape()
Destructor.
virtual void SetDepthLocal(Float_t d)
This should never be called as this class is only used for 3D projections.
Float_t GetBlue() const
Definition: TColor.h:58
void SetMiniFrame(Bool_t r)
void SetShape(TGeoShape *s)
void SetNSegments(Int_t s)
Set number of segments.
void BBoxCheckPoint(Float_t x, Float_t y, Float_t z)
Definition: TAttBBox.h:58
static TGeoManager * GetGeoMangeur()
Return static geo-manager that is used internally to make shapes lead a happy life.
virtual void Paint(Option_t *option)
Special schema for feeding the 3D buffers to the painter client.
virtual void ElementChanged(Bool_t update_scenes=kTRUE, Bool_t redraw=kFALSE)
Call this after an element has been changed so that the state can be propagated around the framework...
void Class()
Definition: Class.C:29
Float_t GetGreen() const
Definition: TColor.h:57
Double_t * fPnts
Definition: TBuffer3D.h:112
Bool_t GetUseTrans() const
Definition: TEveTrans.h:168
virtual void SetDrawFrame(Bool_t f)
Definition: TEveShape.h:62
void SetShape(TGeoShape *s)
Set TGeoShape shown by this object.
static void IncCSLevel()
Increment CS level.
Definition: TBuffer3D.cxx:504
Base-class for non-linear projections.
static void SetTransform(TGeoMatrix *matrix)
Set current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:544
static TEveGeoShape * SubImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent)
Recursive version for importing a shape extract tree.
Manager class for steering of projections and managing projected objects.
void SetSectionsValid(UInt_t mask)
Definition: TBuffer3D.h:65
virtual void ComputeBBox()
Compute bounding-box.
virtual TBuffer3D * MakeBuffer3D() const
Definition: TGeoShape.h:143
virtual void SetUniqueID(UInt_t uid)
Set the unique object id.
Definition: TObject.cxx:705
A doubly linked list.
Definition: TList.h:44
void SetElements(TList *e)
Bool_t fLocalFrame
Definition: TBuffer3D.h:90
Class handling Boolean composition of shapes.
Abstract base-class for non-linear projectable objects.
void WriteExtract(const char *name)
Write the shape tree as TEveGeoShapeExtract to current directory.
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
virtual Color_t GetMainColor() const
Definition: TEveElement.h:270
Double_t * Array()
Definition: TEveTrans.h:94
Base abstract class for all shapes.
Definition: TGeoShape.h:25
void SetAABoundingBox(const Double_t origin[3], const Double_t halfLengths[3])
Set fBBVertex in kBoundingBox section to a axis aligned (local) BB using supplied origin and box half...
Definition: TBuffer3D.cxx:320
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
Exception safe wrapper for setting gGeoManager.
Definition: TEveUtil.h:142
TEveProjectable * fProjectable
virtual const TBuffer3D & GetBuffer3D(Int_t reqSections, Bool_t localFrame) const
Stub implementation to avoid forcing implementation at this stage.
Definition: TGeoShape.cxx:689
TEveProjectionManager * fManager
void SetMainColorRGB(UChar_t r, UChar_t g, UChar_t b)
Convert RGB values to Color_t and call SetMainColor.
void SetMainAlpha(Float_t alpha)
Set main-transparency via float alpha variable.
virtual Bool_t GetRnrChildren() const
Definition: TEveElement.h:255
void SetBuffer3D(TBuffer3D &buff)
Fill transformation part TBuffer3D core section.
Definition: TEveTrans.cxx:1049
unsigned int UInt_t
Definition: RtypesCore.h:42
void SaveExtract(const char *file, const char *name)
Save the shape tree as TEveGeoShapeExtract.
virtual const Double_t * GetOrigin() const
Definition: TGeoBBox.h:73
void BBoxZero(Float_t epsilon=0, Float_t x=0, Float_t y=0, Float_t z=0)
Create cube of volume (2*epsilon)^3 at (x,y,z).
Definition: TAttBBox.cxx:42
void ResetBBox()
Definition: TAttBBox.h:46
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
TGeoShape * MakePolyShape()
Create derived TEveGeoShape form a TGeoCompositeShape.
virtual TClass * ProjectedClass(const TEveProjection *p) const
Return class for projected objects:
Generic 3D primitive description class.
Definition: TBuffer3D.h:17
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb"...
Definition: TColor.cxx:1751
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
virtual void AddElement(TEveElement *el)
Add el to the list of children.
TObject * fID
Definition: TBuffer3D.h:87
virtual Double_t GetDY() const
Definition: TGeoBBox.h:71
void SetRGBALine(const Float_t arr[4])
Set RGBA color for line.
virtual Color_t GetFillColor() const
Definition: TEveShape.h:52
static UInt_t DecCSLevel()
Decrement CS level.
Definition: TBuffer3D.cxx:512
const Bool_t kFALSE
Definition: RtypesCore.h:88
void SetRnrFrame(Bool_t r)
TEveProjection * GetProjection()
#define ClassImp(name)
Definition: Rtypes.h:359
R__EXTERN TGeoManager * gGeoManager
Definition: TGeoManager.h:559
virtual Bool_t GetMiniFrame() const
Definition: TEveShape.h:57
double Double_t
Definition: RtypesCore.h:55
virtual void CopyVizParams(const TEveElement *el)
Copy visualization parameters from element el.
Definition: TEveShape.cxx:70
Int_t fColor
Definition: TBuffer3D.h:88
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element&#39;s children, i.e.
static constexpr double s
The color creation and management class.
Definition: TColor.h:19
Bool_t HasElements()
True if has at least one element.
static TGeoMatrix * GetTransform()
Returns current transformation matrix that applies to shape.
Definition: TGeoShape.cxx:536
R__EXTERN TGeoIdentity * gGeoIdentity
Definition: TGeoMatrix.h:478
virtual void Add(TObject *obj)
Definition: TList.h:87
auto * l
Definition: textangle.C:4
Definition: file.py:1
Wrapper for TGeoShape with absolute positioning and color attributes allowing display of extracted TG...
Definition: TEveGeoShape.h:23
TEveGeoShapeProjected()
Constructor.
List_i BeginChildren()
Definition: TEveElement.h:164
virtual TEveTrans & RefMainTrans()
Return reference to main transformation.
#define gPad
Definition: TVirtualPad.h:285
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:102
Short_t fTransparency
Definition: TBuffer3D.h:89
virtual TBuffer3D * MakeBuffer3D()
Create a TBuffer3D suitable for presentation of the shape.
virtual void SetProjection(TEveProjectionManager *proj, TEveProjectable *model)
This is virtual method from base-class TEveProjected.
static TEveGeoPolyShape * Construct(TGeoCompositeShape *cshp, Int_t n_seg)
Static constructor from a composite shape.
void SetFromArray(const Double_t arr[16])
Set matrix from Double_t array.
Definition: TEveTrans.cxx:178
static TGeoManager * fgGeoMangeur
Temporary holder (if passed shape is composite shape).
Definition: TEveGeoShape.h:34
static TEveGeoShape * ImportShapeExtract(TEveGeoShapeExtract *gse, TEveElement *parent=0)
Import a shape extract &#39;gse&#39; under element &#39;parent&#39;.
TEveGeoShapeExtract * DumpShapeTree(TEveGeoShape *geon, TEveGeoShapeExtract *parent=0)
Export this shape and its descendants into a geoshape-extract.
void SetRnrElements(Bool_t r)
const Bool_t kTRUE
Definition: RtypesCore.h:87
TGeoBoolNode * GetBoolNode() const
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
TEveGeoShape(const TEveGeoShape &)
const Int_t n
Definition: legend1.C:16
void BBoxInit(Float_t infinity=1e6)
Dynamic Float_t[6] X(min,max), Y(min,max), Z(min,max)
Definition: TAttBBox.cxx:29
char name[80]
Definition: TGX11.cxx:109
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:866
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:48
virtual void Close(Option_t *option="")
Close a file.
Definition: TFile.cxx:916
virtual Double_t GetDZ() const
Definition: TGeoBBox.h:72
TGeoShape * GetShape() const
Definition: TEveGeoShape.h:49