Celeritas
0.5.0-56+6b053cd
|
Axis-aligned cylinder centered about the origin. More...
#include <CylCentered.hh>
Public Member Functions | |
CELER_FUNCTION | CylCentered (real_type radius) |
Construct with radius. | |
template<class R > | |
CELER_FUNCTION | CylCentered (Span< R, StorageSpan::extent >) |
Construct from raw data. | |
CELER_FUNCTION real_type | radius_sq () const |
Get the square of the radius. | |
CELER_FUNCTION StorageSpan | data () const |
Get a view to the data for type-deleted storage. | |
CELER_FUNCTION SignedSense | calc_sense (Real3 const &pos) const |
Determine the sense of the position relative to this surface. | |
CELER_FUNCTION Intersections | calc_intersections (Real3 const &pos, Real3 const &dir, SurfaceState on_surface) const |
Calculate all possible straight-line intersections with this surface. | |
CELER_FUNCTION Real3 | calc_normal (Real3 const &pos) const |
Calculate outward normal at a position. | |
Static Public Member Functions | |
static CylCentered | from_radius_sq (real_type rsq) |
Construct from the square of the radius. More... | |
Type aliases | |
using | Intersections = Array< real_type, 2 > |
Surface type identifier. | |
using | StorageSpan = Span< real_type const, 1 > |
Surface type identifier. | |
static CELER_CONSTEXPR_FUNCTION SurfaceType | surface_type () |
Surface type identifier. | |
static CELER_CONSTEXPR_FUNCTION bool | simple_safety () |
Safety is intersection along surface normal. | |
static CELER_CONSTEXPR_FUNCTION Axis | t_axis () |
static CELER_CONSTEXPR_FUNCTION Axis | u_axis () |
Surface type identifier. | |
static CELER_CONSTEXPR_FUNCTION Axis | v_axis () |
Surface type identifier. | |
Axis-aligned cylinder centered about the origin.
The cylinder is centered along an Axis template parameter.
For a cylinder along the x axis:
\[ y^2 + z^2 - R^2 = 0 \]
This is an optimization of the Cyl. The motivations are:
|
inlinestatic |
Construct from the square of the radius.
This is used for surface simplification.
|
inlinestatic |
Axes