31 template <
typename stepper_t>
36 surface.
intersect(state.geoContext, stepper.position(state),
37 state.navDir * stepper.direction(state), bcheck);
40 if (sIntersection.intersection.status == Intersection::Status::onSurface) {
43 return Intersection::Status::onSurface;
44 }
else if (sIntersection.intersection or sIntersection.alternative) {
47 double oLimit = stepper.overstepLimit(state);
48 auto checkIntersection = [&](
const Intersection& intersection) ->
bool {
49 double cLimit = intersection.pathLength;
50 bool accept = (cLimit > oLimit and cLimit * cLimit < pLimit * pLimit);
52 stepper.setStepSize(state, state.navDir * cLimit);
57 if (checkIntersection(sIntersection.intersection) or
58 (sIntersection.alternative and
59 checkIntersection(sIntersection.alternative))) {
60 return Intersection::Status::reachable;
63 return Intersection::Status::unreachable;
74 template <
typename stepper_t,
typename object_
intersection_t>
76 const object_intersection_t& oIntersection,
77 bool release =
true) {
78 double stepSize = oIntersection.intersection.pathLength;