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

G4ReflectedSolid is a solid that has been shifted from its original frame of reference to a new reflected one. More...

#include <G4ReflectedSolid.hh>

Inheritance diagram for G4ReflectedSolid:

Public Member Functions

 G4ReflectedSolid (const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
 ~G4ReflectedSolid () override
void BoundingLimits (G4ThreeVector &pMin, G4ThreeVector &pMax) const override
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const override
EInside Inside (const G4ThreeVector &p) const override
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const override
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const override
G4double DistanceToIn (const G4ThreeVector &p) const override
G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const override
G4double DistanceToOut (const G4ThreeVector &p) const override
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep) override
G4double GetCubicVolume () override
G4double GetSurfaceArea () override
G4ThreeVector GetPointOnSurface () const override
G4int GetNumOfConstituents () const override
G4bool IsFaceted () const override
G4VSolidClone () const override
G4GeometryType GetEntityType () const override
virtual const G4ReflectedSolidGetReflectedSolidPtr () const
virtual G4ReflectedSolidGetReflectedSolidPtr ()
G4VSolidGetConstituentMovedSolid () const
G4Transform3D GetTransform3D () const
G4Transform3D GetDirectTransform3D () const
void SetDirectTransform3D (G4Transform3D &)
std::ostream & StreamInfo (std::ostream &os) const override
 G4ReflectedSolid (const G4ReflectedSolid &rhs)
G4ReflectedSolidoperator= (const G4ReflectedSolid &rhs)
void DescribeYourselfTo (G4VGraphicsScene &scene) const override
G4PolyhedronCreatePolyhedron () const override
G4PolyhedronGetPolyhedron () const override
Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
virtual ~G4VSolid ()
 G4VSolid (const G4VSolid &rhs)
G4VSolidoperator= (const G4VSolid &rhs)
G4bool operator== (const G4VSolid &s) const
G4String GetName () const
void SetName (const G4String &name)
G4double GetTolerance () const
void DumpInfo () const
virtual G4VisExtent GetExtent () const
virtual const G4VSolidGetConstituentSolid (G4int no) const
virtual G4VSolidGetConstituentSolid (G4int no)
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 G4VSolid (__void__ &)
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
G4double EstimateSurfaceArea (G4int nStat, G4double epsilon) const

Protected Attributes

G4VSolidfPtrSolid = nullptr
G4Transform3DfDirectTransform3D = nullptr
G4bool fRebuildPolyhedron = false
G4PolyhedronfpPolyhedron = nullptr
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

Detailed Description

G4ReflectedSolid is a solid that has been shifted from its original frame of reference to a new reflected one.

Definition at line 47 of file G4ReflectedSolid.hh.

Constructor & Destructor Documentation

◆ G4ReflectedSolid() [1/2]

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

Constructor for G4ReflectedSolid. For use in instantiating a transient instance.

Parameters
[in]pNameThe solid's name.
[in]pSolidThe original primitive being reflected.
[in]transformThe associated transformation.

Definition at line 51 of file G4ReflectedSolid.cc.

54 : G4VSolid(pName)
55{
56 fPtrSolid = pSolid;
57 fDirectTransform3D = new G4Transform3D(transform);
58}
HepGeom::Transform3D G4Transform3D
G4Transform3D * fDirectTransform3D
G4VSolid(const G4String &name)
Definition G4VSolid.cc:59

Referenced by Clone(), G4ReflectedSolid(), GetReflectedSolidPtr(), GetReflectedSolidPtr(), and operator=().

◆ ~G4ReflectedSolid()

G4ReflectedSolid::~G4ReflectedSolid ( )
override

Destructor.

Definition at line 63 of file G4ReflectedSolid.cc.

64{
65 delete fDirectTransform3D; fDirectTransform3D = nullptr;
66 delete fpPolyhedron; fpPolyhedron = nullptr;
67}
G4Polyhedron * fpPolyhedron

◆ G4ReflectedSolid() [2/2]

G4ReflectedSolid::G4ReflectedSolid ( const G4ReflectedSolid & rhs)

