Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes
G4DisplacedSolid Class Reference

#include <G4DisplacedSolid.hh>

Inheritance diagram for G4DisplacedSolid:
G4VSolid

Public Member Functions

 G4DisplacedSolid (const G4String &pName, G4VSolid *pSolid, G4RotationMatrix *rotMatrix, const G4ThreeVector &transVector)
 
 G4DisplacedSolid (const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
 
 G4DisplacedSolid (const G4String &pName, G4VSolid *pSolid, const G4AffineTransform directTransform)
 
virtual ~G4DisplacedSolid ()
 
EInside Inside (const G4ThreeVector &p) const
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
 
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
G4double DistanceToIn (const G4ThreeVector &p) const
 
G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
G4double DistanceToOut (const G4ThreeVector &p) const
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
void CleanTransformations ()
 
G4ThreeVector GetPointOnSurface () const
 
G4GeometryType GetEntityType () const
 
G4VSolidClone () const
 
const G4DisplacedSolidGetDisplacedSolidPtr () const
 
G4DisplacedSolidGetDisplacedSolidPtr ()
 
G4VSolidGetConstituentMovedSolid () const
 
G4AffineTransform GetTransform () const
 
void SetTransform (G4AffineTransform &)
 
G4AffineTransform GetDirectTransform () const
 
void SetDirectTransform (G4AffineTransform &)
 
G4RotationMatrix GetFrameRotation () const
 
void SetFrameRotation (const G4RotationMatrix &)
 
G4ThreeVector GetFrameTranslation () const
 
void SetFrameTranslation (const G4ThreeVector &)
 
G4RotationMatrix GetObjectRotation () const
 
void SetObjectRotation (const G4RotationMatrix &)
 
G4ThreeVector GetObjectTranslation () const
 
void SetObjectTranslation (const G4ThreeVector &)
 
std::ostream & StreamInfo (std::ostream &os) const
 
 G4DisplacedSolid (__void__ &)
 
 G4DisplacedSolid (const G4DisplacedSolid &rhs)
 
G4DisplacedSolidoperator= (const G4DisplacedSolid &rhs)
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
G4PolyhedronGetPolyhedron () const
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
void DumpInfo () const
 
virtual G4VisExtent GetExtent () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Protected Attributes

G4VSolidfPtrSolid
 
G4AffineTransformfPtrTransform
 
G4AffineTransformfDirectTransform
 
G4PolyhedronfpPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Detailed Description

Definition at line 53 of file G4DisplacedSolid.hh.

Constructor & Destructor Documentation

G4DisplacedSolid::G4DisplacedSolid ( const G4String pName,
G4VSolid pSolid,
G4RotationMatrix rotMatrix,
const G4ThreeVector transVector 
)

Definition at line 54 of file G4DisplacedSolid.cc.

References fDirectTransform, fPtrSolid, fPtrTransform, and G4AffineTransform::Invert().

Referenced by Clone().

58  : G4VSolid(pName), fpPolyhedron(0)
59 {
60  fPtrSolid = pSolid ;
61  fPtrTransform = new G4AffineTransform(rotMatrix,transVector) ;
63  fDirectTransform = new G4AffineTransform(rotMatrix,transVector) ;
64 }
G4AffineTransform & Invert()
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:60
G4DisplacedSolid::G4DisplacedSolid ( const G4String pName,
G4VSolid pSolid,
const G4Transform3D transform 
)

Definition at line 70 of file G4DisplacedSolid.cc.

References fDirectTransform, fPtrSolid, fPtrTransform, HepGeom::Transform3D::getRotation(), HepGeom::Transform3D::getTranslation(), CLHEP::HepRotation::inverse(), and G4AffineTransform::Invert().

73  : G4VSolid(pName), fpPolyhedron(0)
74 {
75  fPtrSolid = pSolid ;
77  transform.getTranslation()) ;
78 
80  transform.getTranslation()) ;
81  fPtrTransform->Invert() ;
82 }
HepRotation inverse() const
G4AffineTransform & Invert()
CLHEP::HepRotation getRotation() const
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:60
CLHEP::Hep3Vector getTranslation() const
G4DisplacedSolid::G4DisplacedSolid ( const G4String pName,
G4VSolid pSolid,
const G4AffineTransform  directTransform 
)

