38 #ifndef FCL_SHAPE_CONE_INL_H 39 #define FCL_SHAPE_CONE_INL_H 100 template <
typename S>
107 template <
typename S>
111 std::vector<Vector3<S>> result(7);
114 auto r2 =
radius * 2 / std::sqrt(3.0);
131 template <
typename S>
134 std::stringstream ss;
135 ss << std::setprecision(precision);
136 ss <<
"Cone<" << S_str <<
">(" <<
radius <<
", " <<
lz <<
");";
Vector3< S_ > aabb_center
AABB center in local coordinate.
S computeVolume() const override
compute the volume
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.
S_ aabb_radius
AABB radius.
static const char * value()
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
Eigen::Matrix< S, 3, 3 > Matrix3
Eigen::Matrix< S, 3, 1 > Vector3
S radius
Radius of the cone.
Vector3< S > computeCOM() const override
compute center of mass
static constexpr S pi()
The mathematical constant pi.
AABB< S_ > aabb_local
AABB in local coordinate, used for tight AABB when only translation transform.
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...
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 ...
void computeLocalAABB() override
Compute AABB.
Matrix3< S > computeMomentofInertia() const override
compute the inertia matrix, related to the origin
NODE_TYPE getNodeType() const override
Get node type: a cone.
template class FCL_EXPORT Cone< double >