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
geometry
solids
Boolean
include
G4BooleanSolid.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
//
30
// class G4BooleanSolid
31
//
32
// Class description:
33
//
34
// Abstract base class for solids created by boolean operations
35
// between other solids.
36
37
// History:
38
//
39
// 10.09.98 V.Grichine, created
40
//
41
// --------------------------------------------------------------------
42
#ifndef G4BOOLEANSOLID_HH
43
#define G4BOOLEANSOLID_HH
44
45
#include "
G4DisplacedSolid.hh
"
46
47
#include "
G4ThreeVector.hh
"
48
#include "
G4RotationMatrix.hh
"
49
#include "
G4Transform3D.hh
"
50
51
class
HepPolyhedronProcessor
;
52
53
class
G4BooleanSolid
:
public
G4VSolid
54
{
55
public
:
// with description
56
57
G4BooleanSolid
(
const
G4String
& pName,
58
G4VSolid
* pSolidA ,
59
G4VSolid
* pSolidB );
60
61
G4BooleanSolid
(
const
G4String
& pName,
62
G4VSolid
* pSolidA ,
63
G4VSolid
* pSolidB,
64
G4RotationMatrix
* rotMatrix,
65
const
G4ThreeVector
& transVector );
66
67
G4BooleanSolid
(
const
G4String
& pName,
68
G4VSolid
* pSolidA ,
69
G4VSolid
* pSolidB ,
70
const
G4Transform3D
& transform );
71
72
virtual
~G4BooleanSolid
();
73
74
virtual
const
G4VSolid
*
GetConstituentSolid
(
G4int
no
)
const
;
75
virtual
G4VSolid
*
GetConstituentSolid
(
G4int
no);
76
// If Solid is made up from a Boolean operation of two solids,
77
// return the corresponding solid (for no=0 and 1).
78
// If the solid is not a "Boolean", return 0.
79
80
inline
G4double
GetCubicVolume
();
81
inline
G4double
GetSurfaceArea
();
82
83
virtual
G4GeometryType
GetEntityType
()
const
;
84
virtual
G4Polyhedron
*
GetPolyhedron
()
const
;
85
86
std::ostream&
StreamInfo
(std::ostream& os)
const
;
87
88
inline
G4int
GetCubVolStatistics
()
const
;
89
inline
G4double
GetCubVolEpsilon
()
const
;
90
inline
void
SetCubVolStatistics
(
G4int
st);
91
inline
void
SetCubVolEpsilon
(
G4double
ep);
92
93
inline
G4int
GetAreaStatistics
()
const
;
94
inline
G4double
GetAreaAccuracy
()
const
;
95
inline
void
SetAreaStatistics
(
G4int
st);
96
inline
void
SetAreaAccuracy
(
G4double
ep);
97
98
G4ThreeVector
GetPointOnSurface
()
const
;
99
100
public
:
// without description
101
102
G4BooleanSolid
(__void__&);
103
// Fake default constructor for usage restricted to direct object
104
// persistency for clients requiring preallocation of memory for
105
// persistifiable objects.
106
107
G4BooleanSolid
(
const
G4BooleanSolid
& rhs);
108
G4BooleanSolid
&
operator=
(
const
G4BooleanSolid
& rhs);
109
// Copy constructor and assignment operator.
110
111
protected
:
112
113
G4Polyhedron
*
StackPolyhedron
(
HepPolyhedronProcessor
&,
114
const
G4VSolid
*)
const
;
115
// Stack polyhedra for processing. Return top polyhedron.
116
117
inline
G4double
GetAreaRatio
()
const
;
118
// Ratio of surface areas of SolidA to total A+B
119
120
protected
:
121
122
G4VSolid
*
fPtrSolidA
;
123
G4VSolid
*
fPtrSolidB
;
124
125
mutable
G4double
fAreaRatio
;
// Calculation deferred to GetPointOnSurface()
126
127
private
:
128
129
G4int
fStatistics;
130
G4double
fCubVolEpsilon;
131
G4double
fAreaAccuracy;
132
G4double
fCubicVolume;
133
G4double
fSurfaceArea;
134
135
mutable
G4Polyhedron
* fpPolyhedron;
136
137
G4bool
createdDisplacedSolid;
138
// If & only if this object created it, it must delete it
139
140
} ;
141
142
#include "G4BooleanSolid.icc"
143
144
#endif
Generated on Sat May 25 2013 14:33:12 for Geant4 by
1.8.4