Celeritas  0.5.0-86+4a8eea4
Public Member Functions | Static Public Member Functions | List of all members
celeritas::ConeAligned< T > Class Template Reference

Axis-aligned cone (infinite and double-sheeted). More...

#include <ConeAligned.hh>

Public Member Functions

CELER_FUNCTION ConeAligned (Real3 const &origin, real_type tangent)
 Construct from origin and tangent of the angle of its opening. More...
 
template<class R >
CELER_FUNCTION ConeAligned (Span< R, StorageSpan::extent >)
 Construct from raw data.
 
CELER_FUNCTION Real3 const & origin () const
 Get the origin position along the normal axis.
 
CELER_FUNCTION real_type tangent_sq () const
 Get the square of the tangent of the opening angle.
 
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. More...
 
CELER_FUNCTION Real3 calc_normal (Real3 const &pos) const
 Calculate outward normal at a position.
 

Static Public Member Functions

static ConeAligned from_tangent_sq (Real3 const &origin, real_type tsq)
 Construct with square of tangent for simplification.
 

Type aliases

using Intersections = Array< real_type, 2 >
 Surface type identifier.
 
using StorageSpan = Span< real_type const, 4 >
 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.
 

Detailed Description

template<Axis T>
class celeritas::ConeAligned< T >

Axis-aligned cone (infinite and double-sheeted).

For a cone parallel to the x axis:

\[ (y - y_0)^2 + (z - z_0)^2 - t^2 (x - x_0)^2 = 0 \]

where t is the tangent of the opening angle ( \(r/h\) for a finite cone with radius r and height h).

Constructor & Destructor Documentation

◆ ConeAligned()

template<Axis T>
CELER_FUNCTION celeritas::ConeAligned< T >::ConeAligned ( Real3 const &  origin,
real_type  tangent 
)
inline

Construct from origin and tangent of the angle of its opening.

Given a finite cone, the tangent is the ratio of its base radius to its height.

In the cone, below, the tangent of the inner angle \( \tan(\theta) = r/h \) is the second argument.

    r
  +-------*
  |   _--^
h |_--
  O

Member Function Documentation

◆ calc_intersections()

template<Axis T>
CELER_FUNCTION auto celeritas::ConeAligned< T >::calc_intersections ( Real3 const &  pos,
Real3 const &  dir,
SurfaceState  on_surface 
) const
inline

Calculate all possible straight-line intersections with this surface.

\[ (y - yc)^2 + (z - zc)^2 - t^2 * (x - xc)^2 = 0 \]

◆ t_axis()

template<Axis T>
static CELER_CONSTEXPR_FUNCTION Axis celeritas::ConeAligned< T >::t_axis ( )
inlinestatic

Axes


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