Definition at line 89 of file G4DisplacedSolid.cc.

References fDirectTransform, fPtrSolid, fPtrTransform, and G4AffineTransform::Inverse().

92  : G4VSolid(pName), fpPolyhedron(0)
93 {
94  fPtrSolid = pSolid ;
95  fDirectTransform = new G4AffineTransform( directTransform );
96  fPtrTransform = new G4AffineTransform( directTransform.Inverse() ) ;
97 }
G4AffineTransform Inverse() const
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:60
G4DisplacedSolid::~G4DisplacedSolid ( )
virtual

Definition at line 114 of file G4DisplacedSolid.cc.

References CleanTransformations(), and fpPolyhedron.

115 {
117  delete fpPolyhedron;
118 }
G4Polyhedron * fpPolyhedron
G4DisplacedSolid::G4DisplacedSolid ( __void__ &  a)

Definition at line 104 of file G4DisplacedSolid.cc.

105  : G4VSolid(a), fPtrSolid(0), fPtrTransform(0),
107 {
108 }
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:60
G4DisplacedSolid::G4DisplacedSolid ( const G4DisplacedSolid rhs)

Definition at line 124 of file G4DisplacedSolid.cc.

References fDirectTransform, and fPtrTransform.

125  : G4VSolid (rhs), fPtrSolid(rhs.fPtrSolid), fpPolyhedron(0)
126 {
129 }
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
G4VSolid(const G4String &name)
Definition: G4VSolid.cc:60

Member Function Documentation

G4bool G4DisplacedSolid::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pMin,
G4double pMax 
) const
virtual

Implements G4VSolid.

Definition at line 267 of file G4DisplacedSolid.cc.

References G4VSolid::CalculateExtent(), fDirectTransform, fPtrSolid, and G4AffineTransform::Product().

272 {
273  G4AffineTransform sumTransform ;
274  sumTransform.Product(*fDirectTransform,pTransform) ;
275  return fPtrSolid->CalculateExtent(pAxis,pVoxelLimit,sumTransform,pMin,pMax) ;
276 }
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
G4AffineTransform * fDirectTransform
G4AffineTransform & Product(const G4AffineTransform &tf1, const G4AffineTransform &tf2)
void G4DisplacedSolid::CleanTransformations ( )

Definition at line 156 of file G4DisplacedSolid.cc.

References fDirectTransform, and fPtrTransform.

Referenced by ~G4DisplacedSolid().

157 {
158  if(fPtrTransform)
159  {
160  delete fPtrTransform; fPtrTransform=0;
162  }
163 }
G4AffineTransform * fPtrTransform
G4AffineTransform * fDirectTransform
G4VSolid * G4DisplacedSolid::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 399 of file G4DisplacedSolid.cc.

References G4DisplacedSolid().

400 {
401  return new G4DisplacedSolid(*this);
402 }
G4DisplacedSolid(const G4String &pName, G4VSolid *pSolid, G4RotationMatrix *rotMatrix, const G4ThreeVector &transVector)
void G4DisplacedSolid::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

Reimplemented from G4VSolid.

Definition at line 364 of file G4DisplacedSolid.cc.

References G4VSolid::DumpInfo(), FatalException, and G4Exception().

367 {
368  DumpInfo();
369  G4Exception("G4DisplacedSolid::ComputeDimensions()",
370  "GeomSolids0001", FatalException,
371  "Method not applicable in this context!");
372 }
void DumpInfo() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4Polyhedron * G4DisplacedSolid::CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 445 of file G4DisplacedSolid.cc.

References G4VSolid::CreatePolyhedron(), fPtrSolid, GetObjectRotation(), GetObjectTranslation(), and HepPolyhedron::Transform().

Referenced by GetPolyhedron().

446 {
447  G4Polyhedron* polyhedron = fPtrSolid->CreatePolyhedron();
448  polyhedron
450  return polyhedron;
451 }
G4RotationMatrix GetObjectRotation() const
HepPolyhedron & Transform(const G4Transform3D &t)
G4ThreeVector GetObjectTranslation() const
HepGeom::Transform3D G4Transform3D
virtual G4Polyhedron * CreatePolyhedron() const
Definition: G4VSolid.cc:639
void G4DisplacedSolid::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 435 of file G4DisplacedSolid.cc.

