Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ReflectedSolid Class Reference

#include <G4ReflectedSolid.hh>

+ Inheritance diagram for G4ReflectedSolid:

Public Member Functions

 G4ReflectedSolid (const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
 
virtual ~G4ReflectedSolid ()
 
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)
 
G4ThreeVector GetPointOnSurface () const
 
G4VSolidClone () const
 
virtual G4GeometryType GetEntityType () const
 
virtual const G4ReflectedSolidGetReflectedSolidPtr () const
 
virtual G4ReflectedSolidGetReflectedSolidPtr ()
 
G4VSolidGetConstituentMovedSolid () const
 
G4Transform3D GetTransform3D () const
 
void SetTransform3D (G4Transform3D &)
 
G4Transform3D GetDirectTransform3D () const
 
void SetDirectTransform3D (G4Transform3D &)
 
std::ostream & StreamInfo (std::ostream &os) const
 
 G4ReflectedSolid (const G4ReflectedSolid &rhs)
 
G4ReflectedSolidoperator= (const G4ReflectedSolid &rhs)
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4PolyhedronCreatePolyhedron () const
 
G4NURBSCreateNURBS () 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 G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
 
virtual EInside Inside (const G4ThreeVector &p) const =0
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const =0
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const =0
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
virtual G4GeometryType GetEntityType () const =0
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4VSolidClone () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const =0
 
void DumpInfo () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const =0
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4NURBSCreateNURBS () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Protected Member Functions

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 &)
 
- 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
 

Protected Attributes

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

Detailed Description

Definition at line 51 of file G4ReflectedSolid.hh.

Constructor & Destructor Documentation

◆ G4ReflectedSolid() [1/2]

G4ReflectedSolid::G4ReflectedSolid ( const G4String pName,
G4VSolid pSolid,
const G4Transform3D transform 
)

Definition at line 58 of file G4ReflectedSolid.cc.

61 : G4VSolid(pName), fpPolyhedron(0)
62{
63 fPtrSolid = pSolid ;
64 G4RotationMatrix rotMatrix ;
65
67 new G4AffineTransform(rotMatrix, transform.getTranslation()) ;
69 new G4AffineTransform(rotMatrix, transform.getTranslation()) ;
71
72 fDirectTransform3D = new G4Transform3D(transform) ;
73 fPtrTransform3D = new G4Transform3D(transform.inverse()) ;
74}
HepGeom::Transform3D G4Transform3D
G4AffineTransform & Invert()
G4AffineTransform * fDirectTransform
G4Transform3D * fPtrTransform3D
G4Polyhedron * fpPolyhedron
G4Transform3D * fDirectTransform3D
G4AffineTransform * fPtrTransform
CLHEP::Hep3Vector getTranslation() const
Transform3D inverse() const
Definition: Transform3D.cc:142

◆ ~G4ReflectedSolid()

G4ReflectedSolid::~G4ReflectedSolid ( )
virtual

Definition at line 79 of file G4ReflectedSolid.cc.

80{
82 {
85 }
87 {
90 }
91 delete fpPolyhedron;
92}

◆ G4ReflectedSolid() [2/2]

G4ReflectedSolid::G4ReflectedSolid ( const G4ReflectedSolid rhs)

Member Function Documentation

◆ CalculateExtent()

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

Implements G4VSolid.

Definition at line 268 of file G4ReflectedSolid.cc.

