#ifndef MESH_BOOLEAN_H #define MESH_BOOLEAN_H #include #include "MeshBooleanType.h" #include #include namespace igl { // MESH_BOOLEAN Compute boolean csg operations on "solid", consistently oriented // meshes. // // Inputs: // V #V by 3 list of vertex positions of first mesh // F #F by 3 list of triangle indices into V // U #U by 3 list of vertex positions of second mesh // G #G by 3 list of triangle indices into U // type type of boolean operation // Outputs: // W #W by 3 list of vertex positions of boolean result mesh // H #H by 3 list of triangle indices into W // J #H list of indices into [FA;FB] revealing "birth" facet // // See also: self_intersect // template < typename DerivedVA, typename DerivedFA, typename DerivedVB, typename DerivedFB, typename DerivedVC, typename DerivedFC, typename DerivedJ> IGL_INLINE void mesh_boolean( const Eigen::PlainObjectBase & VA, const Eigen::PlainObjectBase & FA, const Eigen::PlainObjectBase & VB, const Eigen::PlainObjectBase & FB, const MeshBooleanType & type, Eigen::PlainObjectBase & VC, Eigen::PlainObjectBase & FC, Eigen::PlainObjectBase & J); template < typename DerivedVA, typename DerivedFA, typename DerivedVB, typename DerivedFB, typename DerivedVC, typename DerivedFC> IGL_INLINE void mesh_boolean( const Eigen::PlainObjectBase & VA, const Eigen::PlainObjectBase & FA, const Eigen::PlainObjectBase & VB, const Eigen::PlainObjectBase & FB, const MeshBooleanType & type, Eigen::PlainObjectBase & VC, Eigen::PlainObjectBase & FC); // Inputs: // resolve_fun function handle for computing resolve of a // self-intersections of a mesh and outputting the new mesh. template < typename DerivedVA, typename DerivedFA, typename DerivedVB, typename DerivedFB, typename DerivedVC, typename DerivedFC, typename DerivedJ> IGL_INLINE void mesh_boolean( const Eigen::PlainObjectBase & VA, const Eigen::PlainObjectBase & FA, const Eigen::PlainObjectBase & VB, const Eigen::PlainObjectBase & FB, const MeshBooleanType & type, const std::function &, const Eigen::Matrix &, Eigen::Matrix &, Eigen::Matrix &, Eigen::Matrix&)> & resolve_fun, Eigen::PlainObjectBase & VC, Eigen::PlainObjectBase & FC, Eigen::PlainObjectBase & J); } #ifndef IGL_STATIC_LIBRARY # include "mesh_boolean.cpp" #endif #endif