References G4VGraphicsScene::AddSolid().

436 {
437  scene.AddSolid (*this);
438 }
virtual void AddSolid(const G4Box &)=0
G4double G4DisplacedSolid::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Implements G4VSolid.

Definition at line 305 of file G4DisplacedSolid.cc.

References G4VSolid::DistanceToIn(), fPtrSolid, fPtrTransform, G4AffineTransform::TransformAxis(), and G4AffineTransform::TransformPoint().

307 {
309  G4ThreeVector newDirection = fPtrTransform->TransformAxis(v) ;
310  return fPtrSolid->DistanceToIn(newPoint,newDirection) ;
311 }
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
G4AffineTransform * fPtrTransform
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const
G4double G4DisplacedSolid::DistanceToIn ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 319 of file G4DisplacedSolid.cc.

References G4VSolid::DistanceToIn(), fPtrSolid, fPtrTransform, and G4AffineTransform::TransformPoint().

320 {
322  return fPtrSolid->DistanceToIn(newPoint) ;
323 }
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
G4AffineTransform * fPtrTransform
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4double G4DisplacedSolid::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = 0,
G4ThreeVector n = 0 
) const
virtual

Implements G4VSolid.

Definition at line 330 of file G4DisplacedSolid.cc.

References G4VSolid::DistanceToOut(), fDirectTransform, fPtrSolid, fPtrTransform, G4AffineTransform::TransformAxis(), and G4AffineTransform::TransformPoint().

335 {
336  G4ThreeVector solNorm ;
338  G4ThreeVector newDirection = fPtrTransform->TransformAxis(v) ;
339  G4double dist = fPtrSolid->DistanceToOut(newPoint,newDirection,
340  calcNorm,validNorm,&solNorm) ;
341  if(calcNorm)
342  {
343  *n = fDirectTransform->TransformAxis(solNorm) ;
344  }
345  return dist ;
346 }
G4AffineTransform * fPtrTransform
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const
G4AffineTransform * fDirectTransform
double G4double
Definition: G4Types.hh:76
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4double G4DisplacedSolid::DistanceToOut ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 353 of file G4DisplacedSolid.cc.

References G4VSolid::DistanceToOut(), fPtrSolid, fPtrTransform, and G4AffineTransform::TransformPoint().

354 {
356  return fPtrSolid->DistanceToOut(newPoint) ;
357 }
G4AffineTransform * fPtrTransform
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4VSolid * G4DisplacedSolid::GetConstituentMovedSolid ( ) const

Definition at line 175 of file G4DisplacedSolid.cc.

References fPtrSolid.

Referenced by G4tgbGeometryDumper::DumpBooleanVolume().

176 {
177  return fPtrSolid;
178 }
G4AffineTransform G4DisplacedSolid::GetDirectTransform ( ) const

Definition at line 196 of file G4DisplacedSolid.cc.

References fDirectTransform.

197 {
198  G4AffineTransform aTransform= *fDirectTransform;
199  return aTransform;
200 }
G4AffineTransform * fDirectTransform
const G4DisplacedSolid * G4DisplacedSolid::GetDisplacedSolidPtr ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 165 of file G4DisplacedSolid.cc.

166 {
167  return this;
168 }
G4DisplacedSolid * G4DisplacedSolid::GetDisplacedSolidPtr ( )
virtual

Reimplemented from G4VSolid.

Definition at line 170 of file G4DisplacedSolid.cc.

171 {
172  return this;
173 }
G4GeometryType G4DisplacedSolid::GetEntityType ( ) const
virtual

Implements G4VSolid.

Definition at line 390 of file G4DisplacedSolid.cc.

Referenced by StreamInfo().

391 {
392  return G4String("G4DisplacedSolid");
393 }
G4RotationMatrix G4DisplacedSolid::GetFrameRotation ( ) const

Definition at line 210 of file G4DisplacedSolid.cc.

References fDirectTransform, and G4AffineTransform::NetRotation().

211 {
213  return InvRotation;
214 }
G4RotationMatrix NetRotation() const
G4AffineTransform * fDirectTransform
G4ThreeVector G4DisplacedSolid::GetFrameTranslation ( ) const

