Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SoLAr.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 #include <memory>
25 
26 
27 class SoSFNode;
29 
39 class SoLAr:public SoShape {
40 
41  // The following is required:
43 
44 public:
45 
46  //
48  //
49  SoMFFloat fRmin;
50  //
52  //
53  SoMFFloat fRmax;
54  //
56  //
57  SoMFFloat fDz;
58  //
60  //
61  SoSFFloat fSPhi;
62  //
64  //
65  SoSFFloat fDPhi;
66  //
68  //
69  SoSFBool smoothDraw;
70  //
73  //
74  SoSFInt32 pOverrideNPhi;
75  //
77  //
78  SoSFNode alternateRep;
79 
80  //
82  //
83  SoLAr();
84 
85  //
87  //
88  static void initClass();
89 
90  //
96  //
97  virtual void generateAlternateRep();
98 
99  //
101  //
102  virtual void clearAlternateRep();
103 
104 protected:
105 
106  //
108  //
109  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
110 
111  //
113  //
114  virtual void generatePrimitives(SoAction *action);
115 
116  //
118  //
119  virtual SoChildList *getChildren() const;
120 
121 private:
122 
123  //
126  //
127  void generateChildren();
128 
129  //
132  //
133  void updateChildren();
134 
135  //
137  //
138  std::unique_ptr<SoChildList> m_children;
139 
140  //
142  //
143  void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
144  double oldSin=sinPhi,oldCos=cosPhi;
145  sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
146  cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
147  }
148 };
149 
150 #endif
SoLAr
SoLAr - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoLAr.h:39
SoLAr::SO_NODE_HEADER
SO_NODE_HEADER(SoLAr)
SoLAr::m_children
std::unique_ptr< SoChildList > m_children
ChildList. Required whenever the class has hidden children.
Definition: SoLAr.h:138
SoLAr::generatePrimitives
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
Definition: SoLAr.cxx:72
SoLAr::smoothDraw
SoSFBool smoothDraw
An Inventor option - slightly better render, worse performance.
Definition: SoLAr.h:69
SoLAr::fRmax
SoMFFloat fRmax
Outside radii.
Definition: SoLAr.h:53
SoLAr::getChildren
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
Definition: SoLAr.cxx:263
SoLAr::generateChildren
void generateChildren()
Generate Children.
Definition: SoLAr.cxx:461
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:500
SoLAr::fDz
SoMFFloat fDz
Z Positions.
Definition: SoLAr.h:57
SoLAr::alternateRep
SoSFNode alternateRep
Alternate rep required - for use by users without HEPVis shared objects.
Definition: SoLAr.h:78
SoLAr::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoLAr.h:61
SoLAr::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoLAr.h:65
SoLAr::updateChildren
void updateChildren()
Used to modify hidden children when a data field is changed.
Definition: SoLAr.cxx:304
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:269
SoLAr::generateAlternateRep
virtual void generateAlternateRep()
Generate AlternateRep, required.
Definition: SoLAr.cxx:489
SoLAr::pOverrideNPhi
SoSFInt32 pOverrideNPhi
Override number of phi subdivision used for rendering shape (i.e.
Definition: SoLAr.h:74
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:143
SoLAr::fRmin
SoMFFloat fRmin
Inside radii.
Definition: SoLAr.h:49
SoLAr::initClass
static void initClass()
Class Initializer, required.
Definition: SoLAr.cxx:62