Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
SoTubs.h
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: SoTubs.h 66373 2012-12-18 09:41:34Z gcosmo $
28 //
29 /*-----------------------------Hepvis----------------------------------------*/
30 /* */
31 /* Node: SoTubs */
32 /* Description: Represents the G4Tubs Geant Geometry entity */
33 /* Author: Joe Boudreau Nov 11 1996 */
34 /* */
35 /*---------------------------------------------------------------------------*/
36 #ifndef HEPVis_SoTubs_h
37 #define HEPVis_SoTubs_h
38 
39 #include <Inventor/fields/SoSFFloat.h>
40 #include <Inventor/fields/SoSFNode.h>
41 #include <Inventor/fields/SoSFBool.h>
42 #include <Inventor/nodes/SoShape.h>
43 
44 class SoSFNode;
45 
47 
70 #define SoTubs Geant4_SoTubs
71 
72 class SoTubs:public SoShape {
73 
74  // The following is required:
76 
77 public:
78 
79  //
81  //
82  SoSFFloat pRMin;
83  //
85  //
86  SoSFFloat pRMax;
87  //
89  //
90  SoSFFloat pDz;
91  //
93  //
94  SoSFFloat pSPhi;
95  //
97  //
98  SoSFFloat pDPhi;
99  //
101  //
102  SoSFNode alternateRep;
103 
104  //
106  //
107  SoTubs();
108 
109  //
111  //
112  static void initClass();
113 
114  //
120  //
121  virtual void generateAlternateRep();
122 
123  //
125  //
126  virtual void clearAlternateRep();
127 
128 protected:
129 
130  //
132  //
133  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
134 
135  //
137  //
138  virtual void generatePrimitives(SoAction *action);
139 
140  //
142  //
143  virtual SoChildList *getChildren() const;
144 
145 
146 protected:
147  //
149  //
150  virtual ~SoTubs();
151 
152 private:
153 
154  //
157  //
158  void generateChildren();
159 
160  //
163  //
164  void updateChildren();
165 
166  //
168  //
169  SoChildList *children;
170 
171  //
173  //
174  void inc(double & sinPhi, double & cosPhi, double sinDeltaPhi, double cosDeltaPhi) const {
175  double oldSin=sinPhi,oldCos=cosPhi;
176  sinPhi = oldSin*cosDeltaPhi+oldCos*sinDeltaPhi;
177  cosPhi = oldCos*cosDeltaPhi-oldSin*sinDeltaPhi;
178  }
179 
180 };
181 
182 #endif
void updateChildren()
SoChildList * children
ChildList. Required whenever the class has hidden children.
Definition: SoTubs.h:169
virtual void clearAlternateRep()
We better be able to clear it, too!
SoTubs()
Constructor, required.
void generateChildren()
SoSFFloat pRMax
Outside radius of the tube.
Definition: SoTubs.h:86
virtual void generateAlternateRep()
void inc(double &sinPhi, double &cosPhi, double sinDeltaPhi, double cosDeltaPhi) const
help with trigonometry. increments sines an cosines by an angle.
Definition: SoTubs.h:174
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
SoSFNode alternateRep
Alternate rep - required.
Definition: SoTubs.h:102
Definition: SoTubs.h:72
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
virtual ~SoTubs()
Destructor, required.
static void initClass()
Class Initializer, required.
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
SoSFFloat pRMin
Inside radius of the tube.
Definition: SoTubs.h:82
SoSFFloat pSPhi
Starting angle, in radians.
Definition: SoTubs.h:94
SoSFFloat pDz
Half-length in Z.
Definition: SoTubs.h:90
SO_NODE_HEADER(SoTubs)
SoSFFloat pDPhi
Delta-angle, in radians.
Definition: SoTubs.h:98