convex_decomposition_vhacd.h
Go to the documentation of this file.
1 
26 #ifndef TESSERACT_COLLISION_CONVEX_DECOMPOSITION_VHACD_H
27 #define TESSERACT_COLLISION_CONVEX_DECOMPOSITION_VHACD_H
28 
29 #define ENABLE_VHACD_IMPLEMENTATION 1
30 
35 
37 
38 namespace tesseract_collision
39 {
41 {
43  uint32_t max_convex_hulls{ 64 };
45  uint32_t resolution{ 400000 };
49  uint32_t max_recursion_depth{ 10 };
51  bool shrinkwrap{ true };
55  uint32_t max_num_vertices_per_ch{ 64 };
57  bool async_ACD{ true };
59  uint32_t min_edge_length{ 2 };
61  bool find_best_plane{ false };
62 
63  void print() const;
64 };
65 
67 {
68 public:
69  using Ptr = std::shared_ptr<ConvexDecompositionVHACD>;
70  using ConstPtr = std::shared_ptr<const ConvexDecompositionVHACD>;
71 
72  ConvexDecompositionVHACD() = default;
74 
75  std::vector<std::shared_ptr<tesseract_geometry::ConvexMesh>> compute(const tesseract_common::VectorVector3d& vertices,
76  const Eigen::VectorXi& faces) const override;
77 
78 private:
80 };
81 
82 } // namespace tesseract_collision
83 #endif // TESSERACT_COLLISION_CONVEX_DECOMPOSITION_VHACD_H
tesseract_collision::ConvexDecomposition::ConstPtr
std::shared_ptr< const ConvexDecomposition > ConstPtr
Definition: convex_decomposition.h:39
tesseract_collision::ConvexDecompositionVHACD::params_
VHACDParameters params_
Definition: convex_decomposition_vhacd.h:79
tesseract_collision::VHACDParameters::min_edge_length
uint32_t min_edge_length
Once a voxel patch has an edge length of less than 4 on all 3 sides, we don't keep recursing.
Definition: convex_decomposition_vhacd.h:59
convex_decomposition.h
Convex decomposition interface.
tesseract_collision::VHACDParameters::minimum_volume_percent_error_allowed
double minimum_volume_percent_error_allowed
if the voxels are within 1% of the volume of the hull, we consider this a close enough approximation
Definition: convex_decomposition_vhacd.h:47
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
VHACD::FillMode::FLOOD_FILL
@ FLOOD_FILL
tesseract_collision::ConvexDecomposition::Ptr
std::shared_ptr< ConvexDecomposition > Ptr
Definition: convex_decomposition.h:38
tesseract_collision::ConvexDecompositionVHACD
Definition: convex_decomposition_vhacd.h:66
tesseract_collision::ConvexDecompositionVHACD::ConvexDecompositionVHACD
ConvexDecompositionVHACD()=default
tesseract_collision::VHACDParameters::max_convex_hulls
uint32_t max_convex_hulls
The maximum number of convex hulls to produce.
Definition: convex_decomposition_vhacd.h:43
tesseract_collision::VHACDParameters::find_best_plane
bool find_best_plane
Whether or not to attempt to split planes along the best location. Experimental feature....
Definition: convex_decomposition_vhacd.h:61
tesseract_collision::VHACDParameters::print
void print() const
Definition: convex_decomposition_vhacd.cpp:120
VHACD::FillMode
FillMode
Definition: VHACD.h:307
tesseract_common::VectorVector3d
std::vector< Eigen::Vector3d > VectorVector3d
tesseract_collision::VHACDParameters::fill_mode
VHACD::FillMode fill_mode
How to fill the interior of the voxelized mesh.
Definition: convex_decomposition_vhacd.h:53
TESSERACT_COMMON_IGNORE_WARNINGS_POP
Definition: create_convex_hull.cpp:37
tesseract_collision::VHACDParameters::resolution
uint32_t resolution
The voxel resolution to use.
Definition: convex_decomposition_vhacd.h:45
tesseract_collision::VHACDParameters::max_recursion_depth
uint32_t max_recursion_depth
The maximum recursion depth.
Definition: convex_decomposition_vhacd.h:49
tesseract_collision::VHACDParameters
Definition: convex_decomposition_vhacd.h:40
tesseract_collision::VHACDParameters::async_ACD
bool async_ACD
Whether or not to run asynchronously, taking advantage of additional cores.
Definition: convex_decomposition_vhacd.h:57
tesseract_collision
Definition: bullet_cast_bvh_manager.h:48
macros.h
tesseract_collision::ConvexDecompositionVHACD::compute
std::vector< std::shared_ptr< tesseract_geometry::ConvexMesh > > compute(const tesseract_common::VectorVector3d &vertices, const Eigen::VectorXi &faces) const override
Run convex decomposition algorithm.
Definition: convex_decomposition_vhacd.cpp:37
VHACD.h
tesseract_collision::VHACDParameters::max_num_vertices_per_ch
uint32_t max_num_vertices_per_ch
The maximum number of vertices allowed in any output convex hull.
Definition: convex_decomposition_vhacd.h:55
tesseract_collision::ConvexDecomposition
Definition: convex_decomposition.h:35
tesseract_collision::VHACDParameters::shrinkwrap
bool shrinkwrap
Whether or not to shrinkwrap the voxel positions to the source mesh on output.
Definition: convex_decomposition_vhacd.h:51


tesseract_collision
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:01:52