library: libGeomPainter
#include "TGeoPainter.h"

TGeoPainter


class description - source file - inheritance tree (.pdf)

class TGeoPainter : public TVirtualGeoPainter

Inheritance Chart:
TObject
<-
TVirtualGeoPainter
<-
TGeoPainter
    private:
void DefineColors() const void LocalToMasterVect(const Double_t* local, Double_t* master) const protected:
virtual void ClearVisibleVolumes() public:
TGeoPainter(TGeoManager* manager) TGeoPainter(const TGeoPainter&) virtual ~TGeoPainter() virtual void AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys) virtual TVirtualGeoTrack* AddTrack(Int_t id, Int_t pdgcode, TObject* part) virtual void AddTrackPoint(Double_t* point, Double_t* box, Bool_t reset = kFALSE) virtual void BombTranslation(const Double_t* tr, Double_t* bombtr) virtual void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const virtual void CheckOverlaps(const TGeoVolume* vol, Double_t ovlp = 0.1, Option_t* option = "") const virtual void CheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t* option = "") static TClass* Class() virtual Int_t CountVisibleNodes() virtual void DefaultAngles() virtual void DefaultColors() virtual Int_t DistanceToPrimitiveVol(TGeoVolume* vol, Int_t px, Int_t py) virtual void Draw(Option_t* option = "") virtual void DrawCurrentPoint(Int_t color) virtual void DrawOnly(Option_t* option = "") virtual void DrawOverlap(void* ovlp, Option_t* option = "") virtual void DrawPanel() virtual void DrawPath(const char* path) virtual void EstimateCameraMove(Double_t tmin, Double_t tmax, Double_t* start, Double_t* end) virtual void ExecuteVolumeEvent(TGeoVolume* volume, Int_t event, Int_t px, Int_t py) virtual void GetBombFactors(Double_t& bombx, Double_t& bomby, Double_t& bombz, Double_t& bombr) const virtual Int_t GetBombMode() const virtual TGeoNode* GetCheckedNode() TGeoChecker* GetChecker() virtual Int_t GetColor(Int_t base, Float_t light) const virtual TGeoVolume* GetDrawnVolume() const virtual const char* GetDrawPath() const virtual Int_t GetNsegments() const virtual void GetViewAngles(Double_t& longitude, Double_t& latitude, Double_t& psi) virtual Double_t* GetViewBox() virtual Int_t GetVisLevel() const virtual Int_t GetVisOption() const virtual char* GetVolumeInfo(const TGeoVolume* volume, Int_t px, Int_t py) const virtual void GrabFocus(Int_t nfr = 0, Double_t dlong = 0, Double_t dlat = 0, Double_t dpsi = 0) virtual TClass* IsA() const virtual Bool_t IsExplodedView() const virtual Bool_t IsRaytracing() const virtual TH2F* LegoPlot(Int_t ntheta = 60, Double_t themin = 0., Double_t themax = 180., Int_t nphi = 90, Double_t phimin = 0., Double_t phimax = 360., Double_t rmin = 0., Double_t rmax = 9999999, Option_t* option = "") virtual void ModifiedPad() const virtual void Paint(Option_t* option = "") virtual void PaintNode(TGeoNode* node, Option_t* option = "") virtual void PaintOverlap(void* ovlp, Option_t* option = "") void PaintPhysicalNode(TGeoPhysicalNode* node, Option_t* option = "") Bool_t PaintShape(const TGeoShape& shape, Option_t* option) const virtual void PrintOverlaps() const virtual void RandomPoints(const TGeoVolume* vol, Int_t npoints, Option_t* option = "") virtual void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) virtual void Raytrace(Option_t* option = "") virtual TGeoNode* SamplePoints(Int_t npoints, Double_t& dist, Double_t epsil, const char* g3path) virtual void SetBombFactors(Double_t bombx = 1.3, Double_t bomby = 1.3, Double_t bombz = 1.3, Double_t bombr = 1.3) virtual void SetClippingShape(TGeoShape* shape) virtual void SetExplodedView(Int_t iopt = 0) virtual void SetGeoManager(TGeoManager* geom) virtual void SetNsegments(Int_t nseg = 20) virtual void SetRaytracing(Bool_t flag = kTRUE) virtual void SetTopVisible(Bool_t vis = kTRUE) virtual void SetVisLevel(Int_t level = 3) virtual void SetVisOption(Int_t option = 0) virtual Int_t ShapeDistancetoPrimitive(const TGeoShape* shape, Int_t numpoints, Int_t px, Int_t py) const virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Test(Int_t npoints, Option_t* option) virtual void TestOverlaps(const char* path) virtual Bool_t TestVoxels(TGeoVolume* vol) virtual void UnbombTranslation(const Double_t* tr, Double_t* bombtr) virtual Double_t Weight(Double_t precision, Option_t* option = "v")

