31 template <
typename stepper_t>
33 const stepper_t&
stepper,
typename stepper_t::State& state,
36 surface.
intersect(state.geoContext, stepper.position(state),
37 state.navDir * stepper.direction(state), bcheck);
40 if (sIntersection.intersection.status == Intersection3D::Status::onSurface) {
43 return Intersection3D::Status::onSurface;
44 }
else if (sIntersection.intersection or sIntersection.alternative) {
47 double oLimit = stepper.overstepLimit(state);
48 auto checkIntersection = [&](
const Intersection3D& 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 Intersection3D::Status::reachable;
63 return Intersection3D::Status::unreachable;
74 template <
typename stepper_t,
typename object_
intersection_t>
76 const object_intersection_t& oIntersection,
78 double stepSize = oIntersection.intersection.pathLength;