273{
274
275 G4VoxelLimits unLimit;
276 G4AffineTransform unTransform;
277
278 G4double x1 = -kInfinity, x2 = kInfinity,
279 y1 = -kInfinity, y2 = kInfinity,
280 z1 = -kInfinity, z2 = kInfinity;
281
282 G4bool existsAfterClip = false ;
283 existsAfterClip =
284 fPtrSolid->CalculateExtent(kXAxis,unLimit,unTransform,x1,x2);
285 existsAfterClip =
286 fPtrSolid->CalculateExtent(kYAxis,unLimit,unTransform,y1,y2);
287 existsAfterClip =
288 fPtrSolid->CalculateExtent(kZAxis,unLimit,unTransform,z1,z2);
289
290 existsAfterClip = false;
291 pMin = +kInfinity ;
292 pMax = -kInfinity ;
293
294 G4Transform3D pTransform3D = G4Transform3D(pTransform.NetRotation().inverse(),
295 pTransform.NetTranslation());
296
297 G4Transform3D transform3D = pTransform3D*(*fDirectTransform3D);
298
299 G4Point3D tmpPoint;
300
301 // Calculate rotated vertex coordinates
302
303 G4ThreeVectorList* vertices = new G4ThreeVectorList();
304
305 if (vertices)
306 {
307 vertices->reserve(8);
308
309 G4ThreeVector vertex0(x1,y1,z1) ;
310 tmpPoint = transform3D*G4Point3D(vertex0);
311 vertex0 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
312 vertices->push_back(vertex0);
313
314 G4ThreeVector vertex1(x2,y1,z1) ;
315 tmpPoint = transform3D*G4Point3D(vertex1);
316 vertex1 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
317 vertices->push_back(vertex1);
318
319 G4ThreeVector vertex2(x2,y2,z1) ;
320 tmpPoint = transform3D*G4Point3D(vertex2);
321 vertex2 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
322 vertices->push_back(vertex2);
323
324 G4ThreeVector vertex3(x1,y2,z1) ;
325 tmpPoint = transform3D*G4Point3D(vertex3);
326 vertex3 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
327 vertices->push_back(vertex3);
328
329 G4ThreeVector vertex4(x1,y1,z2) ;
330 tmpPoint = transform3D*G4Point3D(vertex4);
331 vertex4 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
332 vertices->push_back(vertex4);
333
334 G4ThreeVector vertex5(x2,y1,z2) ;
335 tmpPoint = transform3D*G4Point3D(vertex5);
336 vertex5 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
337 vertices->push_back(vertex5);
338
339 G4ThreeVector vertex6(x2,y2,z2) ;
340 tmpPoint = transform3D*G4Point3D(vertex6);
341 vertex6 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
342 vertices->push_back(vertex6);
343
344 G4ThreeVector vertex7(x1,y2,z2) ;
345 tmpPoint = transform3D*G4Point3D(vertex7);
346 vertex7 = G4ThreeVector(tmpPoint.x(),tmpPoint.y(),tmpPoint.z());
347 vertices->push_back(vertex7);
348 }
349 else
350 {
351 DumpInfo();
352 G4Exception("G4ReflectedSolid::CalculateExtent()",
353 "GeomMgt0003", FatalException,
354 "Error in allocation of vertices. Out of memory !");
355 }
356
357 ClipCrossSection(vertices,0,pVoxelLimit,pAxis,pMin,pMax) ;
358 ClipCrossSection(vertices,4,pVoxelLimit,pAxis,pMin,pMax) ;
359 ClipBetweenSections(vertices,0,pVoxelLimit,pAxis,pMin,pMax) ;
360
361 if (pVoxelLimit.IsLimited(pAxis) == false)
362 {
363 if ( pMin != kInfinity || pMax != -kInfinity )
364 {
365 existsAfterClip = true ;
366
367 // Add 2*tolerance to avoid precision troubles
368
369 pMin -= kCarTolerance;
370 pMax += kCarTolerance;
371 }
372 }
373 else
374 {
375 G4ThreeVector clipCentre(
376 ( pVoxelLimit.GetMinXExtent()+pVoxelLimit.GetMaxXExtent())*0.5,
377 ( pVoxelLimit.GetMinYExtent()+pVoxelLimit.GetMaxYExtent())*0.5,
378 ( pVoxelLimit.GetMinZExtent()+pVoxelLimit.GetMaxZExtent())*0.5);
379
380 if ( pMin != kInfinity || pMax != -kInfinity )
381 {
382 existsAfterClip = true ;
383
384
385 // Check to see if endpoints are in the solid
386
387 clipCentre(pAxis) = pVoxelLimit.GetMinExtent(pAxis);
388
389 if (Inside(transform3D.inverse()*G4Point3D(clipCentre)) != kOutside)
390 {
391 pMin = pVoxelLimit.GetMinExtent(pAxis);
392 }
393 else
394 {
395 pMin -= kCarTolerance;
396 }
397 clipCentre(pAxis) = pVoxelLimit.GetMaxExtent(pAxis);
398
399 if (Inside(transform3D.inverse()*G4Point3D(clipCentre)) != kOutside)
400 {
401 pMax = pVoxelLimit.GetMaxExtent(pAxis);
402 }
403 else
404 {
405 pMax += kCarTolerance;
406 }
407 }
408 // Check for case where completely enveloping clipping volume
409 // If point inside then we are confident that the solid completely
410 // envelopes the clipping volume. Hence set min/max extents according
411 // to clipping volume extents along the specified axis.
412
413 else if (Inside(transform3D.inverse()*G4Point3D(clipCentre)) != kOutside)
414 {
415 existsAfterClip = true ;
416 pMin = pVoxelLimit.GetMinExtent(pAxis) ;
417 pMax = pVoxelLimit.GetMaxExtent(pAxis) ;
418 }
419 }
420 delete vertices;
421 return existsAfterClip;
422}
@ FatalException
HepGeom::Point3D< G4double > G4Point3D
Definition: G4Point3D.hh:35
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:64
bool G4bool
Definition: G4Types.hh:67
std::vector< G4ThreeVector > G4ThreeVectorList
Definition: G4VSolid.hh:85
HepRotation inverse() const
G4ThreeVector NetTranslation() const
G4RotationMatrix NetRotation() const
EInside Inside(const G4ThreeVector &p) const
void ClipBetweenSections(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
Definition: G4VSolid.cc:376
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
void DumpInfo() const
G4double kCarTolerance
Definition: G4VSolid.hh:307
void ClipCrossSection(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
Definition: G4VSolid.cc:345
G4double GetMinExtent(const EAxis pAxis) const
G4double GetMinZExtent() const
G4double GetMaxExtent(const EAxis pAxis) const
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMinYExtent() const
G4double GetMinXExtent() const
G4bool IsLimited() const
G4double GetMaxXExtent() const
@ kYAxis
Definition: geomdefs.hh:54
@ kXAxis
Definition: geomdefs.hh:54
@ kZAxis
Definition: geomdefs.hh:54
@ kOutside
Definition: geomdefs.hh:58
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ Clone()

G4VSolid * G4ReflectedSolid::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 561 of file G4ReflectedSolid.cc.

562{
563 return new G4ReflectedSolid(*this);
564}

◆ ComputeDimensions()

void G4ReflectedSolid::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

Reimplemented from G4VSolid.

Definition at line 534 of file G4ReflectedSolid.cc.

537{
538 DumpInfo();
539 G4Exception("G4ReflectedSolid::ComputeDimensions()",
540 "GeomMgt0001", FatalException,
541 "Method not applicable in this context!");
542}

◆ CreateNURBS()

G4NURBS * G4ReflectedSolid::CreateNURBS ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 633 of file G4ReflectedSolid.cc.

634{
635 // Take into account local transformation - see CreatePolyhedron.
636 // return fPtrSolid->CreateNURBS() ;
637 return 0;
638}

◆ CreatePolyhedron()

G4Polyhedron * G4ReflectedSolid::CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 608 of file G4ReflectedSolid.cc.

609{
610 G4Polyhedron* polyhedron = fPtrSolid->CreatePolyhedron();
611 if (polyhedron)
612 {
613 polyhedron->Transform(*fDirectTransform3D);
614 return polyhedron;
615 }
616 else
617 {
618 std::ostringstream message;
619 message << "Solid - " << GetName()
620 << " - original solid has no" << G4endl
621 << "corresponding polyhedron. Returning NULL!";
622 G4Exception("G4ReflectedSolid::CreatePolyhedron()",
623 "GeomMgt1001", JustWarning, message);
624 return 0;
625 }
626}
@ JustWarning
#define G4endl
Definition: G4ios.hh:52
G4String GetName() const
virtual G4Polyhedron * CreatePolyhedron() const
Definition: G4VSolid.cc:637
HepPolyhedron & Transform(const G4Transform3D &t)

Referenced by GetPolyhedron().

◆ DescribeYourselfTo()

void G4ReflectedSolid::DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

Definition at line 598 of file G4ReflectedSolid.cc.

599{
600 scene.AddSolid (*this);
601}
virtual void AddSolid(const G4Box &)=0

◆ DistanceToIn() [1/2]

G4double G4ReflectedSolid::DistanceToIn ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 479 of file G4ReflectedSolid.cc.

480{
481 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p) ;
482 return fPtrSolid->DistanceToIn(
483 G4ThreeVector(newPoint.x(),newPoint.y(),newPoint.z())) ;
484}
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0

◆ DistanceToIn() [2/2]

G4double G4ReflectedSolid::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Implements G4VSolid.

Definition at line 462 of file G4ReflectedSolid.cc.

464{
465 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p) ;
466 G4Point3D newDirection = (*fDirectTransform3D)*G4Point3D(v) ;
467 newDirection.unit() ;
468 return fPtrSolid->DistanceToIn(
469 G4ThreeVector(newPoint.x(),newPoint.y(),newPoint.z()),
470 G4ThreeVector(newDirection.x(),newDirection.y(),newDirection.z())) ;
471}
BasicVector3D< T > unit() const

