ATLAS Offline Software
SoPcons.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: SoPcons */
8 /* Description: Represents the G4PCon Geant Geometry entity */
9 /* Meant as a replacement to SoPcon */
10 /* Author: Joe Boudreau Nov 11 1996 */
11 /* Update: Giorgi Gvaberidze (ggvaberi@cern.ch) */
12 /* April 2011 */
13 /* */
14 /*---------------------------------------------------------------------------*/
15 #ifndef HEPVis_SoPcons_h
16 #define HEPVis_SoPcons_h
17 
18 #include <Inventor/C/errors/debugerror.h>
19 #include <Inventor/fields/SoSFFloat.h>
20 #include <Inventor/fields/SoMFFloat.h>
21 #include <Inventor/fields/SoSFInt32.h>
22 #include <Inventor/fields/SoSFNode.h>
23 #include <Inventor/fields/SoSFBool.h>
24 #include <Inventor/nodes/SoShape.h>
25 
26 // class SoSFNode;
27 
29 
39 class SoPcons: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;//FIXED
79 
80  SoSFBool drawEdgeLines;//Default: False
81 
82  //
84  //
85  SoPcons();
86 
87  //
89  //
90  static void initClass();
91 
92  //
98  //
99  virtual void generateAlternateRep();//FIXME: NOT IMPLEMENTED
100 
101  //
103  //
104  virtual void clearAlternateRep();//FIXME: NOT IMPLEMENTED
105 
106 protected:
107 
108  //
110  //
111  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
112 
113  //
115  //
116  virtual void generatePrimitives(SoAction *action);
117 
118  //
120  //
121  virtual SoChildList *getChildren() const;
122 
123 
124 protected:
125  //
127  //
128  virtual ~SoPcons();
129 
130 private:
131 
132  //
135  //
136  void generateChildren();
137 
138  //
141  //
142  void updateChildren();
143 
144  //
146  //
147  SoChildList *m_children;
148 
149  //
151  //
152  void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
153  double oldSin=sinPhi,oldCos=cosPhi;
154  sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
155  cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
156  }
157 };
158 
159 #endif
SoPcons
SoPcons - Inventor version of the G4Cons Geant Geometry entity.
Definition: SoPcons.h:39
SoPcons::smoothDraw
SoSFBool smoothDraw
An Inventor option - slightly better render, worse performance.
Definition: SoPcons.h:69
SoPcons::inc
void inc(double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
help with trigonometry. increments sines an cosines by an angle.
Definition: SoPcons.h:152
SoPcons::m_children
SoChildList * m_children
ChildList. Required whenever the class has hidden children.
Definition: SoPcons.h:147
SoPcons::clearAlternateRep
virtual void clearAlternateRep()
We better be able to clear it, too!
Definition: SoPcons.cxx:833
SoPcons::fSPhi
SoSFFloat fSPhi
Starting angle, in radians.
Definition: SoPcons.h:61
SoPcons::fDz
SoMFFloat fDz
Z Positions.
Definition: SoPcons.h:57
SoPcons::fRmax
SoMFFloat fRmax
Outside radii.
Definition: SoPcons.h:53
SoPcons::updateChildren
void updateChildren()
Used to modify hidden children when a data field is changed.
Definition: SoPcons.cxx:390
SoPcons::initClass
static void initClass()
Class Initializer, required.
Definition: SoPcons.cxx:72
SoPcons::fRmin
SoMFFloat fRmin
Inside radii.
Definition: SoPcons.h:49
SoPcons::getChildren
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
Definition: SoPcons.cxx:349
SoPcons::alternateRep
SoSFNode alternateRep
Alternate rep required - for use by users without HEPVis shared objects.
Definition: SoPcons.h:78
SoPcons::drawEdgeLines
SoSFBool drawEdgeLines
Definition: SoPcons.h:80
SoPcons::generateChildren
void generateChildren()
Generate Children.
Definition: SoPcons.cxx:551
SoPcons::generateAlternateRep
virtual void generateAlternateRep()
Generate AlternateRep, required.
Definition: SoPcons.cxx:581
SoPcons::pOverrideNPhi
SoSFInt32 pOverrideNPhi
Override number of phi subdivision used for rendering shape (i.e.
Definition: SoPcons.h:74
SoPcons::~SoPcons
virtual ~SoPcons()
Destructor, required.
Definition: SoPcons.cxx:66
SoPcons::SO_NODE_HEADER
SO_NODE_HEADER(SoPcons)
SoPcons::fDPhi
SoSFFloat fDPhi
Delta-angle, in radians.
Definition: SoPcons.h:65
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
SoPcons::computeBBox
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
Definition: SoPcons.cxx:355
SoPcons::SoPcons
SoPcons()
Constructor, required.
Definition: SoPcons.cxx:38
SoPcons::generatePrimitives
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
Definition: SoPcons.cxx:81