New SurfaceIntersection schema and overstepping fix
Closes #613 (closed)
This MR solves a few long standing issues:
-
Firstly it removes the notion of
anyDirection
as a navigation direction - that concept was faulty and could create problems if the navigation direction was used as a sign multiplicator with theVector3D
.anyDirection
would have set the length of this vector to 0. -
It changes the
Intersection
object from being just a boolean intersection to an Intersection with status. The allowed status values aremissed = 0, unreachable = 0, reachable = 1, onSurface = 2
. Backward solutions are marked asreachable
but with negative path length indicating that those were achieved with opposite the direction. -
It merges the
ObjectIntersection<O>
and theFullIntersection<O,R>
into one class with anenable_if
if two different template parameters are given forobject_t
andrepresentation_t
. It allows adds alternative Intersection solutions for surfaces/objects that can be multiply intersected. -
It streamlines the usage of
direction
andmomentum
in the surface intersection and global to local methods: if a direction (i.e. a unit vector) is needed, it has to be provided as such the normalisation is expected to be done before method call. In that case the argument is clearly calleddirection
. -
Using the new intersection schema, overstepping is allowed for the steppers within an overstepping tolerance that can be (fixed or dynamically) chosen by the stepper itself. Currently a fixed value is given (
s_onSurfaceTolerance
for theStraightLineStepper
). -
Allowing overstepping makes the intersection corrector obsolete, hence this concept is removed entirely and the
corrector_t
template consistently removed from the geometry/intersection methods. Eventually this should save time since overstepping happens relatively rarely and the intersection corrector forced double intersection for all navigation steps. -
Finally, this makes the
BoundarySorter
obsolete as well, it is dropped.