◆ DistanceToOut() [1/2]

G4double G4ReflectedSolid::DistanceToOut ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 522 of file G4ReflectedSolid.cc.

523{
524 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p);
525 return fPtrSolid->DistanceToOut(
526 G4ThreeVector(newPoint.x(),newPoint.y(),newPoint.z()));
527}
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0

◆ DistanceToOut() [2/2]

G4double G4ReflectedSolid::DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = 0,
G4ThreeVector n = 0 
) const
virtual

Implements G4VSolid.

Definition at line 491 of file G4ReflectedSolid.cc.

496{
497 G4ThreeVector solNorm ;
498
499 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p) ;
500 G4Point3D newDirection = (*fDirectTransform3D)*G4Point3D(v);
501 newDirection.unit() ;
502
503 G4double dist =
505 G4ThreeVector(newPoint.x(),newPoint.y(),newPoint.z()),
506 G4ThreeVector(newDirection.x(),newDirection.y(),newDirection.z()),
507 calcNorm, validNorm, &solNorm) ;
508 if(calcNorm)
509 {
510 G4Point3D newN = (*fDirectTransform3D)*G4Point3D(solNorm);
511 newN.unit() ;
512 *n = G4ThreeVector(newN.x(),newN.y(),newN.z());
513 }
514 return dist ;
515}