Copy constructor and assignment operator.

Definition at line 72 of file G4ReflectedSolid.cc.

Member Function Documentation

◆ BoundingLimits()

void G4ReflectedSolid::BoundingLimits ( G4ThreeVector & pMin,
G4ThreeVector & pMax ) const
overridevirtual

Computes the bounding limits of the solid.

Parameters
[out]pMinThe minimum bounding limit point.
[out]pMaxThe maximum bounding limit point.

Reimplemented from G4VSolid.

Definition at line 149 of file G4ReflectedSolid.cc.

151{
152 fPtrSolid->BoundingLimits(pMin,pMax);
153 G4double xmin = pMin.x(), ymin = pMin.y(), zmin = pMin.z();
154 G4double xmax = pMax.x(), ymax = pMax.y(), zmax = pMax.z();
155 G4double xx = fDirectTransform3D->xx();
156 G4double yy = fDirectTransform3D->yy();
157 G4double zz = fDirectTransform3D->zz();
158
159 if (std::abs(xx) == 1 && std::abs(yy) == 1 && std::abs(zz) == 1)
160 {
161 // Special case of reflection in axis and pure translation
162 //
163 if (xx == -1) { G4double tmp = -xmin; xmin = -xmax; xmax = tmp; }
164 if (yy == -1) { G4double tmp = -ymin; ymin = -ymax; ymax = tmp; }
165 if (zz == -1) { G4double tmp = -zmin; zmin = -zmax; zmax = tmp; }
166 xmin += fDirectTransform3D->dx();
167 xmax += fDirectTransform3D->dx();
168 ymin += fDirectTransform3D->dy();
169 ymax += fDirectTransform3D->dy();
170 zmin += fDirectTransform3D->dz();
171 zmax += fDirectTransform3D->dz();
172 }
173 else
174 {
175 // Use additional reflection in Z to set up affine transformation
176 //
177 G4Transform3D transform3D = G4ReflectZ3D()*(*fDirectTransform3D);
178 G4AffineTransform transform(transform3D.getRotation().inverse(),
179 transform3D.getTranslation());
180
181 // Find bounding box
182 //
183 G4VoxelLimits unLimit;
184 fPtrSolid->CalculateExtent(kXAxis,unLimit,transform,xmin,xmax);
185 fPtrSolid->CalculateExtent(kYAxis,unLimit,transform,ymin,ymax);
186 fPtrSolid->CalculateExtent(kZAxis,unLimit,transform,zmin,zmax);
187 }
188
189 pMin.set(xmin,ymin,-zmax);
190 pMax.set(xmax,ymax,-zmin);
191
192 // Check correctness of the bounding box
193 //
194 if (pMin.x() >= pMax.x() || pMin.y() >= pMax.y() || pMin.z() >= pMax.z())
195 {
196 std::ostringstream message;
197 message << "Bad bounding box (min >= max) for solid: "
198 << GetName() << " !"
199 << "\npMin = " << pMin
200 << "\npMax = " << pMax;
201 G4Exception("G4ReflectedSolid::BoundingLimits()", "GeomMgt0001",
202 JustWarning, message);
203 DumpInfo();
204 }
205}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
HepGeom::ReflectZ3D G4ReflectZ3D
double G4double
Definition G4Types.hh:83
double z() const
double x() const
double y() const
void set(double x, double y, double z)
HepRotation inverse() const
G4String GetName() const
void DumpInfo() const
CLHEP::HepRotation getRotation() const
CLHEP::Hep3Vector getTranslation() const
@ kYAxis
Definition geomdefs.hh:56
@ kXAxis
Definition geomdefs.hh:55
@ kZAxis
Definition geomdefs.hh:57

◆ CalculateExtent()

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

Calculates the minimum and maximum extent of the solid, when under the specified transform, and within the specified limits.

Parameters
[in]pAxisThe axis along which compute the extent.
[in]pVoxelLimitThe limiting space dictated by voxels.
[in]pTransformThe internal transformation applied to the solid.
[out]pMinThe minimum extent value.
[out]pMaxThe maximum extent value.
Returns
True if the solid is intersected by the extent region.