Definition at line 224 of file G4DisplacedSolid.cc.

References fPtrTransform, and G4AffineTransform::NetTranslation().

225 {
226  return fPtrTransform->NetTranslation();
227 }
G4ThreeVector NetTranslation() const
G4AffineTransform * fPtrTransform
G4RotationMatrix G4DisplacedSolid::GetObjectRotation ( ) const

Definition at line 237 of file G4DisplacedSolid.cc.

References fPtrTransform, and G4AffineTransform::NetRotation().

Referenced by CreatePolyhedron().

238 {
240  return Rotation;
241 }
G4AffineTransform * fPtrTransform
G4RotationMatrix NetRotation() const
G4ThreeVector G4DisplacedSolid::GetObjectTranslation ( ) const

Definition at line 251 of file G4DisplacedSolid.cc.

References fDirectTransform, and G4AffineTransform::NetTranslation().

Referenced by CreatePolyhedron(), and G4tgbGeometryDumper::DumpBooleanVolume().

252 {
254 }
G4ThreeVector NetTranslation() const
G4AffineTransform * fDirectTransform
G4ThreeVector G4DisplacedSolid::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 380 of file G4DisplacedSolid.cc.

References fDirectTransform, fPtrSolid, G4VSolid::GetPointOnSurface(), and G4AffineTransform::TransformPoint().

381 {
383  return fDirectTransform->TransformPoint(p);
384 }
const char * p
Definition: xmltok.h:285
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
virtual G4ThreeVector GetPointOnSurface() const
Definition: G4VSolid.cc:152
G4AffineTransform * fDirectTransform
G4Polyhedron * G4DisplacedSolid::GetPolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 457 of file G4DisplacedSolid.cc.

References CreatePolyhedron(), fpPolyhedron, HepPolyhedron::GetNumberOfRotationSteps(), and G4Polyhedron::GetNumberOfRotationStepsAtTimeOfCreation().