◆ GetConstituentMovedSolid()

G4VSolid * G4ReflectedSolid::GetConstituentMovedSolid ( ) const

Definition at line 152 of file G4ReflectedSolid.cc.

153{
154 return fPtrSolid;
155}

Referenced by G4tgbGeometryDumper::DumpSolid().

◆ GetDirectTransform()

G4AffineTransform G4ReflectedSolid::GetDirectTransform ( ) const
protected

Definition at line 173 of file G4ReflectedSolid.cc.

174{
176 return aTransform;
177}

◆ GetDirectTransform3D()

G4Transform3D G4ReflectedSolid::GetDirectTransform3D ( ) const

Definition at line 201 of file G4ReflectedSolid.cc.

202{
204 return aTransform;
205}

◆ GetEntityType()

G4GeometryType G4ReflectedSolid::GetEntityType ( ) const
virtual

Implements G4VSolid.

Definition at line 137 of file G4ReflectedSolid.cc.

138{
139 return G4String("G4ReflectedSolid");
140}

Referenced by StreamInfo().

◆ GetFrameRotation()

G4RotationMatrix G4ReflectedSolid::GetFrameRotation ( ) const
protected

Definition at line 215 of file G4ReflectedSolid.cc.

216{
218 return InvRotation;
219}

◆ GetFrameTranslation()