Data Members

    private:
Double_t fBombX bomb factor on X Double_t fBombY bomb factor on Y Double_t fBombZ bomb factor on Z Double_t fBombR bomb factor on radius (cyl or sph) Double_t fCheckedBox[6] bounding box of checked node Double_t fMat[9] view rotation matrix Int_t fNsegments number of segments approximating circles Int_t fNVisNodes number of visible nodes Int_t fVisLevel depth for drawing Int_t fVisOption global visualization option Int_t fExplodedView type of exploding current view Bool_t fVisLock lock for adding visible volumes Bool_t fTopVisible set top volume visible Bool_t fPaintingOverlaps lock overlaps painting Bool_t fIsRaytracing raytracing flag const char* fVisBranch drawn branch TGeoNode* fCheckedNode checked node TGeoOverlap* fOverlap current overlap TGeoMatrix* fMatrix current local matrix in case of overlaps TGeoManager* fGeoManager geometry to which applies TGeoChecker* fChecker geometry checker TGeoShape* fClippingShape clipping shape TGeoVolume* fLastVolume last drawn volume TObjArray* fVisVolumes list of visible volumes

Class Description


TGeoPainter(TGeoManager *manager) : TVirtualGeoPainter(manager)
*-*-*-*-*-*-*-*-*-*-*Geometry painter default constructor*-*-*-*-*-*-*-*-*
*-*                  ====================================

~TGeoPainter()
*-*-*-*-*-*-*-*-*-*-*Geometry painter default destructor*-*-*-*-*-*-*-*-*
*-*                  ===================================

void AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys)
--- Add numpoints, numsegs, numpolys to the global 3D size.

TVirtualGeoTrack* AddTrack(Int_t id, Int_t pdgcode, TObject *particle)
 Create a primary TGeoTrack.

void AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset)
 Average center of view of all painted tracklets and compute view box.

void BombTranslation(const Double_t *tr, Double_t *bombtr)
 get the new 'bombed' translation vector according current exploded view mode

void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const

void CheckOverlaps(const TGeoVolume *vol, Double_t ovlp, Option_t *option) const
 Check overlaps for the top volume of the geometry, within a limit OVLP.

void CheckPoint(Double_t x, Double_t y, Double_t z, Option_t *option)
 check current point in the geometry

void ClearVisibleVolumes()
Clear the list of visible volumes
reset the kVisOnScreen bit for volumes previously in the list

void DefineColors() const
 Define 100 colors with increasing light intensities for each basic color (1-7)
 Register these colors at indexes starting with 300.

Int_t GetColor(Int_t base, Float_t light) const
 Get index of a base color with given light intensity (0,1)

TGeoVolume* GetDrawnVolume() const
 Get currently drawn volume.

Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py)
 compute the closest distance of approach from point px,py to a volume

void DefaultAngles()
 Set default angles for the current view.

void DefaultColors()
 Set default volume colors according to tracking media

Int_t CountVisibleNodes()
 Count total number of visible nodes.

void Draw(Option_t *option)

void DrawOverlap(void *ovlp, Option_t *option)

void DrawOnly(Option_t *option)

void DrawCurrentPoint(Int_t color)
 Draw current point in the same view.

void DrawPanel()

void DrawPath(const char *path)
 Draw all volumes for a given path.

void EstimateCameraMove(Double_t tmin, Double_t tmax, Double_t *start, Double_t *end)
 Estimate camera movement between tmin and tmax for best track display

