Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
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
87 const G4ThreeVector& v ) const ;
88
89 G4double DistanceToIn( const G4ThreeVector& p) const ;
90
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
101 const G4int n,
102 const G4VPhysicalVolume* pRep ) ;
103
105
107
108 public: // with description
109
111 G4VSolid* Clone() const;
112
115 // If the Solid is a "G4DisplacedSolid",
116 // return a self pointer else return 0.
117
119
122
125 // Access/Set methods.
126
129
132 // Get/Set the rotation/translation, as applied to the frame of reference.
133
136
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
152 // Copy constructor and assignment operator.
153
154 void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
156 G4NURBS* CreateNURBS () const ;
157 G4Polyhedron* GetPolyhedron () const ;
158 // For creating graphical representations (ie for visualisation).
159
160 protected:
161
166} ;
167
168#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4GeometryType GetEntityType() const
G4Polyhedron * CreatePolyhedron() const
G4RotationMatrix GetObjectRotation() const
G4Polyhedron * fpPolyhedron
void SetTransform(G4AffineTransform &)
virtual ~G4DisplacedSolid()
G4VSolid * Clone() const
G4AffineTransform * fPtrTransform
G4AffineTransform * fDirectTransform
G4VSolid * GetConstituentMovedSolid() const
G4AffineTransform GetTransform() const
G4Polyhedron * GetPolyhedron() const
G4NURBS * CreateNURBS() const
const G4DisplacedSolid * GetDisplacedSolidPtr() const
void SetObjectRotation(const G4RotationMatrix &)
G4ThreeVector GetPointOnSurface() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4DisplacedSolid & operator=(const G4DisplacedSolid &rhs)
void DescribeYourselfTo(G4VGraphicsScene &scene) const
void SetDirectTransform(G4AffineTransform &)
G4ThreeVector GetObjectTranslation() const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
std::ostream & StreamInfo(std::ostream &os) const
void SetFrameRotation(const G4RotationMatrix &)
void SetFrameTranslation(const G4ThreeVector &)
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
G4AffineTransform GetDirectTransform() const
EInside Inside(const G4ThreeVector &p) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4RotationMatrix GetFrameRotation() const
void SetObjectTranslation(const G4ThreeVector &)
G4ThreeVector GetFrameTranslation() const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
EAxis
Definition: geomdefs.hh:54
EInside
Definition: geomdefs.hh:58