Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
graphics_reps
include
G4Polyhedron.hh
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
// $Id$
28
29
#ifndef G4POLYHEDRON_HH
30
#define G4POLYHEDRON_HH
31
32
// Class Description:
33
// G4Polyhedron is an intermediate class between G4 and visualization
34
// systems. It is intended to provide some service like:
35
// - polygonization of the G4 shapes with triangulization
36
// (quadrilaterization) of complex polygons;
37
// - calculation of normals for faces and vertices.
38
//
39
// Inherits from HepPolyhedron, to which reference should be made for
40
// functionality.
41
//
42
// Public constructors:
43
// G4PolyhedronBox(dx,dy,dz) - create G4Polyhedron for G4 Box;
44
// G4PolyhedronTrd1(dx1,dx2,dy,dz) - create G4Polyhedron for G4 Trd1;
45
// G4PolyhedronTrd2(dx1,dx2,dy1,dy2,dz) - create G4Polyhedron for G4 Trd2;
46
// G4PolyhedronTrap(dz,theta,phi,
47
// h1,bl1,tl1,alp1,
48
// h2,bl2,tl2,alp2) - create G4Polyhedron for G4 Trap;
49
// G4PolyhedronPara(dx,dy,dz,
50
// alpha,theta,phi) - create G4Polyhedron for G4 Para;
51
//
52
// G4PolyhedronTube(rmin,rmax,dz) - create G4Polyhedron for G4 Tube;
53
// G4PolyhedronTubs(rmin,rmax,dz,
54
// phi1,dphi) - create G4Polyhedron for G4 Tubs;
55
// G4PolyhedronCone(rmin1,rmax1,
56
// rmin2,rmax2,dz) - create G4Polyhedron for G4 Cone;
57
// G4PolyhedronCons(rmin1,rmax1,
58
// rmin2,rmax2,dz,
59
// phi1,dphi) - create G4Polyhedron for G4 Cons;
60
//
61
// G4PolyhedronPgon(phi,dphi,npdv,nz,
62
// z(*),rmin(*),rmax(*)) - create G4Polyhedron for G4 Pgon;
63
// G4PolyhedronPcon(phi,dphi,nz,
64
// z(*),rmin(*),rmax(*)) - create G4Polyhedron for G4 Pcon;
65
//
66
// G4PolyhedronSphere(rmin,rmax,
67
// phi,dphi,the,dthe) - create G4Polyhedron for Sphere;
68
// G4PolyhedronTorus(rmin,rmax,rtor,
69
// phi,dphi) - create G4Polyhedron for Torus;
70
// G4PolyhedronEllipsoid(dx,dy,dz,
71
// zcut1,zcut2) - create G4Polyhedron for Ellipsoid;
72
//
73
// Public functions inherited from HepPolyhedron (this list might be
74
// incomplete):
75
// GetNoVertices() - returns number of vertices
76
// GetNoFacets() - returns number of faces
77
// GetNextVertexIndex(index, edgeFlag) - get vertex indeces of the
78
// quadrilaterals in order; returns false when
79
// finished each face;
80
// GetVertex(index) - returns vertex by index;
81
// GetNextVertex(vertex, edgeFlag) - get vertices with edge visibility
82
// of the quadrilaterals in order;
83
// returns false when finished each face;
84
// GetNextVertex(vertex, edgeFlag, normal) - get vertices with edge
85
// visibility and normal of the quadrilaterals
86
// in order; returns false when finished each face;
87
// GetNextNormal(normal) - get normals of each face in order;
88
// returns false when finished all faces;
89
// GetNextUnitNormal(normal) - get normals of unit length of each face
90
// in order; returns false when finished all faces;
91
// GetNextEdgeIndeces(i1, i2, edgeFlag) - get indeces of the next edge;
92
// returns false for the last edge;
93
// GetNextEdge(p1, p2, edgeFlag) - get next edge;
94
// returns false for the last edge;
95
// SetNumberOfRotationSteps(G4int n) - Set number of steps for whole circle;
96
97
// History:
98
// 21st February 2000 Evgeni Chernaev, John Allison
99
// - Re-written to inherit HepPolyhedron.
100
//
101
// 11.03.05 J.Allison
102
// - Added fNumberOfRotationStepsAtTimeOfCreation and access method.
103
// (NumberOfRotationSteps is also called number of sides per circle or
104
// line segments per circle - see
105
// /vis/viewer/set/lineSegmentsPerCircle.)
106
// 20.06.05 G.Cosmo
107
// - Added G4PolyhedronEllipsoid.
108
// 09.03.06 J.Allison
109
// - Added operator<<.
110
111
#include "
globals.hh
"
112
#include "
HepPolyhedron.h
"
113
#include "
G4Visible.hh
"
114
115
class
G4Polyhedron
:
public
HepPolyhedron
,
public
G4Visible
{
116
public
:
117
G4Polyhedron
();
118
G4Polyhedron
(
const
HepPolyhedron
& from);
119
// Use compiler defaults for copy contructor and assignment. (They
120
// invoke their counterparts in HepPolyhedron and G4Visible.)
121
virtual
~G4Polyhedron
();
122
123
G4int
GetNumberOfRotationStepsAtTimeOfCreation
()
const
{
124
return
fNumberOfRotationStepsAtTimeOfCreation;
125
}
126
private
:
127
G4int
fNumberOfRotationStepsAtTimeOfCreation;
128
};
129
130
class
G4PolyhedronBox
:
public
G4Polyhedron
{
131
public
:
132
G4PolyhedronBox
(
G4double
dx,
G4double
dy,
G4double
dz);
133
virtual
~G4PolyhedronBox
();
134
};
135
136
class
G4PolyhedronCone
:
public
G4Polyhedron
{
137
public
:
138
G4PolyhedronCone
(
G4double
Rmn1,
G4double
Rmx1,
139
G4double
Rmn2,
G4double
Rmx2,
G4double
Dz);
140
virtual
~G4PolyhedronCone
();
141
};
142
143
class
G4PolyhedronCons
:
public
G4Polyhedron
{
144
public
:
145
G4PolyhedronCons
(
G4double
Rmn1,
G4double
Rmx1,
146
G4double
Rmn2,
G4double
Rmx2,
G4double
Dz,
147
G4double
Phi1,
G4double
Dphi);
148
virtual
~G4PolyhedronCons
();
149
};
150
151
class
G4PolyhedronPara
:
public
G4Polyhedron
{
152
public
:
153
G4PolyhedronPara
(
G4double
Dx,
G4double
Dy,
G4double
Dz,
154
G4double
Alpha
,
G4double
Theta,
G4double
Phi);
155
virtual
~G4PolyhedronPara
();
156
};
157
158
class
G4PolyhedronPcon
:
public
G4Polyhedron
{
159
public
:
160
G4PolyhedronPcon
(
G4double
phi,
G4double
dphi,
G4int
nz,
161
const
G4double
*
z
,
162
const
G4double
*rmin,
163
const
G4double
*rmax);
164
virtual
~G4PolyhedronPcon
();
165
};
166
167
class
G4PolyhedronPgon
:
public
G4Polyhedron
{
168
public
:
169
G4PolyhedronPgon
(
G4double
phi,
G4double
dphi,
G4int
npdv,
G4int
nz,
170
const
G4double
*
z
,
171
const
G4double
*rmin,
172
const
G4double
*rmax);
173
virtual
~G4PolyhedronPgon
();
174
};
175
176
class
G4PolyhedronSphere
:
public
G4Polyhedron
{
177
public
:
178
G4PolyhedronSphere
(
G4double
rmin,
G4double
rmax,
179
G4double
phi,
G4double
dphi,
180
G4double
the,
G4double
dthe);
181
virtual
~G4PolyhedronSphere
();
182
};
183
184
class
G4PolyhedronTorus
:
public
G4Polyhedron
{
185
public
:
186
G4PolyhedronTorus
(
G4double
rmin,
G4double
rmax,
G4double
rtor,
187
G4double
phi,
G4double
dphi);
188
virtual
~G4PolyhedronTorus
();
189
};
190
191
class
G4PolyhedronTrap
:
public
G4Polyhedron
{
192
public
:
193
G4PolyhedronTrap
(
G4double
Dz,
G4double
Theta,
G4double
Phi,
194
G4double
Dy1,
195
G4double
Dx1,
G4double
Dx2,
G4double
Alp1,
196
G4double
Dy2,
197
G4double
Dx3,
G4double
Dx4,
G4double
Alp2);
198
virtual
~G4PolyhedronTrap
();
199
};
200
201
class
G4PolyhedronTrd1
:
public
G4Polyhedron
{
202
public
:
203
G4PolyhedronTrd1
(
G4double
Dx1,
G4double
Dx2,
204
G4double
Dy,
G4double
Dz);
205
virtual
~G4PolyhedronTrd1
();
206
};
207
208
class
G4PolyhedronTrd2
:
public
G4Polyhedron
{
209
public
:
210
G4PolyhedronTrd2
(
G4double
Dx1,
G4double
Dx2,
211
G4double
Dy1,
G4double
Dy2,
G4double
Dz);
212
virtual
~G4PolyhedronTrd2
();
213
};
214
215
class
G4PolyhedronTube
:
public
G4Polyhedron
{
216
public
:
217
G4PolyhedronTube
(
G4double
Rmin,
G4double
Rmax,
G4double
Dz);
218
virtual
~G4PolyhedronTube
();
219
};
220
221
class
G4PolyhedronTubs
:
public
G4Polyhedron
{
222
public
:
223
G4PolyhedronTubs
(
G4double
Rmin,
G4double
Rmax,
G4double
Dz,
224
G4double
Phi1,
G4double
Dphi);
225
virtual
~G4PolyhedronTubs
();
226
};
227
228
class
G4PolyhedronParaboloid
:
public
G4Polyhedron
{
229
public
:
230
G4PolyhedronParaboloid
(
G4double
r1,
G4double
r2,
G4double
dz,
231
G4double
sPhi,
G4double
dPhi);
232
virtual
~G4PolyhedronParaboloid
();
233
};
234
235
class
G4PolyhedronHype
:
public
G4Polyhedron
{
236
public
:
237
G4PolyhedronHype
(
G4double
r1,
G4double
r2,
G4double
tan1,
238
G4double
tan2,
G4double
halfZ);
239
virtual
~G4PolyhedronHype
();
240
};
241
242
class
G4PolyhedronEllipsoid
:
public
G4Polyhedron
{
243
public
:
244
G4PolyhedronEllipsoid
(
G4double
dx,
G4double
dy,
G4double
dz,
245
G4double
zcut1,
G4double
zcut2);
246
virtual
~G4PolyhedronEllipsoid
();
247
};
248
249
class
G4PolyhedronEllipticalCone
:
public
G4Polyhedron
{
250
public
:
251
G4PolyhedronEllipticalCone
(
G4double
dx,
G4double
dy,
G4double
z
,
252
G4double
zcut1);
253
virtual
~G4PolyhedronEllipticalCone
();
254
};
255
256
std::ostream&
operator<<
(std::ostream& os,
const
G4Polyhedron
&);
257
258
#endif
/* G4POLYHEDRON_HH */
Generated on Sat May 25 2013 14:33:18 for Geant4 by
1.8.4