11 #include <Eigen/StdVector>
42 const std::vector<Eigen::Vector3d> &vertices,
45 const char *
name =
"TetraMesh")
60 inline std::size_t
TetraSize()
const {
return tetras_.size(); }
85 return vertices_.size() > 0 && tetras_.size() > 0;
95 const std::vector<double> &values,
double level);
102 static std::tuple<std::shared_ptr<TetraMesh>, std::vector<size_t>>
107 std::vector<Eigen::Vector4i, cloudViewer::utility::Vector4i_allocator>
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Tetra mesh contains vertices and tetrahedra represented by the indices to the vertices.
TetraMesh(const std::vector< Eigen::Vector3d > &vertices, const std::vector< Eigen::Vector4i, cloudViewer::utility::Vector4i_allocator > &tetras, const char *name="TetraMesh")
Parameterized Constructor.
virtual TetraMesh & clear() override
std::size_t TetraSize() const
TetraMesh(const char *name="TetraMesh")
Default ccMesh constructor.
std::vector< Eigen::Vector4i, cloudViewer::utility::Vector4i_allocator > tetras_
List of tetras denoted by the index of points forming the tetra.
std::shared_ptr< ccMesh > ExtractTriangleMesh(const std::vector< double > &values, double level)
Function to extract a triangle mesh of the specified iso-surface at a level This method applies prima...
TetraMesh & RemoveDuplicatedTetras()
Function that removes duplicated tetrahedra, i.e., removes tetrahedra that reference the same four ve...
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
TetraMesh & RemoveUnreferencedVertices()
This function removes vertices from the tetra mesh that are not referenced in any tetrahedron of the ...
TetraMesh & RemoveDegenerateTetras()
Function that removes degenerate tetrahedra, i.e., tetrahedra that reference a single vertex multiple...
TetraMesh & operator+=(const TetraMesh &mesh)
TetraMesh & RemoveDuplicatedVertices()
Function that removes duplicated verties, i.e., vertices that have identical coordinates.
bool HasTetras() const
Returns true if the mesh contains tetras.
static std::tuple< std::shared_ptr< TetraMesh >, std::vector< size_t > > CreateFromPointCloud(const ccPointCloud &point_cloud)
Function that creates a tetrahedral mesh (TetraMeshFactory.cpp). from a point cloud.
virtual bool isSerializable() const override
Returns whether object is serializable of not.
TetraMesh operator+(const TetraMesh &mesh) const
Helper functions for the ml ops.
Eigen::aligned_allocator< Eigen::Vector4i > Vector4i_allocator
Generic file read and write utility for python interface.
Eigen::Matrix< Index, 4, 1 > Vector4i