G4ThreeVector G4ReflectedSolid::GetFrameTranslation ( ) const
protected

Definition at line 228 of file G4ReflectedSolid.cc.

229{
231}

◆ GetObjectRotation()

G4RotationMatrix G4ReflectedSolid::GetObjectRotation ( ) const
protected

Definition at line 240 of file G4ReflectedSolid.cc.

241{
243 return Rotation;
244}

◆ GetObjectTranslation()

G4ThreeVector G4ReflectedSolid::GetObjectTranslation ( ) const
protected

Definition at line 253 of file G4ReflectedSolid.cc.

254{
256}

◆ GetPointOnSurface()

G4ThreeVector G4ReflectedSolid::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 549 of file G4ReflectedSolid.cc.

550{
552 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p);
553
554 return G4ThreeVector(newPoint.x(),newPoint.y(),newPoint.z());
555}
virtual G4ThreeVector GetPointOnSurface() const
Definition: G4VSolid.cc:152

◆ GetPolyhedron()

G4Polyhedron * G4ReflectedSolid::GetPolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 645 of file G4ReflectedSolid.cc.

646{
647 if (!fpPolyhedron ||
650 {
651 delete fpPolyhedron;
653 }
654 return fpPolyhedron;
655}
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4Polyhedron * CreatePolyhedron() const
static G4int GetNumberOfRotationSteps()

◆ GetReflectedSolidPtr() [1/2]

G4ReflectedSolid * G4ReflectedSolid::GetReflectedSolidPtr ( )
virtual

Definition at line 147 of file G4ReflectedSolid.cc.

148{
149 return this;
150}

◆ GetReflectedSolidPtr() [2/2]

const G4ReflectedSolid * G4ReflectedSolid::GetReflectedSolidPtr ( ) const
virtual

Definition at line 142 of file G4ReflectedSolid.cc.

143{
144 return this;
145}

◆ GetTransform()

G4AffineTransform G4ReflectedSolid::GetTransform ( ) const
protected

Definition at line 159 of file G4ReflectedSolid.cc.

160{
161 G4AffineTransform aTransform = *fPtrTransform;
162 return aTransform;
163}

◆ GetTransform3D()

G4Transform3D G4ReflectedSolid::GetTransform3D ( ) const

Definition at line 187 of file G4ReflectedSolid.cc.

188{
189 G4Transform3D aTransform = *fPtrTransform3D;
190 return aTransform;
191}

◆ Inside()

EInside G4ReflectedSolid::Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 428 of file G4ReflectedSolid.cc.

429{
430
431 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p) ;
432 // G4Point3D newPoint = (*fPtrTransform3D)*G4Point3D(p) ;
433
434 return fPtrSolid->Inside(G4ThreeVector(newPoint.x(),
435 newPoint.y(),
436 newPoint.z())) ;
437}
virtual EInside Inside(const G4ThreeVector &p) const =0

Referenced by CalculateExtent().

◆ operator=()

G4ReflectedSolid & G4ReflectedSolid::operator= ( const G4ReflectedSolid rhs)

Definition at line 109 of file G4ReflectedSolid.cc.

110{
111 // Check assignment to self
112 //
113 if (this == &rhs) { return *this; }
114
115 // Copy base class data
116 //
118
119 // Copy data
120 //
122 delete fPtrTransform;
124 delete fDirectTransform;
126 delete fPtrTransform3D;
128 delete fDirectTransform3D;
130
131 return *this;
132}
G4VSolid & operator=(const G4VSolid &rhs)
Definition: G4VSolid.cc:110

◆ SetDirectTransform()

void G4ReflectedSolid::SetDirectTransform ( G4AffineTransform transform)
protected

Definition at line 179 of file G4ReflectedSolid.cc.

