8 int normal_axis,
double normal_location)
9 : m_nlayers(rays.
size())
10 , m_pitch_mag(m_nlayers, 0.0)
11 , m_pitch_dir(m_nlayers)
13 , m_zero_crossing(m_nlayers, m_nlayers)
14 , m_ray_jump(m_nlayers, m_nlayers)
15 , m_a(
boost::extents[m_nlayers][m_nlayers][m_nlayers])
16 , m_b(
boost::extents[m_nlayers][m_nlayers][m_nlayers])
20 auto project = [&](
Vector v) { v[normal_axis]=normal_location;
return v; };
26 const auto& rpair = rays[ilayer];
27 const auto& r0 = rpair.first;
28 const auto& r1 = rpair.second;
34 auto rpv =
project(rpitch.second - rpitch.first);
48 const auto& rpl = rays[il];
49 const auto& rpm = rays[
im];
51 const auto& rl0 = rpl.first;
52 const auto& rl1 = rpl.second;
53 const auto& rm0 = rpm.first;
54 const auto& rm1 = rpm.second;
59 const auto& pl0 = r00.first;
60 const auto& pm0 = r00.second;
69 const auto jump =
project(ray.first - pl0);
75 const auto jump =
project(ray.first - pm0);
94 if (il == in) {
continue; }
98 if (
im == in) {
continue; }
105 m_a[il][
im][in] = wlmpn;
106 m_a[
im][il][in] = wmlpn;
108 m_b[il][
im][in] = rlmpn - cp;
109 m_b[
im][il][in] = rlmpn - cp;
128 const double i = one.
grid, j = two.
grid;
129 Vector res = r00 + j*wlm + i*wml;
vector_array2d_t m_ray_jump
double pitch_location(const coordinate_t &one, const coordinate_t &two, layer_index_t other) const
vector_array2d_t m_zero_crossing
vector_array1d_t m_pitch_dir
std::vector< double > m_pitch_mag
Coordinates(const ray_pair_vector_t &rays, int normal_axis=0, double normal_location=0.0)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Vector ray_crossing(const coordinate_t &one, const coordinate_t &two) const
vector_array1d_t m_center
Vector zero_crossing(layer_index_t one, layer_index_t two) const
std::vector< ray_pair_t > ray_pair_vector_t
Ray ray_pitch(const Ray &ray1, const Ray &ray2)