22#include <shapes/SpheroCylinder.hpp>
38 auto const z =
e_z * c_dist;
39 auto const r_vec = c_dist - z *
e_z;
40 auto const r = r_vec.
norm();
44 auto const e_r = (r == 0) ?
e_r_axis : r_vec / r;
50 double z_abs = std::abs(z);
65 vec = dist * c_dist_cap;
87 vec = dist * c_dist_cap;
Vector implementation and trait types for boost qvm interoperability.
Utils::Vector3d e_r_axis
Alternative e_r for corner case.
double m_rad
cylinder radius.
double m_half_length
Center of smoothing circle.
Utils::Vector3d m_center
center of the cylinder.
void calculate_dist(const Utils::Vector3d &pos, double &dist, Utils::Vector3d &vec) const override
double m_direction
direction -1: inside, +1 outside
Utils::Vector3d e_z
Unit vector in z direction.