|
Celeritas 0.7.0-dev.169+develop.bdc0041f6
|
Axis-aligned cone (infinite and double-sheeted). More...
#include <ConeAligned.hh>
Public Member Functions | |
| ConeAligned (Real3 const &origin, real_type tangent) | |
| Construct from origin and tangent of the angle of its opening. | |
| 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. | |
| 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. | |
Axis-aligned cone (infinite and double-sheeted).
For a cone parallel to the z axis:
\[ (x - x_0)^2 + (y - y_0)^2 - t^2 (z - z_0)^2 = 0 \]
where t is the tangent of the opening angle ( \(r/h\) for a finite cone with radius r and height h). In the cone below, the tangent of the inner angle is \( t = \tan(\theta) = r/h \). Negative values of t are equivalent and valid, representing the four points on a slice of the double-sheet cone.
\ | r /
o- - - -+- - - -o
'--_ : _--'
h --.:.--
--- O
_--':'--_
.-- : --.
o-------+-------o
/ | \
|
inline |
Calculate all possible straight-line intersections with this surface.
\[ (y - yc)^2 + (z - zc)^2 - t^2 * (x - xc)^2 = 0 \]
|
inlinestatic |
Axes