Implements G4VSolid.

Definition at line 212 of file G4ReflectedSolid.cc.

217{
218 // Separation of transformations. Calculation of the extent is done
219 // in a reflection of the global space. In such way, the voxel is
220 // reflected, but the solid is transformed just by G4AffineTransform.
221 // It allows one to use CalculateExtent() of the solid.
222
223 // Reflect voxel limits in Z
224 //
225 G4VoxelLimits limits;
226 limits.AddLimit(kXAxis, pVoxelLimits.GetMinXExtent(),
227 pVoxelLimits.GetMaxXExtent());
228 limits.AddLimit(kYAxis, pVoxelLimits.GetMinYExtent(),
229 pVoxelLimits.GetMaxYExtent());
230 limits.AddLimit(kZAxis,-pVoxelLimits.GetMaxZExtent(),
231 -pVoxelLimits.GetMinZExtent());
232
233 // Set affine transformation
234 //
235 G4Transform3D transform3D = G4ReflectZ3D()*pTransform*(*fDirectTransform3D);
236 G4AffineTransform transform(transform3D.getRotation().inverse(),
237 transform3D.getTranslation());
238
239 // Find extent
240 //
241 if (!fPtrSolid->CalculateExtent(pAxis, limits, transform, pMin, pMax))
242 {
243 return false;
244 }
245 if (pAxis == kZAxis)
246 {
247 G4double tmp= -pMin; pMin= -pMax; pMax= tmp;
248 }
249
250 return true;
251}
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)

◆ Clone()

G4VSolid * G4ReflectedSolid::Clone ( ) const
overridevirtual

Makes a clone of the object for use in multi-treading.

Returns
A pointer to the new cloned allocated solid.

Reimplemented from G4VSolid.

Definition at line 403 of file G4ReflectedSolid.cc.

404{
405 return new G4ReflectedSolid(*this);
406}
G4ReflectedSolid(const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)

◆ ComputeDimensions()

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

Dispatch method for parameterisation replication mechanism and dimension computation.

Reimplemented from G4VSolid.

Definition at line 341 of file G4ReflectedSolid.cc.

344{
345 DumpInfo();
346 G4Exception("G4ReflectedSolid::ComputeDimensions()",
347 "GeomMgt0001", FatalException,
348 "Method not applicable in this context!");
349}
@ FatalException

◆ CreatePolyhedron()

G4Polyhedron * G4ReflectedSolid::CreatePolyhedron ( ) const
overridevirtual

Creates a Polyhedron used for Visualisation. It is the caller's responsibility to delete it. A null pointer means "not created".

Reimplemented from G4VSolid.

Definition at line 449 of file G4ReflectedSolid.cc.

450{
451 G4Polyhedron* polyhedron = fPtrSolid->CreatePolyhedron();
452 if (polyhedron != nullptr)
453 {
454 polyhedron->Transform(*fDirectTransform3D);
455 return polyhedron;
456 }
457 std::ostringstream message;
458 message << "Solid - " << GetName()
459 << " - original solid has no" << G4endl
460 << "corresponding polyhedron. Returning NULL!";
461 G4Exception("G4ReflectedSolid::CreatePolyhedron()",
462 "GeomMgt1001", JustWarning, message);
463 return nullptr;
464}
#define G4endl
Definition G4ios.hh:67
HepPolyhedron & Transform(const G4Transform3D &t)

Referenced by GetPolyhedron().

◆ DescribeYourselfTo()

void G4ReflectedSolid::DescribeYourselfTo ( G4VGraphicsScene & scene) const
overridevirtual

Methods for creating graphical representations (i.e. for visualisation).

Implements G4VSolid.

Definition at line 439 of file G4ReflectedSolid.cc.

440{
441 scene.AddSolid (*this);
442}
virtual void AddSolid(const G4Box &)=0

◆ DistanceToIn() [1/2]

G4double G4ReflectedSolid::DistanceToIn ( const G4ThreeVector & p) const
overridevirtual

