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
G4DisplacedSolid.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 G4DisplacedSolid
31
//
32
// Class description:
33
//
34
// A displaced solid is a solid that has been shifted from its original
35
// frame of reference to a new one. It is meant to be used only for
36
// simplifying the implementation of "Boolean solids".
37
38
// History:
39
//
40
// 28.10.98 V.Grichine: created
41
// 22.11.00 V.Grichine: new set methods for matrix/vectors
42
//
43
// --------------------------------------------------------------------
44
#ifndef G4DisplacedSolid_HH
45
#define G4DisplacedSolid_HH
46
47
#include "
G4VSolid.hh
"
48
#include "
G4RotationMatrix.hh
"
49
#include "
G4ThreeVector.hh
"
50
#include "
G4Transform3D.hh
"
51
#include "
G4AffineTransform.hh
"
52
53
class
G4DisplacedSolid
:
public
G4VSolid
54
{
55
public
:
// with description
56
57
G4DisplacedSolid
(
const
G4String
& pName,
58
G4VSolid
* pSolid ,
59
G4RotationMatrix
* rotMatrix,
60
const
G4ThreeVector
& transVector ) ;
61
62
G4DisplacedSolid
(
const
G4String
& pName,
63
G4VSolid
* pSolid ,
64
const
G4Transform3D
& transform ) ;
65
66
G4DisplacedSolid
(
const
G4String
& pName,
67
G4VSolid
* pSolid ,
68
const
G4AffineTransform
directTransform );
69
// For use in instantiating a transient instance from a persistent one.
70
71
virtual
~G4DisplacedSolid
() ;
72
73
public
:
// without description
74
75
// It also has all the methods that a solid requires, eg.
76
77
EInside
Inside
(
const
G4ThreeVector
&
p
)
const
;
78
79
G4bool
CalculateExtent
(
const
EAxis
pAxis,
80
const
G4VoxelLimits
& pVoxelLimit,
81
const
G4AffineTransform
& pTransform,
82
G4double
& pMin,
G4double
& pMax)
const
;
83
84
G4ThreeVector
SurfaceNormal
(
const
G4ThreeVector
& p )
const
;
85
86
G4double
DistanceToIn
(
const
G4ThreeVector
& p,
87
const
G4ThreeVector
&
v
)
const
;
88
89
G4double
DistanceToIn
(
const
G4ThreeVector
& p)
const
;
90
91
G4double
DistanceToOut
(
const
G4ThreeVector
& p,
92
const
G4ThreeVector
& v,
93
const
G4bool
calcNorm=
false
,
94
G4bool
*validNorm=0,
95
G4ThreeVector
*
n
=0 )
const
;
96
97
G4double
DistanceToOut
(
const
G4ThreeVector
& p )
const
;
98
99
100
void
ComputeDimensions
(
G4VPVParameterisation
* p,
101
const
G4int
n
,
102
const
G4VPhysicalVolume
* pRep ) ;
103
104
void
CleanTransformations
();
105
106
G4ThreeVector
GetPointOnSurface
()
const
;
107
108
public
:
// with description
109
110
G4GeometryType
GetEntityType
()
const
;
111
G4VSolid
*
Clone
()
const
;
112
113
const
G4DisplacedSolid
*
GetDisplacedSolidPtr
()
const
;
114
G4DisplacedSolid
*
GetDisplacedSolidPtr
();
115
// If the Solid is a "G4DisplacedSolid",
116
// return a self pointer else return 0.
117
118
G4VSolid
*
GetConstituentMovedSolid
()
const
;
119
120
G4AffineTransform
GetTransform
()
const
;
121
void
SetTransform
(
G4AffineTransform
& );
122
123
G4AffineTransform
GetDirectTransform
()
const
;
124
void
SetDirectTransform
(
G4AffineTransform
&);
125
// Access/Set methods.
126
127
G4RotationMatrix
GetFrameRotation
()
const
;
128
void
SetFrameRotation
(
const
G4RotationMatrix
&);
129
130
G4ThreeVector
GetFrameTranslation
()
const
;
131
void
SetFrameTranslation
(
const
G4ThreeVector
&);
132
// Get/Set the rotation/translation, as applied to the frame of reference.
133
134
G4RotationMatrix
GetObjectRotation
()
const
;
135
void
SetObjectRotation
(
const
G4RotationMatrix
&);
136
137
G4ThreeVector
GetObjectTranslation
()
const
;
138
void
SetObjectTranslation
(
const
G4ThreeVector
&);
139
// Get/Set the rotation/translation, as applied to the object.
140
141
std::ostream&
StreamInfo
(std::ostream& os)
const
;
142
143
public
:
// without description
144
145
G4DisplacedSolid
(__void__&);
146
// Fake default constructor for usage restricted to direct object
147
// persistency for clients requiring preallocation of memory for
148
// persistifiable objects.
149
150
G4DisplacedSolid
(
const
G4DisplacedSolid
& rhs);
151
G4DisplacedSolid
&
operator=
(
const
G4DisplacedSolid
& rhs);
152
// Copy constructor and assignment operator.
153
154
void
DescribeYourselfTo
(
G4VGraphicsScene
& scene )
const
;
155
G4Polyhedron
*
CreatePolyhedron
()
const
;
156
G4NURBS
*
CreateNURBS
()
const
;
157
G4Polyhedron
*
GetPolyhedron
()
const
;
158
// For creating graphical representations (ie for visualisation).
159
160
protected
:
161
162
G4VSolid
*
fPtrSolid
;
163
G4AffineTransform
*
fPtrTransform
;
164
G4AffineTransform
*
fDirectTransform
;
165
mutable
G4Polyhedron
*
fpPolyhedron
;
166
} ;
167
168
#endif
Generated on Sat May 25 2013 14:33:12 for Geant4 by
1.8.4