38 #ifndef FCL_SHAPE_CYLINDER_INL_H
39 #define FCL_SHAPE_CYLINDER_INL_H
66 const Vector3<S> v_delta(radius, radius, 0.5 * lz);
67 this->aabb_local.max_ = v_delta;
68 this->aabb_local.min_ = -v_delta;
70 this->aabb_center = this->aabb_local.center();
71 this->aabb_radius = (this->aabb_local.min_ - this->aabb_center).norm();
92 S V = computeVolume();
93 S ix = V * (3 * radius * radius + lz * lz) / 12;
94 S iz = V * radius * radius / 2;
100 template <
typename S>
104 std::vector<Vector3<S>> result(12);
107 auto r2 = radius * 2 / std::sqrt(3.0);
129 template <
typename S>
132 std::stringstream ss;
133 ss << std::setprecision(precision);
134 ss <<
"Cylinder<" << S_str <<
">(" << radius <<
", " << lz <<
");";