Go to the documentation of this file.
   38 #ifndef FCL_SHAPE_ELLIPSOID_INL_H 
   39 #define FCL_SHAPE_ELLIPSOID_INL_H 
   74   this->aabb_local.max_ = radii;
 
   75   this->aabb_local.min_ = -radii;
 
   77   this->aabb_center = this->aabb_local.center();
 
   78   this->aabb_radius = (this->aabb_local.min_ - this->aabb_center).norm();
 
   92   const S V = computeVolume();
 
   94   const S a2 = radii[0] * radii[0] * V;
 
   95   const S b2 = radii[1] * radii[1] * V;
 
   96   const S c2 = radii[2] * radii[2] * V;
 
   98   return Vector3<S>(0.2 * (b2 + c2), 0.2 * (a2 + c2), 0.2 * (a2 + b2)).asDiagonal();
 
  102 template <
typename S>
 
  106   return 4.0 * pi * radii[0] * radii[1] * radii[2] / 3.0;
 
  110 template <
typename S>
 
  116   std::vector<Vector3<S>> result(12);
 
  118   const auto phi = (1.0 + std::sqrt(5.0)) / 2.0;  
 
  120   const auto a = std::sqrt(3.0) / (phi * phi);
 
  121   const auto b = phi * a;
 
  123   const auto& A = radii[0];
 
  124   const auto& B = radii[1];
 
  125   const auto& C = radii[2];
 
  127   const auto Aa = A * a;
 
  128   const auto Ab = A * b;
 
  129   const auto Ba = B * a;
 
  130   const auto Bb = B * b;
 
  131   const auto Ca = C * a;
 
  132   const auto Cb = C * b;
 
  151 template <
typename S>
 
  154   std::stringstream ss;
 
  155   ss << std::setprecision(precision);
 
  156   ss << 
"Ellipsoid<" << S_str << 
">(" << radii[0] << 
", " << radii[1] << 
", " 
  
static const char * value()
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::Transform< S, 3, Eigen::Isometry > Transform3
NODE_TYPE getNodeType() const override
Get node type: a sphere.
Ellipsoid(S a, S b, S c)
Constructor.
void computeLocalAABB() override
Compute AABB.
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
Matrix3< S > computeMomentofInertia() const override
template class FCL_EXPORT Ellipsoid< double >
static constexpr S pi()
The mathematical constant pi.
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
S computeVolume() const override
fcl
Author(s): 
autogenerated on Fri Mar 14 2025 02:38:17