void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t /*px*/, Int_t /*py*/)
 Execute mouse actions on a given volume.

char* GetVolumeInfo(const TGeoVolume *volume, Int_t /*px*/, Int_t /*py*/) const

TGeoChecker* GetChecker()
 Create/return geometry checker.

void GetViewAngles(Double_t &longitude, Double_t &latitude, Double_t &psi)

void GrabFocus(Int_t nfr, Double_t dlong, Double_t dlat, Double_t dpsi)
 Move focus to current volume

TH2F* LegoPlot(Int_t ntheta, Double_t themin, Double_t themax, Int_t nphi, Double_t phimin, Double_t phimax, Double_t rmin, Double_t rmax, Option_t *option)
 Generate a lego plot fot the top volume, according to option.

void LocalToMasterVect(const Double_t *local, Double_t *master) const
 Convert a local vector according view rotation matrix

void ModifiedPad() const
 Check if a pad and view are present and send signal "Modified" to pad.

void Paint(Option_t *option)
 Paint current geometry according to option.

void PaintOverlap(void *ovlp, Option_t *option)
 Paint an overlap.

void PaintNode(TGeoNode *node, Option_t *option)
 paint recursively a node and its content accordind to visualization options

Bool_t PaintShape(const TGeoShape & shape, Option_t * option ) const
 Paint the supplied shape into the current 3D viewer

void PaintPhysicalNode(TGeoPhysicalNode *node, Option_t *option)
 Paints a physical node associated with a path.

void PrintOverlaps() const

void RandomPoints(const TGeoVolume *vol, Int_t npoints, Option_t *option)
 Draw random points in the bounding box of a volume.

void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz)
 Shoot nrays in the current drawn geometry

void Raytrace(Option_t * /*option*/)
 Raytrace current drawn geometry

TGeoNode* SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char* g3path)
 shoot npoints randomly in a box of 1E-5 arround current point.
 return minimum distance to points outside

void SetBombFactors(Double_t bombx, Double_t bomby, Double_t bombz, Double_t bombr)
--- Set cartesian and radial bomb factors for translations

void SetExplodedView(Int_t ibomb)
 set type of exploding view

void SetNsegments(Int_t nseg)
 Set number of segments to approximate circles

void SetVisLevel(Int_t level)
 Set default level down to which visualization is performed

void SetTopVisible(Bool_t vis)

void SetVisOption(Int_t option)
 set drawing mode :
 option=0 (default) all nodes drawn down to vislevel
 option=1           leaves and nodes at vislevel drawn
 option=2           path is drawn

Int_t ShapeDistancetoPrimitive(const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const
  Returns distance between point px,py on the pad an a shape.

void Test(Int_t npoints, Option_t *option)
 Check time of finding "Where am I" for n points.

void TestOverlaps(const char* path)
--- Geometry overlap checker based on sampling.

Bool_t TestVoxels(TGeoVolume *vol)
 Check voxels efficiency per volume.

void UnbombTranslation(const Double_t *tr, Double_t *bombtr)
 get the new 'unbombed' translation vector according current exploded view mode

Double_t Weight(Double_t precision, Option_t *option)



Inline Functions


               void GetBombFactors(Double_t& bombx, Double_t& bomby, Double_t& bombz, Double_t& bombr) const
              Int_t GetBombMode() const
          TGeoNode* GetCheckedNode()
        const char* GetDrawPath() const
              Int_t GetVisLevel() const
              Int_t GetVisOption() const
              Int_t GetNsegments() const
          Double_t* GetViewBox()
             Bool_t IsExplodedView() const
             Bool_t IsRaytracing() const
               void SetClippingShape(TGeoShape* shape)
               void SetGeoManager(TGeoManager* geom)
               void SetRaytracing(Bool_t flag = kTRUE)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
        TGeoPainter TGeoPainter(const TGeoPainter&)


Author: Andrei Gheata 05/03/02
Last update: root/geompainter:$Name: $:$Id: TGeoPainter.cxx,v 1.71 2005/09/06 12:34:57 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.