Geant4-11
SoTrap.h
Go to the documentation of this file.
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
56class SoSFNode;
57
59
79#define SoTrap Geant4_SoTrap
80
81class SoTrap:public SoShape {
82
83 // The following is required:
85
86public:
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
171protected:
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
193private:
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
Definition: SoTrap.h:81
SO_NODE_HEADER(SoTrap)
SoSFFloat pDx2
Half-length along x of the side at y=+pDy1 of the face at -pDz.
Definition: SoTrap.h:118
SoSFFloat pDz
half-length along Z
Definition: SoTrap.h:97
virtual void clearAlternateRep()
We better be able to clear it, too!
Definition: SoTrap.cc:409
SoSFFloat pAlp2
Definition: SoTrap.h:140
SoSFFloat pDx4
Half-length along x of the side at y=+pDy2 of the face at +pDz.
Definition: SoTrap.h:130
SoSFFloat pDy1
Half-length along y of the face at -pDz.
Definition: SoTrap.h:110
void updateChildren()
Definition: SoTrap.cc:278
virtual void generateAlternateRep()
Definition: SoTrap.cc:398
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
Definition: SoTrap.cc:252
SoSFFloat pAlp1
Definition: SoTrap.h:135
SoChildList * children
ChildList. Required whenever the class has hidden children.
Definition: SoTrap.h:210
SoTrap()
Constructor, required.
Definition: SoTrap.cc:62
SoSFFloat pTheta
Polar angle of the line joining the centres of the faces at -/+pDz.
Definition: SoTrap.h:101
virtual ~SoTrap()
Destructor, required.
Definition: SoTrap.cc:83
SoSFFloat pDx3
Half-length along x of the side at y=-pDy2 of the face at +pDz.
Definition: SoTrap.h:126
SoSFFloat pDx1
Half-length along x of the side at y=-pDy1 of the face at -pDz.
Definition: SoTrap.h:114
void generateChildren()
Definition: SoTrap.cc:374
SoSFFloat pPhi
Definition: SoTrap.h:106
static void initClass()
Class Initializer, required.
Definition: SoTrap.cc:89
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
Definition: SoTrap.cc:246
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
Definition: SoTrap.cc:100
SoSFFloat pDy2
Half-length along y of the face at +pDz.
Definition: SoTrap.h:122
SoSFNode alternateRep
Alternate rep - required.
Definition: SoTrap.h:145