Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TVirtualGeoPainter.h
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 11/01/02
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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#ifndef ROOT_TVirtualGeoPainter
13#define ROOT_TVirtualGeoPainter
14
15#include "TObject.h"
16
17class TGeoVolume;
18class TGeoNode;
19class TGeoShape;
20class TGeoMatrix;
21class TGeoHMatrix;
22class TGeoManager;
24class TParticle;
25class TObjArray;
26class TGeoBatemanSol;
28class TGeoPolygon;
29
31
32protected:
33 static TVirtualGeoPainter *fgGeoPainter; // Pointer to class painter
34
35public:
38 kGeoVisDefault = 0, // default visualization - everything visible 3 levels down
39 kGeoVisLeaves = 1, // only last leaves are visible
40 kGeoVisOnly = 2, // only current volume is drawn
41 kGeoVisBranch = 3, // only a given branch is drawn
42 kGeoVisChanged = 4 // visibility changed
43 };
45 kGeoNoBomb = 0, // default - no bomb
46 kGeoBombXYZ = 1, // explode view in cartesian coordinates
47 kGeoBombCyl = 2, // explode view in cylindrical coordinates (R, Z)
48 kGeoBombSph = 3 // explode view in spherical coordinates (R)
49 };
50
51public:
53 ~TVirtualGeoPainter() override;
54
57 virtual void AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset = kFALSE) = 0;
58 virtual void BombTranslation(const Double_t *tr, Double_t *bombtr) = 0;
59 virtual Int_t CountVisibleNodes() = 0;
60 virtual void DefaultAngles() = 0;
61 virtual void DefaultColors() = 0;
63 virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option = "") = 0;
64 virtual void DrawShape(TGeoShape *shape, Option_t *option = "") = 0;
65 virtual void DrawOnly(Option_t *option = "") = 0;
66 virtual void DrawOverlap(void *ovlp, Option_t *option = "") = 0;
67 virtual void DrawCurrentPoint(Int_t color) = 0;
68 virtual void DrawPanel() = 0;
69 virtual void DrawPath(const char *path, Option_t *option = "") = 0;
70 virtual void DrawPolygon(const TGeoPolygon *poly) = 0;
71 virtual void DrawVolume(TGeoVolume *vol, Option_t *option = "") = 0;
72 virtual void EditGeometry(Option_t *option = "") = 0;
73 virtual void EstimateCameraMove(Double_t /*tmin*/, Double_t /*tmax*/, Double_t *, Double_t *) {}
74 virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_t px, Int_t py) = 0;
75 virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py) = 0;
76 virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py) = 0;
77 virtual Int_t GetColor(Int_t base, Float_t light) const = 0;
78 virtual Int_t GetNsegments() const = 0;
80 virtual Int_t GetBombMode() const = 0;
81 virtual const char *GetDrawPath() const = 0;
82 virtual TGeoVolume *GetDrawnVolume() const = 0;
83 virtual TGeoVolume *GetTopVolume() const = 0;
84 virtual void GetViewAngles(Double_t & /*longitude*/, Double_t & /*latitude*/, Double_t & /*psi*/) {}
85 virtual Int_t GetVisLevel() const = 0;
86 virtual Int_t GetVisOption() const = 0;
87 virtual const char *GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int_t py) const = 0;
88 virtual void GrabFocus(Int_t nfr = 0, Double_t dlong = 0, Double_t dlat = 0, Double_t dpsi = 0) = 0;
89 virtual Double_t *GetViewBox() = 0;
90 virtual Bool_t IsPaintingShape() const = 0;
91 virtual Bool_t IsRaytracing() const = 0;
92 virtual Bool_t IsExplodedView() const = 0;
93 virtual void ModifiedPad(Bool_t update = kFALSE) const = 0;
94 void Paint(Option_t *option = "") override = 0;
95 virtual void PaintNode(TGeoNode *node, Option_t *option = "", TGeoMatrix *global = nullptr) = 0;
96 virtual void PaintShape(TGeoShape *shape, Option_t *option = "") = 0;
97 virtual void PaintOverlap(void *ovlp, Option_t *option = "") = 0;
98 virtual void PaintVolume(TGeoVolume *vol, Option_t *option = "", TGeoMatrix *global = nullptr) = 0;
99 virtual void Raytrace(Option_t *option = "") = 0;
100 virtual void
102 virtual void SetClippingShape(TGeoShape *shape) = 0;
103 virtual void SetExplodedView(Int_t iopt = 0) = 0;
104 virtual void SetGeoManager(TGeoManager *geom) = 0;
106 virtual void SetNsegments(Int_t nseg = 20) = 0;
107 virtual void SetRaytracing(Bool_t flag = kTRUE) = 0;
109 static void SetPainter(const TVirtualGeoPainter *painter);
110 virtual void SetTopVisible(Bool_t vis = kTRUE) = 0;
111 virtual void SetTopVolume(TGeoVolume *vol) = 0;
112 virtual void SetVisLevel(Int_t level = 3) = 0;
113 virtual void SetVisOption(Int_t option = 0) = 0;
114 virtual Int_t ShapeDistancetoPrimitive(const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const = 0;
115 virtual void UnbombTranslation(const Double_t *tr, Double_t *bombtr) = 0;
116
117 ClassDefOverride(TVirtualGeoPainter, 0) // Abstract interface for geometry painters
118};
119
120#endif
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
Option_t Option_t option
Class representing the Bateman solution for a decay branch.
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:458
The manager class for any TGeo geometry.
Definition TGeoManager.h:45
Geometrical transformation package.
Definition TGeoMatrix.h:38
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
An arbitrary polygon defined by vertices.
Definition TGeoPolygon.h:19
Base abstract class for all shapes.
Definition TGeoShape.h:25
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
An array of TObjects.
Definition TObjArray.h:31
Mother of all ROOT objects.
Definition TObject.h:41
Description of the dynamic properties of a particle.
Definition TParticle.h:26
Abstract class for geometry painters.
virtual const char * GetDrawPath() const =0
virtual void SetTopVisible(Bool_t vis=kTRUE)=0
virtual Int_t GetVisLevel() const =0
virtual Bool_t IsPaintingShape() const =0
virtual void SetTopVolume(TGeoVolume *vol)=0
virtual void PaintOverlap(void *ovlp, Option_t *option="")=0
virtual void Raytrace(Option_t *option="")=0
virtual void SetVisLevel(Int_t level=3)=0
virtual void SetGeoManager(TGeoManager *geom)=0
virtual void DrawPath(const char *path, Option_t *option="")=0
virtual void DrawShape(TGeoShape *shape, Option_t *option="")=0
virtual void ModifiedPad(Bool_t update=kFALSE) const =0
virtual void AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys)=0
virtual void DrawOverlap(void *ovlp, Option_t *option="")=0
virtual TGeoVolume * GetTopVolume() const =0
virtual void GetViewAngles(Double_t &, Double_t &, Double_t &)
virtual TVirtualGeoTrack * AddTrack(Int_t id, Int_t pdgcode, TObject *particle)=0
virtual void SetExplodedView(Int_t iopt=0)=0
virtual void DrawOnly(Option_t *option="")=0
virtual Bool_t IsRaytracing() const =0
virtual void DrawVolume(TGeoVolume *vol, Option_t *option="")=0
virtual void DrawCurrentPoint(Int_t color)=0
virtual Int_t GetBombMode() const =0
virtual void DefaultColors()=0
~TVirtualGeoPainter() override
Geometry painter default destructor.
virtual void SetClippingShape(TGeoShape *shape)=0
virtual Int_t GetNsegments() const =0
virtual void GrabFocus(Int_t nfr=0, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0)=0
static TVirtualGeoPainter * fgGeoPainter
virtual void SetIteratorPlugin(TGeoIteratorPlugin *plugin)=0
virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option="")=0
virtual void PaintShape(TGeoShape *shape, Option_t *option="")=0
virtual void AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset=kFALSE)=0
virtual void DrawPolygon(const TGeoPolygon *poly)=0
virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py)=0
virtual void SetVisOption(Int_t option=0)=0
virtual Double_t * GetViewBox()=0
virtual void EstimateCameraMove(Double_t, Double_t, Double_t *, Double_t *)
static void SetPainter(const TVirtualGeoPainter *painter)
Static function to set an alternative histogram painter.
static TVirtualGeoPainter * GeoPainter()
Static function returning a pointer to the geometry painter.
void Paint(Option_t *option="") override=0
This method must be overridden if a class wants to paint itself.
virtual void SetNsegments(Int_t nseg=20)=0
virtual Int_t GetColor(Int_t base, Float_t light) const =0
virtual Bool_t IsExplodedView() const =0
virtual TGeoVolume * GetDrawnVolume() const =0
virtual void PaintVolume(TGeoVolume *vol, Option_t *option="", TGeoMatrix *global=nullptr)=0
virtual void DrawPanel()=0
virtual Int_t CountVisibleNodes()=0
virtual const char * GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int_t py) const =0
virtual void DefaultAngles()=0
virtual void SetRaytracing(Bool_t flag=kTRUE)=0
virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_t px, Int_t py)=0
virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py)=0
virtual Int_t GetVisOption() const =0
virtual void UnbombTranslation(const Double_t *tr, Double_t *bombtr)=0
virtual void EditGeometry(Option_t *option="")=0
virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const =0
virtual void PaintNode(TGeoNode *node, Option_t *option="", TGeoMatrix *global=nullptr)=0
virtual Int_t ShapeDistancetoPrimitive(const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const =0
virtual void BombTranslation(const Double_t *tr, Double_t *bombtr)=0
TVirtualGeoPainter(TGeoManager *manager)
Geometry painter default constructor.
virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py)=0
virtual void SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3)=0
Base class for user-defined tracks attached to a geometry.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition fillpatterns.C:1