45 for (
int i = 0; i < 3; i++)
52 r_.reset(
new std::pair<float, float>[ser_size]);
56 const float linear_resolution,
57 const float angular_resolution,
60 const int angle = std::lround(M_PI * 2 / angular_resolution);
63 for (
int i = 0; i < angle; i++)
70 for (d[0] = 0; d[0] <= range * 2; d[0]++)
72 for (d[1] = 0; d[1] <= range * 2; d[1]++)
74 for (d[2] = 0; d[2] < angle; d[2]++)
77 (d[0] - range) * linear_resolution,
78 (d[1] - range) * linear_resolution,
79 d[2] * angular_resolution);
80 v.
rotate(-i * angular_resolution);
83 const float sin_v = std::sin(v[2]);
84 const float cos_v = std::cos(v[2]);
85 const float r1 = v[1] + v[0] * cos_v / sin_v;
86 const float r2 = std::copysign(
87 std::sqrt(std::pow(v[0], 2) + std::pow(v[0] * cos_v / sin_v, 2)),
89 r.
radiuses(d) = std::pair<float, float>(r1, r2);
std::unique_ptr< CyclicVecFloat< 3, 2 >[]> c_
CyclicVecInt< 3, 2 > size_
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
std::unique_ptr< std::pair< float, float >[]> r_
std::vector< Page > pages_
void reset(const CyclicVecInt< 3, 2 > &size)
void reset(const float linear_resolution, const float angular_resolution, const int range)
CyclicVecFloat< 3, 2 > & motion(const CyclicVecInt< 3, 2 > &pos)
void rotate(const float ang)
std::pair< float, float > & radiuses(const CyclicVecInt< 3, 2 > &pos)