ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SoTrap.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file 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 //
28 /*-----------------------------Hepvis----------------------------------------*/
29 /* */
30 /* Node: SoTrap */
31 /* Description: Represents the G4Trap Geant Geometry entity */
32 /* Author: Joe Boudreau Nov 11 1996 */
33 /* */
34 /*---------------------------------------------------------------------------*/
35 #ifndef HEPVis_SoTrap_h
36 #define HEPVis_SoTrap_h
37 
38 // Inheritance :
39 #include <Inventor/nodes/SoShape.h>
40 
41 #include <Inventor/fields/SoSFNode.h>
42 #include <Inventor/fields/SoSFBool.h>
43 #include <Inventor/fields/SoSFFloat.h>
44 
45 //adding fields
46 #ifdef WIN32
47 #include <SoWinEnterScope.h>
48 #endif
49 
50 
51 // Defining Class
52 #ifdef WIN32
53 #include <SoWinLeaveScope.h>
54 #endif
55 
56 class SoSFNode;
57 
59 
79 #define SoTrap Geant4_SoTrap
80 
81 class SoTrap:public SoShape {
82 
83  // The following is required:
85 
86 public:
87 #if defined(WIN32) && defined(BUILDING_DLL)
88  // When building the node as a DLL under Win32 we must explicitly
89  // declare this entry point as visible outside the DLL. The macro
90  // BUILDING_DLL is defined in the node's source file.
91  _declspec(dllexport)
92 #endif
93 
94  //
96  //
97  SoSFFloat pDz;
98  //
100  //
101  SoSFFloat pTheta;
102  //
105  //
106  SoSFFloat pPhi;
107  //
109  //
110  SoSFFloat pDy1;
111  //
113  //
114  SoSFFloat pDx1;
115  //
117  //
118  SoSFFloat pDx2;
119  //
121  //
122  SoSFFloat pDy2;
123  //
125  //
126  SoSFFloat pDx3;
127  //
129  //
130  SoSFFloat pDx4;
131  //
134  //
135  SoSFFloat pAlp1;
136  //
139  //
140  SoSFFloat pAlp2;
141 
142  //
144  //
145  SoSFNode alternateRep;
146 
147  //
149  //
150  SoTrap();
151 
152  //
154  //
155  static void initClass();
156 
157  //
163  //
164  virtual void generateAlternateRep();
165 
166  //
168  //
169  virtual void clearAlternateRep();
170 
171 protected:
172 
173  //
175  //
176  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
177 
178  //
180  //
181  virtual void generatePrimitives(SoAction *action);
182 
183  //
185  //
186  virtual SoChildList *getChildren() const;
187 
188  //
190  //
191  virtual ~SoTrap();
192 
193 private:
194 
195  //
198  //
199  void generateChildren();
200 
201  //
204  //
205  void updateChildren();
206 
207  //
209  //
210  SoChildList *children;
211 
212 };
213 
214 #ifdef WIN32
215 #include <SoWinEnterScope.h>
216 #endif
217 
218 #endif