ATLAS Offline Software
SoLAr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /*-----------------------------Hepvis----------------------------------------*/
6 /* */
7 /* Node: SoLAr */
8 /* Description: Represents the G4PCon Geant Geometry entity */
9 /* Meant as a replacement to SoPcon */
10 /* Author: Joe Boudreau Nov 11 1996 */
11 /* */
12 /*---------------------------------------------------------------------------*/
13 #ifndef HEPVis_SoLAr_h
14 #define HEPVis_SoLAr_h
15 
16 #include <Inventor/C/errors/debugerror.h>
17 #include <Inventor/fields/SoSFFloat.h>
18 #include <Inventor/fields/SoMFFloat.h>
19 #include <Inventor/fields/SoSFInt32.h>
20 #include <Inventor/fields/SoSFNode.h>
21 #include <Inventor/fields/SoSFBool.h>
22 #include <Inventor/nodes/SoShape.h>
23 
24 class SoSFNode;
26 
36 class SoLAr:public SoShape {
37 
38  // The following is required:
40 
41 public:
42 
43  //
45  //
46  SoMFFloat fRmin;
47  //
49  //
50  SoMFFloat fRmax;
51  //
53  //
54  SoMFFloat fDz;
55  //
57  //
58  SoSFFloat fSPhi;
59  //
61  //
62  SoSFFloat fDPhi;
63  //
65  //
66  SoSFBool smoothDraw;
67  //
70  //
71  SoSFInt32 pOverrideNPhi;
72  //
74  //
75  SoSFNode alternateRep;
76 
77  //
79  //
80  SoLAr();
81 
82  //
84  //
85  static void initClass();
86 
87  //
93  //
94  virtual void generateAlternateRep();
95 
96  //
98  //
99  virtual void clearAlternateRep();
100 
101 protected:
102 
103  //
105  //
106  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
107 
108  //
110  //
111  virtual void generatePrimitives(SoAction *action);
112 
113  //
115  //
116  virtual SoChildList *getChildren() const;
117 
118 
119 protected:
120  //
122  //
123  virtual ~SoLAr();
124 
125 private:
126 
127  //
130  //
131  void generateChildren();
132 
133  //
136  //
137  void updateChildren();
138 
139  //
141  //
142  SoChildList *m_children;
143 
144  //
146  //
147  void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
148  double oldSin=sinPhi,oldCos=cosPhi;
149  sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
150  cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
151  }
152 };
153 
154 #endif
SoLAr
SoLAr - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoLAr.h:36
SoLAr::SO_NODE_HEADER
SO_NODE_HEADER(SoLAr)
SoLAr::generatePrimitives
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
Definition: SoLAr.cxx:76
SoLAr::smoothDraw
SoSFBool smoothDraw
An Inventor option - slightly better render, worse performance.
Definition: SoLAr.h:66
SoLAr::fRmax
SoMFFloat fRmax
Outside radii.
Definition: SoLAr.h:50
SoLAr::getChildren
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
Definition: SoLAr.cxx:267
SoLAr::generateChildren
void generateChildren()
Generate Children.
Definition: SoLAr.cxx:465
SoLAr::~SoLAr
virtual ~SoLAr()
Destructor, required.
Definition: SoLAr.cxx:61
SoLAr::SoLAr
SoLAr()
Constructor, required.
Definition: SoLAr.cxx:35
SoLAr::clearAlternateRep
virtual void clearAlternateRep()
We better be able to clear it, too!
Definition: SoLAr.cxx:504
SoLAr::fDz
SoMFFloat fDz
Z Positions.
Definition: SoLAr.h:54
SoLAr::alternateRep
SoSFNode alternateRep
Alternate rep required - for use by users without HEPVis shared objects.
Definition: SoLAr.h:75
SoLAr::m_children
SoChildList * m_children
ChildList. Required whenever the class has hidden children.
Definition: SoLAr.h:142
SoLAr::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoLAr.h:58
SoLAr::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoLAr.h:62
SoLAr::updateChildren
void updateChildren()
Used to modify hidden children when a data field is changed.
Definition: SoLAr.cxx:308
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
SoLAr::computeBBox
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
Definition: SoLAr.cxx:273
SoLAr::generateAlternateRep
virtual void generateAlternateRep()
Generate AlternateRep, required.
Definition: SoLAr.cxx:493
SoLAr::pOverrideNPhi
SoSFInt32 pOverrideNPhi
Override number of phi subdivision used for rendering shape (i.e.
Definition: SoLAr.h:71
SoLAr::inc
void inc(double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
help with trigonometry. increments sines an cosines by an angle.
Definition: SoLAr.h:147
SoLAr::fRmin
SoMFFloat fRmin
Inside radii.
Definition: SoLAr.h:46
SoLAr::initClass
static void initClass()
Class Initializer, required.
Definition: SoLAr.cxx:66