Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
SoTrap.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: SoTrap.h 66373 2012-12-18 09:41:34Z gcosmo $
28 //
29 /*-----------------------------Hepvis----------------------------------------*/
30 /* */
31 /* Node: SoTrap */
32 /* Description: Represents the G4Trap Geant Geometry entity */
33 /* Author: Joe Boudreau Nov 11 1996 */
34 /* */
35 /*---------------------------------------------------------------------------*/
36 #ifndef HEPVis_SoTrap_h
37 #define HEPVis_SoTrap_h
38 
39 // Inheritance :
40 #include <Inventor/nodes/SoShape.h>
41 
42 #include <Inventor/fields/SoSFNode.h>
43 #include <Inventor/fields/SoSFBool.h>
44 #include <Inventor/fields/SoSFFloat.h>
45 
46 //adding fields
47 #ifdef WIN32
48 #include <SoWinEnterScope.h>
49 #endif
50 
51 
52 // Defining Class
53 #ifdef WIN32
54 #include <SoWinLeaveScope.h>
55 #endif
56 
57 class SoSFNode;
58 
60 
80 #define SoTrap Geant4_SoTrap
81 
82 class SoTrap:public SoShape {
83 
84  // The following is required:
86 
87 public:
88 #if defined(WIN32) && defined(BUILDING_DLL)
89  // When building the node as a DLL under Win32 we must explicitly
90  // declare this entry point as visible outside the DLL. The macro
91  // BUILDING_DLL is defined in the node's source file.
92  _declspec(dllexport)
93 #endif
94 
95  //
97  //
98  SoSFFloat pDz;
99  //
101  //
102  SoSFFloat pTheta;
103  //
106  //
107  SoSFFloat pPhi;
108  //
110  //
111  SoSFFloat pDy1;
112  //
114  //
115  SoSFFloat pDx1;
116  //
118  //
119  SoSFFloat pDx2;
120  //
122  //
123  SoSFFloat pDy2;
124  //
126  //
127  SoSFFloat pDx3;
128  //
130  //
131  SoSFFloat pDx4;
132  //
135  //
136  SoSFFloat pAlp1;
137  //
140  //
141  SoSFFloat pAlp2;
142 
143  //
145  //
146  SoSFNode alternateRep;
147 
148  //
150  //
151  SoTrap();
152 
153  //
155  //
156  static void initClass();
157 
158  //
164  //
165  virtual void generateAlternateRep();
166 
167  //
169  //
170  virtual void clearAlternateRep();
171 
172 protected:
173 
174  //
176  //
177  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
178 
179  //
181  //
182  virtual void generatePrimitives(SoAction *action);
183 
184  //
186  //
187  virtual SoChildList *getChildren() const;
188 
189  //
191  //
192  virtual ~SoTrap();
193 
194 private:
195 
196  //
199  //
200  void generateChildren();
201 
202  //
205  //
206  void updateChildren();
207 
208  //
210  //
211  SoChildList *children;
212 
213 };
214 
215 #ifdef WIN32
216 #include <SoWinEnterScope.h>
217 #endif
218 
219 #endif
SoSFFloat pDx2
Half-length along x of the side at y=+pDy1 of the face at -pDz.
Definition: SoTrap.h:119
SoSFFloat pAlp2
Definition: SoTrap.h:141
void generateChildren()
SoChildList * children
ChildList. Required whenever the class has hidden children.
Definition: SoTrap.h:211
SoSFFloat pTheta
Polar angle of the line joining the centres of the faces at -/+pDz.
Definition: SoTrap.h:102
SO_NODE_HEADER(SoTrap)
SoSFFloat pAlp1
Definition: SoTrap.h:136
virtual ~SoTrap()
Destructor, required.
SoSFFloat pPhi
Definition: SoTrap.h:107
SoSFFloat pDz
half-length along Z
Definition: SoTrap.h:98
virtual void clearAlternateRep()
We better be able to clear it, too!
SoSFFloat pDy2
Half-length along y of the face at +pDz.
Definition: SoTrap.h:123
Definition: SoTrap.h:82
virtual void generateAlternateRep()
SoSFFloat pDy1
Half-length along y of the face at -pDz.
Definition: SoTrap.h:111
SoTrap()
Constructor, required.
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
SoSFNode alternateRep
Alternate rep - required.
Definition: SoTrap.h:146
SoSFFloat pDx4
Half-length along x of the side at y=+pDy2 of the face at +pDz.
Definition: SoTrap.h:131
SoSFFloat pDx1
Half-length along x of the side at y=-pDy1 of the face at -pDz.
Definition: SoTrap.h:115
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
void updateChildren()
static void initClass()
Class Initializer, required.
SoSFFloat pDx3
Half-length along x of the side at y=-pDy2 of the face at +pDz.
Definition: SoTrap.h:127