Calculates the distance to the nearest surface of a shape from an outside point. The distance can be an underestimate.

Parameters
[in]pThe point at offset p.
Returns
The safety distance to enter the shape.

Implements G4VSolid.

Definition at line 294 of file G4ReflectedSolid.cc.

295{
296 G4ThreeVector newPoint = (*fDirectTransform3D)*G4Point3D(p);
297 return fPtrSolid->DistanceToIn(newPoint);
298}
HepGeom::Point3D< G4double > G4Point3D
Definition G4Point3D.hh:34
CLHEP::Hep3Vector G4ThreeVector

◆ DistanceToIn() [2/2]

G4double G4ReflectedSolid::DistanceToIn ( const G4ThreeVector & p,
const G4ThreeVector & v ) const
overridevirtual

Returns the distance along the normalised vector 'v' to the shape, from the point at offset 'p'. If there is no intersection, returns kInfinity. The first intersection resulting from 'leaving' a surface/volume is discarded. Hence, it is tolerant of points on the surface of the shape.

Parameters
[in]pThe point at offset p.
[in]vThe normalised direction vector.
Returns
The distance to enter the shape.

Implements G4VSolid.

Definition at line 280 of file G4ReflectedSolid.cc.

282{
283 G4ThreeVector newPoint = (*fDirectTransform3D)*G4Point3D(p);
284 G4ThreeVector newDirection = (*fDirectTransform3D)*G4Vector3D(v);
285 return fPtrSolid->DistanceToIn(newPoint,newDirection);
286}
HepGeom::Vector3D< G4double > G4Vector3D
Definition G4Vector3D.hh:34

◆ DistanceToOut() [1/2]

G4double G4ReflectedSolid::DistanceToOut ( const G4ThreeVector & p) const
overridevirtual

Calculates the distance to the nearest surface of a shape from an inside point 'p'. The distance can be an underestimate.

Parameters
[in]pThe point at offset p.
Returns
The safety distance to exit the shape.

Implements G4VSolid.

Definition at line 330 of file G4ReflectedSolid.cc.

331{
332 G4ThreeVector newPoint = (*fDirectTransform3D)*G4Point3D(p);
333 return fPtrSolid->DistanceToOut(newPoint);
334}

◆ DistanceToOut() [2/2]

G4double G4ReflectedSolid::DistanceToOut ( const G4ThreeVector & p,
const G4ThreeVector & v,
const G4bool calcNorm = false,
G4bool * validNorm = nullptr,
G4ThreeVector * n = nullptr ) const
overridevirtual

Returns the distance along the normalised vector 'v' to the shape, from a point at an offset 'p' inside or on the surface of the shape. Intersections with surfaces, when the point is less than Tolerance/2 from a surface must be ignored.

Parameters
[in]pThe point at offset p.
[in]vThe normalised direction vector.
[in]calcNormFlag to indicate if to calculate the normal or not.
[out]validNormFlag set to true if the solid lies entirely behind or on the exiting surface. It is set false if the solid does not lie entirely behind or on the exiting surface. 'calcNorm' must be true, otherwise it is unused.
[out]nThe exiting outwards normal vector (undefined Magnitude). 'calcNorm' must be true, otherwise it is unused.
Returns
The distance to exit the shape.

Implements G4VSolid.

Definition at line 305 of file G4ReflectedSolid.cc.

310{
311 G4ThreeVector solNorm;
312
313 G4ThreeVector newPoint = (*fDirectTransform3D)*G4Point3D(p);
314 G4ThreeVector newDirection = (*fDirectTransform3D)*G4Vector3D(v);
315
316 G4double dist = fPtrSolid->DistanceToOut(newPoint, newDirection,
317 calcNorm, validNorm, &solNorm);
318 if(calcNorm)
319 {
320 *n = (*fDirectTransform3D)*G4Vector3D(solNorm);
321 }
322 return dist;
323}

◆ GetConstituentMovedSolid()

G4VSolid * G4ReflectedSolid::GetConstituentMovedSolid ( ) const

