42 for (
int i = 0; i < 3; i++)
49 r_.reset(
new std::pair<float, float>[ser_size]);
53 const float linear_resolution,
54 const float angular_resolution,
57 const int angle = std::lround(M_PI * 2 / angular_resolution);
60 for (
int i = 0; i < angle; i++)
67 for (d[0] = 0; d[0] <= range * 2; d[0]++)
69 for (d[1] = 0; d[1] <= range * 2; d[1]++)
71 for (d[2] = 0; d[2] < angle; d[2]++)
74 (d[0] - range) * linear_resolution,
75 (d[1] - range) * linear_resolution,
76 d[2] * angular_resolution);
77 v.
rotate(-i * angular_resolution);
80 const float sin_v = std::sin(v[2]);
81 const float cos_v = std::cos(v[2]);
82 const float r1 = v[1] + v[0] * cos_v / sin_v;
83 const float r2 = std::copysign(
84 sqrtf(powf(v[0], 2.0) + powf(v[0] * cos_v / sin_v, 2.0)),
86 r.
radiuses(d) = std::pair<float, float>(r1, r2);
std::vector< Page > pages_
CyclicVecFloat< 3, 2 > & motion(const CyclicVecInt< 3, 2 > &pos)
void rotate(const float ang)
CyclicVecInt< 3, 2 > size_
TFSIMD_FORCE_INLINE tfScalar angle(const Quaternion &q1, const Quaternion &q2)
std::unique_ptr< CyclicVecFloat< 3, 2 >[]> c_
std::unique_ptr< std::pair< float, float >[]> r_
void reset(const CyclicVecInt< 3, 2 > &size)
std::pair< float, float > & radiuses(const CyclicVecInt< 3, 2 > &pos)
void reset(const float linear_resolution, const float angular_resolution, const int range)