Celeritas 0.6.0-47+develop.b3cbb238
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
celeritas::orangeinp::ExtrudedPolygon Class Referencefinal

Region formed by extruding + scaling a convex polygon along a line segment. More...

#include <IntersectRegion.hh>

Inheritance diagram for celeritas::orangeinp::ExtrudedPolygon:
Inheritance graph
[legend]

Classes

struct  PolygonFace
 Specifies the top or bottom face of the ExtrudedPolygon. More...
 

Public Types

Type aliases
using VecReal2 = std::vector< Real2 >
 

Public Member Functions

 ExtrudedPolygon (VecReal2 const &polygon, PolygonFace const &bot_face, PolygonFace const &top_face)
 Construct from a convex polygon and bottom/top faces.
 
void build (IntersectSurfaceBuilder &) const final
 Build surfaces.
 
void output (JsonPimpl *) const final
 Write output to the given JSON object.
 
VecReal2 polygon () const
 Polygon points (2D)
 
Real3 bot_line_segment_point () const
 Bottom point of the line segment.
 
Real3 top_line_segment_point () const
 Top point of the line segment.
 
real_type bot_scaling_factor () const
 Bottom scaling factor.
 
real_type top_scaling_factor () const
 Top scaling factor.
 

Additional Inherited Members

- Protected Member Functions inherited from celeritas::orangeinp::IntersectRegionInterface
 CELER_DEFAULT_COPY_MOVE (IntersectRegionInterface)
 

Detailed Description

Region formed by extruding + scaling a convex polygon along a line segment.

The convex polygon is supplied as a set of points on the XY plane in clockwise order. The line segment and scaling factors are specified by providing a line segment point and scaling factor for the top and bottom polygon faces of the region. The line segment point of the top face must have a z value greater than that of the bottom face. Along the line segment, the size of the polygon is linearly scaled in accordance with scaling factors.

As is done in Geant4, construction is done by first applying scaling factors to the upper and lower polygons via scalar multiplication with each polygon point, then the points on the line are used to offset the upper and lower polygons.

Member Function Documentation

◆ build()

void celeritas::orangeinp::ExtrudedPolygon::build ( IntersectSurfaceBuilder insert_surface) const
finalvirtual

◆ output()

void celeritas::orangeinp::ExtrudedPolygon::output ( JsonPimpl j) const
finalvirtual

Write output to the given JSON object.

Implements celeritas::orangeinp::IntersectRegionInterface.


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