180{
181 fDirectTransform = &transform ;
182 fpPolyhedron = 0;
183}

◆ SetDirectTransform3D()

void G4ReflectedSolid::SetDirectTransform3D ( G4Transform3D transform)

Definition at line 207 of file G4ReflectedSolid.cc.

208{
209 fDirectTransform3D = &transform ;
210 fpPolyhedron = 0;
211}

◆ SetFrameRotation()

void G4ReflectedSolid::SetFrameRotation ( const G4RotationMatrix matrix)
protected

Definition at line 221 of file G4ReflectedSolid.cc.

222{
224}
void SetNetRotation(const G4RotationMatrix &rot)

◆ SetFrameTranslation()

void G4ReflectedSolid::SetFrameTranslation ( const G4ThreeVector vector)
protected

Definition at line 233 of file G4ReflectedSolid.cc.

234{
236}
void SetNetTranslation(const G4ThreeVector &tlate)

◆ SetObjectRotation()

void G4ReflectedSolid::SetObjectRotation ( const G4RotationMatrix matrix)
protected

Definition at line 246 of file G4ReflectedSolid.cc.

247{
249}

◆ SetObjectTranslation()

void G4ReflectedSolid::SetObjectTranslation ( const G4ThreeVector vector)
protected

Definition at line 258 of file G4ReflectedSolid.cc.

259{
261}

◆ SetTransform()

void G4ReflectedSolid::SetTransform ( G4AffineTransform transform)
protected

Definition at line 165 of file G4ReflectedSolid.cc.

166{
167 fPtrTransform = &transform ;
168 fpPolyhedron = 0;
169}

◆ SetTransform3D()

void G4ReflectedSolid::SetTransform3D ( G4Transform3D transform)

Definition at line 193 of file G4ReflectedSolid.cc.

194{
195 fPtrTransform3D = &transform ;
196 fpPolyhedron = 0;
197}

◆ StreamInfo()

std::ostream & G4ReflectedSolid::StreamInfo ( std::ostream &  os) const
virtual

Implements G4VSolid.

Definition at line 571 of file G4ReflectedSolid.cc.

572{
573 os << "-----------------------------------------------------------\n"
574 << " *** Dump for Reflected solid - " << GetName() << " ***\n"
575 << " ===================================================\n"
576 << " Solid type: " << GetEntityType() << "\n"
577 << " Parameters of constituent solid: \n"
578 << "===========================================================\n";
580 os << "===========================================================\n"
581 << " Transformations: \n"
582 << " Direct transformation - translation : \n"
583 << " " << fDirectTransform->NetTranslation() << "\n"
584 << " - rotation : \n"
585 << " ";
587 os << "\n"
588 << "===========================================================\n";
589
590 return os;
591}
std::ostream & print(std::ostream &os) const
Definition: RotationIO.cc:21
virtual G4GeometryType GetEntityType() const
virtual std::ostream & StreamInfo(std::ostream &os) const =0

◆ SurfaceNormal()

G4ThreeVector G4ReflectedSolid::SurfaceNormal ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

Definition at line 444 of file G4ReflectedSolid.cc.

445{
446 G4Point3D newPoint = (*fDirectTransform3D)*G4Point3D(p) ;
447 G4ThreeVector normal =
449 newPoint.y(),
450 newPoint.z() ) ) ;
451 G4Point3D newN = (*fDirectTransform3D)*G4Point3D(normal) ;
452 newN.unit() ;
453
454 return G4ThreeVector(newN.x(),newN.y(),newN.z()) ;
455}
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0

Member Data Documentation

◆ fDirectTransform

◆ fDirectTransform3D

G4Transform3D* G4ReflectedSolid::fDirectTransform3D
protected

◆ fpPolyhedron

G4Polyhedron* G4ReflectedSolid::fpPolyhedron
mutableprotected

◆ fPtrSolid

◆ fPtrTransform

◆ fPtrTransform3D

G4Transform3D* G4ReflectedSolid::fPtrTransform3D
protected

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