Returns a pointer to the original solid primitive.

Definition at line 120 of file G4ReflectedSolid.cc.

121{
122 return fPtrSolid;
123}

Referenced by G4tgbGeometryDumper::DumpSolid().

◆ GetCubicVolume()

G4double G4ReflectedSolid::GetCubicVolume ( )
overridevirtual

Returning an estimation of the solid volume (capacity) and surface area, in internal units.

Reimplemented from G4VSolid.

Definition at line 355 of file G4ReflectedSolid.cc.

356{
357 return fPtrSolid->GetCubicVolume();
358}

◆ GetDirectTransform3D()

G4Transform3D G4ReflectedSolid::GetDirectTransform3D ( ) const

Definition at line 133 of file G4ReflectedSolid.cc.

134{
135 G4Transform3D aTransform = *fDirectTransform3D;
136 return aTransform;
137}

◆ GetEntityType()

G4GeometryType G4ReflectedSolid::GetEntityType ( ) const
overridevirtual

Returns a random point located and uniformly distributed on the surface of the solid.

Implements G4VSolid.

Definition at line 105 of file G4ReflectedSolid.cc.

106{
107 return {"G4ReflectedSolid"};
108}

Referenced by StreamInfo().

◆ GetNumOfConstituents()

G4int G4ReflectedSolid::GetNumOfConstituents ( ) const
overridevirtual

Returns the number of constituent solids (in case Boolean).

Reimplemented from G4VSolid.

Definition at line 385 of file G4ReflectedSolid.cc.

386{
387 return fPtrSolid->GetNumOfConstituents();
388}

◆ GetPointOnSurface()

G4ThreeVector G4ReflectedSolid::GetPointOnSurface ( ) const
overridevirtual

Returns a random point located and uniformly distributed on the surface of the solid.

Reimplemented from G4VSolid.

Definition at line 374 of file G4ReflectedSolid.cc.

375{
376 G4ThreeVector p = fPtrSolid->GetPointOnSurface();
377 return (*fDirectTransform3D)*G4Point3D(p);
378}

◆ GetPolyhedron()

G4Polyhedron * G4ReflectedSolid::GetPolyhedron ( ) const
overridevirtual

Smart access function - creates on request and stores for future access. A null pointer means "not available".

Reimplemented from G4VSolid.

Definition at line 471 of file G4ReflectedSolid.cc.

472{
473 if ((fpPolyhedron == nullptr) || fRebuildPolyhedron ||
474 (fpPolyhedron->GetNumberOfRotationStepsAtTimeOfCreation() !=
475 fpPolyhedron->GetNumberOfRotationSteps()))
476 {
478 fRebuildPolyhedron = false;
479 }
480 return fpPolyhedron;
481}
G4Polyhedron * CreatePolyhedron() const override

◆ GetReflectedSolidPtr() [1/2]

G4ReflectedSolid * G4ReflectedSolid::GetReflectedSolidPtr ( )
virtual

Definition at line 115 of file G4ReflectedSolid.cc.

116{
117 return this;
118}

◆ GetReflectedSolidPtr() [2/2]

const G4ReflectedSolid * G4ReflectedSolid::GetReflectedSolidPtr ( ) const
virtual

If the Solid is a G4ReflectedSolid, return a self pointer else return nullptr.

Definition at line 110 of file G4ReflectedSolid.cc.

111{
112 return this;
113}

◆ GetSurfaceArea()

G4double G4ReflectedSolid::GetSurfaceArea ( )
overridevirtual

Returns an estimation of the solid surface area in internal units. This method may be overloaded by derived classes to compute the exact geometrical quantity for solids where this is possible, or anyway to cache the computed value. Note: the computed value is NOT cached.

Reimplemented from G4VSolid.

Definition at line 364 of file G4ReflectedSolid.cc.

365{
366 return fPtrSolid->GetSurfaceArea();
367}

◆ GetTransform3D()

G4Transform3D G4ReflectedSolid::GetTransform3D ( ) const

Accessors and modifier for the transformation.

Definition at line 128 of file G4ReflectedSolid.cc.

