Go to the documentation of this file.
38 #ifndef FCL_SHAPE_BOX_INL_H
39 #define FCL_SHAPE_BOX_INL_H
83 this->aabb_local.max_ = v_delta;
84 this->aabb_local.min_ = -v_delta;
86 this->aabb_center = this->aabb_local.center();
87 this->aabb_radius = (this->aabb_local.min_ - this->aabb_center).norm();
105 template <
typename S>
108 S V = computeVolume();
110 S a2 = side[0] * side[0] * V;
111 S b2 = side[1] * side[1] * V;
112 S c2 = side[2] * side[2] * V;
114 Vector3<S> I((b2 + c2) / 12, (a2 + c2) / 12, (a2 + b2) / 12);
116 return I.asDiagonal();
120 template <
typename S>
124 std::vector<Vector3<S>> result(8);
125 auto a = side[0] / 2;
126 auto b = side[1] / 2;
127 auto c = side[2] / 2;
141 template <
typename S>
144 std::stringstream ss;
145 ss << std::setprecision(precision);
146 ss <<
"Box<" << S_str <<
">(" << side[0] <<
", " << side[1] <<
", " << side[2]
static const char * value()
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
NODE_TYPE getNodeType() const override
Get node type: a box.
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
Base class for all basic geometric shapes.
Eigen::Matrix< S, 3, 1 > Vector3
Eigen::Matrix< S, 3, 3 > Matrix3
S computeVolume() const override
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...
void computeLocalAABB() override
Compute AABB.
Matrix3< S > computeMomentofInertia() const override
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
template class FCL_EXPORT Box< double >
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48