38 #ifndef FCL_SHAPE_CYLINDER_INL_H 39 #define FCL_SHAPE_CYLINDER_INL_H 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 <<
");";
Vector3< S_ > aabb_center
AABB center in local coordinate.
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18, kDOP24), basic shape (box, sphere, ellipsoid, capsule, cone, cylinder, convex, plane, halfspace, triangle), and octree
Base class for all basic geometric shapes.
Cylinder(S radius, S lz)
Constructor.
S computeVolume() const override
compute the volume
S_ aabb_radius
AABB radius.
S radius
Radius of the cylinder.
Matrix3< S > computeMomentofInertia() const override
compute the inertia matrix, related to the origin
static const char * value()
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
std::string representation(int precision=20) const
Create a string that should be sufficient to recreate this shape. This is akin to the repr() implemen...
Eigen::Matrix< S, 3, 3 > Matrix3
void computeLocalAABB() override
Compute AABB.
Eigen::Matrix< S, 3, 1 > Vector3
std::vector< Vector3< S > > getBoundVertices(const Transform3< S > &tf) const
get the vertices of some convex shape which can bound this shape in a specific configuration ...
static constexpr S pi()
The mathematical constant pi.
AABB< S_ > aabb_local
AABB in local coordinate, used for tight AABB when only translation transform.
NODE_TYPE getNodeType() const override
Get node type: a cylinder.
template class FCL_EXPORT Cylinder< double >