129{
130 return fDirectTransform3D->inverse();
131}

◆ Inside()

EInside G4ReflectedSolid::Inside ( const G4ThreeVector & p) const
overridevirtual

Concrete implementations of the expected query interfaces for solids, as defined in the base class G4VSolid.

Implements G4VSolid.

Definition at line 257 of file G4ReflectedSolid.cc.

258{
259 G4ThreeVector newPoint = (*fDirectTransform3D)*G4Point3D(p);
260 return fPtrSolid->Inside(newPoint);
261}

◆ IsFaceted()

G4bool G4ReflectedSolid::IsFaceted ( ) const
overridevirtual

Returns true as the solid has only planar faces.

Reimplemented from G4VSolid.

Definition at line 394 of file G4ReflectedSolid.cc.

395{
396 return fPtrSolid->IsFaceted();
397}

◆ operator=()

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

Definition at line 81 of file G4ReflectedSolid.cc.

82{
83 // Check assignment to self
84 //
85 if (this == &rhs) { return *this; }
86
87 // Copy base class data
88 //
90
91 // Copy data
92 //
93 fPtrSolid = rhs.fPtrSolid;
94 delete fDirectTransform3D;
96 fRebuildPolyhedron = false;
97 delete fpPolyhedron; fpPolyhedron = nullptr;
98
99 return *this;
100}
G4VSolid & operator=(const G4VSolid &rhs)
Definition G4VSolid.cc:108

◆ SetDirectTransform3D()

void G4ReflectedSolid::SetDirectTransform3D ( G4Transform3D & transform)

Definition at line 139 of file G4ReflectedSolid.cc.

140{
141 fDirectTransform3D = &transform;
142 fRebuildPolyhedron = true;
143}

◆ StreamInfo()

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

Streams the object contents to an output stream.

Implements G4VSolid.

Definition at line 412 of file G4ReflectedSolid.cc.

413{
414 os << "-----------------------------------------------------------\n"
415 << " *** Dump for Reflected solid - " << GetName() << " ***\n"
416 << " ===================================================\n"
417 << " Solid type: " << GetEntityType() << "\n"
418 << " Parameters of constituent solid: \n"
419 << "===========================================================\n";
420 fPtrSolid->StreamInfo(os);
421 os << "===========================================================\n"
422 << " Transformations: \n"
423 << " Direct transformation - translation : \n"
424 << " " << fDirectTransform3D->getTranslation() << "\n"
425 << " - rotation : \n"
426 << " ";
427 fDirectTransform3D->getRotation().print(os);
428 os << "\n"
429 << "===========================================================\n";
430
431 return os;
432}
G4GeometryType GetEntityType() const override

◆ SurfaceNormal()

G4ThreeVector G4ReflectedSolid::SurfaceNormal ( const G4ThreeVector & p) const
overridevirtual

Returns the outwards pointing unit normal of the shape for the surface closest to the point at offset 'p'.

Parameters
[in]pThe point at offset p.
Returns
The outwards pointing unit normal.

Implements G4VSolid.

Definition at line 268 of file G4ReflectedSolid.cc.

269{
270 G4ThreeVector newPoint = (*fDirectTransform3D)*G4Point3D(p);
271 G4Vector3D normal = fPtrSolid->SurfaceNormal(newPoint);
272 return (*fDirectTransform3D)*normal;
273}

Member Data Documentation

◆ fDirectTransform3D

◆ fpPolyhedron

G4Polyhedron* G4ReflectedSolid::fpPolyhedron = nullptr
mutableprotected

Definition at line 194 of file G4ReflectedSolid.hh.

Referenced by GetPolyhedron(), operator=(), and ~G4ReflectedSolid().

◆ fPtrSolid

◆ fRebuildPolyhedron

G4bool G4ReflectedSolid::fRebuildPolyhedron = false
mutableprotected

Caches for the reflected G4Polyhedron.

Definition at line 193 of file G4ReflectedSolid.hh.

Referenced by GetPolyhedron(), operator=(), and SetDirectTransform3D().


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