Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoAtt.h
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 01/11/01
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_TGeoAtt
13#define ROOT_TGeoAtt
14
15#include "Rtypes.h"
16
17class TGeoAtt {
18public:
19 enum {
20 kBitMask = 0x00ffffff // bit mask
21 };
22
24 kVisOverride = BIT(0), // volume's vis. attributes are overridden
25 kVisNone = BIT(1), // the volume/node is invisible, as well as daughters
26 kVisThis = BIT(2), // this volume/node is visible
27 kVisDaughters = BIT(3), // all leaves are visible
28 kVisOneLevel = BIT(4), // first level daughters are visible
29 kVisStreamed = BIT(5), // true if attributes have been streamed
30 kVisTouched = BIT(6), // true if attributes are changed after closing geom
31 kVisOnScreen = BIT(7), // true if volume is visible on screen
32 kVisContainers = BIT(12), // all containers visible
33 kVisOnly = BIT(13), // just this visible
34 kVisBranch = BIT(14), // only a given branch visible
35 kVisRaytrace = BIT(15) // raytracing flag
36 }; // visibility attributes
37
39 kActOverride = BIT(8), // volume's activity attributes are overridden
40 kActNone = BIT(9), // the volume/node is ignored by tracking, as well as daughters
41 kActThis = BIT(10), // this volume/node is active for tracking
42 kActDaughters = BIT(11) // all leaves are active
43 }; // activity flags
44
46 kUseBoundingBox = BIT(16), // use bounding box for tracking
47 kUseVoxels = BIT(17), // compute and use voxels
48 kUseGsord = BIT(18) // use slicing in G3 style
49 }; // tracking optimization attributes
50 enum EGeoSavePrimitiveAtt { kSavePrimitiveAtt = BIT(19), kSaveNodesAtt = BIT(20) }; // save primitive bits
51protected:
52 // data members
53 UInt_t fGeoAtt; // option flags
54public:
55 // constructors
56 TGeoAtt();
57 TGeoAtt(Option_t *vis_opt, Option_t *activity_opt = "", Option_t *optimization_opt = "");
58 // destructor
59 virtual ~TGeoAtt();
60 // methods
62 void SetAttBit(UInt_t f, Bool_t set) { (set) ? SetAttBit(f) : ResetAttBit(f); };
63 void ResetAttBit(UInt_t f) { fGeoAtt &= ~(f & kBitMask); }
64 Bool_t TestAttBit(UInt_t f) const { return (Bool_t)((fGeoAtt & f) != 0); }
65
67 void SetVisBranch();
68 virtual void SetVisContainers(Bool_t flag = kTRUE);
69 virtual void SetVisLeaves(Bool_t flag = kTRUE);
70 virtual void SetVisOnly(Bool_t flag = kTRUE);
71 virtual void SetVisibility(Bool_t vis = kTRUE);
72 void SetVisDaughters(Bool_t vis = kTRUE);
73 void SetVisStreamed(Bool_t vis = kTRUE);
74 void SetVisTouched(Bool_t vis = kTRUE);
75 void SetActivity(Bool_t flag = kTRUE) { SetAttBit(kActThis, flag); }
77
79
80 Bool_t IsActive() const { return TestAttBit(kActThis); }
83 Bool_t IsVisible() const { return TestAttBit(kVisThis); }
88 Bool_t IsVisOnly() const { return TestAttBit(kVisOnly); }
89
92
93 ClassDef(TGeoAtt, 1) // class for visibility, activity and optimization attributes for volumes/nodes
94};
95
96#endif
#define f(i)
Definition RSha256.hxx:104
bool Bool_t
Definition RtypesCore.h:63
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
#define BIT(n)
Definition Rtypes.h:85
Option_t Option_t option
Visualization and tracking attributes for volumes and nodes.
Definition TGeoAtt.h:17
@ kBitMask
Definition TGeoAtt.h:20
Bool_t IsActive() const
Definition TGeoAtt.h:80
Bool_t IsVisRaytrace() const
Definition TGeoAtt.h:82
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set branch type visibility.
Definition TGeoAtt.cxx:94
Bool_t IsVisStreamed() const
Definition TGeoAtt.h:90
void SetActivity(Bool_t flag=kTRUE)
Definition TGeoAtt.h:75
Bool_t TestAttBit(UInt_t f) const
Definition TGeoAtt.h:64
Bool_t IsVisBranch() const
Definition TGeoAtt.h:85
Bool_t IsActiveDaughters() const
Definition TGeoAtt.h:81
void SetAttBit(UInt_t f, Bool_t set)
Definition TGeoAtt.h:62
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set branch type visibility.
Definition TGeoAtt.cxx:84
EGeoSavePrimitiveAtt
Definition TGeoAtt.h:50
@ kSaveNodesAtt
Definition TGeoAtt.h:50
@ kSavePrimitiveAtt
Definition TGeoAtt.h:50
Bool_t IsVisible() const
Definition TGeoAtt.h:83
Bool_t IsVisOnly() const
Definition TGeoAtt.h:88
virtual ~TGeoAtt()
Destructor.
Definition TGeoAtt.cxx:61
Bool_t IsVisTouched() const
Definition TGeoAtt.h:91
void SetVisStreamed(Bool_t vis=kTRUE)
Mark attributes as "streamed to file".
Definition TGeoAtt.cxx:128
void SetVisDaughters(Bool_t vis=kTRUE)
Set visibility for the daughters.
Definition TGeoAtt.cxx:116
EGeoVisibilityAtt
Definition TGeoAtt.h:23
@ kVisRaytrace
Definition TGeoAtt.h:35
@ kVisThis
Definition TGeoAtt.h:26
@ kVisContainers
Definition TGeoAtt.h:32
@ kVisOnly
Definition TGeoAtt.h:33
@ kVisDaughters
Definition TGeoAtt.h:27
@ kVisOverride
Definition TGeoAtt.h:24
@ kVisOnScreen
Definition TGeoAtt.h:31
@ kVisTouched
Definition TGeoAtt.h:30
@ kVisBranch
Definition TGeoAtt.h:34
@ kVisStreamed
Definition TGeoAtt.h:29
@ kVisOneLevel
Definition TGeoAtt.h:28
@ kVisNone
Definition TGeoAtt.h:25
Bool_t IsVisLeaves() const
Definition TGeoAtt.h:87
TGeoAtt()
Default constructor.
Definition TGeoAtt.cxx:31
void SetActiveDaughters(Bool_t flag=kTRUE)
Definition TGeoAtt.h:76
void ResetAttBit(UInt_t f)
Definition TGeoAtt.h:63
void SetVisRaytrace(Bool_t flag=kTRUE)
Definition TGeoAtt.h:66
Bool_t IsVisDaughters() const
Definition TGeoAtt.h:84
EGeoActivityAtt
Definition TGeoAtt.h:38
@ kActDaughters
Definition TGeoAtt.h:42
@ kActThis
Definition TGeoAtt.h:41
@ kActOverride
Definition TGeoAtt.h:39
@ kActNone
Definition TGeoAtt.h:40
Bool_t IsVisContainers() const
Definition TGeoAtt.h:86
virtual void SetVisibility(Bool_t vis=kTRUE)
Set visibility for this object.
Definition TGeoAtt.cxx:104
UInt_t fGeoAtt
Definition TGeoAtt.h:53
void SetOptimization(Option_t *option)
Set optimization flags.
Definition TGeoAtt.cxx:148
void SetAttBit(UInt_t f)
Definition TGeoAtt.h:61
void SetVisTouched(Bool_t vis=kTRUE)
Mark visualization attributes as "modified".
Definition TGeoAtt.cxx:138
EGeoOptimizationAtt
Definition TGeoAtt.h:45
@ kUseVoxels
Definition TGeoAtt.h:47
@ kUseGsord
Definition TGeoAtt.h:48
@ kUseBoundingBox
Definition TGeoAtt.h:46
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set branch type visibility.
Definition TGeoAtt.cxx:76
void SetVisBranch()
Set branch type visibility.
Definition TGeoAtt.cxx:66