458 {
459  if (!fpPolyhedron ||
462  {
463  delete fpPolyhedron;
465  }
466  return fpPolyhedron;
467 }
G4Polyhedron * CreatePolyhedron() const
static G4int GetNumberOfRotationSteps()
G4Polyhedron * fpPolyhedron
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4AffineTransform G4DisplacedSolid::GetTransform ( ) const

Definition at line 182 of file G4DisplacedSolid.cc.

References fPtrTransform.

183 {
184  G4AffineTransform aTransform = *fPtrTransform;
185  return aTransform;
186 }
G4AffineTransform * fPtrTransform
EInside G4DisplacedSolid::Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 282 of file G4DisplacedSolid.cc.

References fPtrSolid, fPtrTransform, G4VSolid::Inside(), and G4AffineTransform::TransformPoint().

283 {
285  return fPtrSolid->Inside(newPoint) ;
286 }
virtual EInside Inside(const G4ThreeVector &p) const =0
G4AffineTransform * fPtrTransform
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4DisplacedSolid & G4DisplacedSolid::operator= ( const G4DisplacedSolid rhs)

Definition at line 135 of file G4DisplacedSolid.cc.

References fDirectTransform, fpPolyhedron, fPtrSolid, fPtrTransform, and G4VSolid::operator=().

136 {
137  // Check assignment to self
138  //
139  if (this == &rhs) { return *this; }
140 
141  // Copy base class data
142  //
143  G4VSolid::operator=(rhs);
144 
145  // Copy data
146  //
147  fPtrSolid = rhs.fPtrSolid;
148  delete fPtrTransform; delete fDirectTransform;
151  delete fpPolyhedron; fpPolyhedron= 0;
152 
153  return *this;
154 }
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
G4VSolid & operator=(const G4VSolid &rhs)
Definition: G4VSolid.cc:110
void G4DisplacedSolid::SetDirectTransform ( G4AffineTransform transform)

Definition at line 202 of file G4DisplacedSolid.cc.

References fDirectTransform, and fpPolyhedron.

203 {
204  fDirectTransform = &transform ;
205  fpPolyhedron = 0;
206 }
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
void G4DisplacedSolid::SetFrameRotation ( const G4RotationMatrix matrix)

Definition at line 216 of file G4DisplacedSolid.cc.

References fDirectTransform, fpPolyhedron, and G4AffineTransform::SetNetRotation().

217 {
219  fpPolyhedron = 0;
220 }
void SetNetRotation(const G4RotationMatrix &rot)
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
void G4DisplacedSolid::SetFrameTranslation ( const G4ThreeVector vector)

Definition at line 229 of file G4DisplacedSolid.cc.

References fpPolyhedron, fPtrTransform, and G4AffineTransform::SetNetTranslation().

230 {
232  fpPolyhedron = 0;
233 }
void SetNetTranslation(const G4ThreeVector &tlate)
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
void G4DisplacedSolid::SetObjectRotation ( const G4RotationMatrix matrix)

Definition at line 243 of file G4DisplacedSolid.cc.

References fpPolyhedron, fPtrTransform, and G4AffineTransform::SetNetRotation().

244 {
245  fPtrTransform->SetNetRotation(matrix);
246  fpPolyhedron = 0;
247 }
void SetNetRotation(const G4RotationMatrix &rot)
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
void G4DisplacedSolid::SetObjectTranslation ( const G4ThreeVector vector)

Definition at line 256 of file G4DisplacedSolid.cc.

References fDirectTransform, fpPolyhedron, and G4AffineTransform::SetNetTranslation().

257 {
259  fpPolyhedron = 0;
260 }
void SetNetTranslation(const G4ThreeVector &tlate)
G4Polyhedron * fpPolyhedron
G4AffineTransform * fDirectTransform
void G4DisplacedSolid::SetTransform ( G4AffineTransform transform)

Definition at line 188 of file G4DisplacedSolid.cc.

References fpPolyhedron, and fPtrTransform.

189 {
190  fPtrTransform = &transform ;
191  fpPolyhedron = 0;
192 }
G4AffineTransform * fPtrTransform
G4Polyhedron * fpPolyhedron
std::ostream & G4DisplacedSolid::StreamInfo ( std::ostream &  os) const
virtual

Implements G4VSolid.

Definition at line 408 of file G4DisplacedSolid.cc.

References fDirectTransform, fPtrSolid, GetEntityType(), G4VSolid::GetName(), G4AffineTransform::NetRotation(), G4AffineTransform::NetTranslation(), CLHEP::HepRotation::print(), and G4VSolid::StreamInfo().

409 {
410  os << "-----------------------------------------------------------\n"
411  << " *** Dump for Displaced solid - " << GetName() << " ***\n"
412  << " ===================================================\n"
413  << " Solid type: " << GetEntityType() << "\n"
414  << " Parameters of constituent solid: \n"
415  << "===========================================================\n";
416  fPtrSolid->StreamInfo(os);
417  os << "===========================================================\n"
418  << " Transformations: \n"
419  << " Direct transformation - translation : \n"
420  << " " << fDirectTransform->NetTranslation() << "\n"
421  << " - rotation : \n"
422  << " ";
424  os << "\n"
425  << "===========================================================\n";
426 
427  return os;
428 }
G4String GetName() const
std::ostream & print(std::ostream &os) const
Definition: RotationIO.cc:21
G4ThreeVector NetTranslation() const
virtual std::ostream & StreamInfo(std::ostream &os) const =0
G4GeometryType GetEntityType() const
G4RotationMatrix NetRotation() const
G4AffineTransform * fDirectTransform
G4ThreeVector G4DisplacedSolid::SurfaceNormal ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 293 of file G4DisplacedSolid.cc.

References fDirectTransform, fPtrSolid, fPtrTransform, G4VSolid::SurfaceNormal(), G4AffineTransform::TransformAxis(), and G4AffineTransform::TransformPoint().

294 {
296  G4ThreeVector normal = fPtrSolid->SurfaceNormal(newPoint) ;
297  return fDirectTransform->TransformAxis(normal) ;
298 }
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
G4AffineTransform * fPtrTransform
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const
G4AffineTransform * fDirectTransform

Field Documentation

G4AffineTransform* G4DisplacedSolid::fDirectTransform
protected
G4Polyhedron* G4DisplacedSolid::fpPolyhedron
mutableprotected
G4VSolid* G4DisplacedSolid::fPtrSolid
protected
G4AffineTransform* G4DisplacedSolid::fPtrTransform
protected

The documentation for this class was generated from the following files: