Celeritas
0.5.0-56+6b053cd
|
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. | |
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).
|
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
|
inline |
Calculate all possible straight-line intersections with this surface.
\[ (y - yc)^2 + (z - zc)^2 - t^2 * (x - xc)^2 = 0 \]
|
inlinestatic |
Axes