Open3D (C++ API)
|
#include <HalfEdgeTriangleMesh.h>
Data Structures | |
class | HalfEdge |
Public Member Functions | |
HalfEdgeTriangleMesh () | |
bool | ComputeHalfEdges () |
bool | HasHalfEdges () const |
True if half-edges have already been computed. More... | |
std::vector< int > | BoundaryHalfEdgesFromVertex (int vertex_index) const |
std::vector< int > | BoundaryVerticesFromVertex (int vertex_index) const |
std::vector< std::vector< int > > | GetBoundaries () const |
Returns a vector of boundaries. A boundary is a vector of vertices. More... | |
void | Clear () override |
Clear all data in HalfEdgeTriangleMesh. More... | |
HalfEdgeTriangleMesh & | operator+= (const HalfEdgeTriangleMesh &mesh) |
HalfEdgeTriangleMesh | operator+ (const HalfEdgeTriangleMesh &mesh) const |
Public Member Functions inherited from open3d::geometry::TriangleMesh | |
TriangleMesh () | |
~TriangleMesh () override | |
void | Clear () override |
bool | IsEmpty () const override |
Eigen::Vector3d | GetMinBound () const override |
Eigen::Vector3d | GetMaxBound () const override |
void | Transform (const Eigen::Matrix4d &transformation) override |
TriangleMesh & | operator+= (const TriangleMesh &mesh) |
TriangleMesh | operator+ (const TriangleMesh &mesh) const |
void | ComputeTriangleNormals (bool normalized=true) |
Function to compute triangle normals, usually called before rendering. More... | |
void | ComputeVertexNormals (bool normalized=true) |
Function to compute vertex normals, usually called before rendering. More... | |
void | ComputeAdjacencyList () |
Function to compute adjacency list, call before adjacency list is needed. More... | |
void | Purge () |
Function to remove duplicated and non-manifold vertices/triangles. More... | |
bool | HasVertices () const |
bool | HasTriangles () const |
bool | HasVertexNormals () const |
bool | HasVertexColors () const |
bool | HasTriangleNormals () const |
bool | HasAdjacencyList () const |
void | NormalizeNormals () |
void | PaintUniformColor (const Eigen::Vector3d &color) |
Public Member Functions inherited from open3d::geometry::Geometry3D | |
~Geometry3D () override | |
Public Member Functions inherited from open3d::geometry::Geometry | |
virtual | ~Geometry () |
GeometryType | GetGeometryType () const |
int | Dimension () const |
Data Fields | |
std::vector< HalfEdge > | half_edges_ |
std::vector< std::vector< int > > | ordered_half_edge_from_vertex_ |
Data Fields inherited from open3d::geometry::TriangleMesh | |
std::vector< Eigen::Vector3d > | vertices_ |
std::vector< Eigen::Vector3d > | vertex_normals_ |
std::vector< Eigen::Vector3d > | vertex_colors_ |
std::vector< Eigen::Vector3i > | triangles_ |
std::vector< Eigen::Vector3d > | triangle_normals_ |
std::vector< std::unordered_set< int > > | adjacency_list_ |
Protected Member Functions | |
HalfEdgeTriangleMesh (Geometry::GeometryType type) | |
void | RemoveDuplicatedVertices () override |
void | RemoveDuplicatedTriangles () override |
void | RemoveNonManifoldVertices () override |
void | RemoveNonManifoldTriangles () override |
int | NextHalfEdgeFromVertex (int init_half_edge_index) const |
int | NextHalfEdgeOnBoundary (int curr_half_edge_index) const |
Protected Member Functions inherited from open3d::geometry::TriangleMesh | |
TriangleMesh (Geometry::GeometryType type) | |
Protected Member Functions inherited from open3d::geometry::Geometry3D | |
Geometry3D (GeometryType type) | |
Protected Member Functions inherited from open3d::geometry::Geometry | |
Geometry (GeometryType type, int dimension) | |
Additional Inherited Members | |
Public Types inherited from open3d::geometry::Geometry | |
enum | GeometryType { GeometryType::Unspecified = 0, GeometryType::PointCloud = 1, GeometryType::VoxelGrid = 2, GeometryType::Octree = 3, GeometryType::LineSet = 4, GeometryType::TriangleMesh = 5, GeometryType::HalfEdgeTriangleMesh = 6, GeometryType::Image = 7 } |
|
inline |
|
inlineprotected |
std::vector< int > open3d::geometry::HalfEdgeTriangleMesh::BoundaryHalfEdgesFromVertex | ( | int | vertex_index | ) | const |
Query manifold boundary half edges from a starting vertex If query vertex is not on boundary, empty vector will be returned
std::vector< int > open3d::geometry::HalfEdgeTriangleMesh::BoundaryVerticesFromVertex | ( | int | vertex_index | ) | const |
Query manifold boundary vertices from a starting vertex If query vertex is not on boundary, empty vector will be returned
|
overridevirtual |
Clear all data in HalfEdgeTriangleMesh.
Implements open3d::geometry::Geometry3D.
bool open3d::geometry::HalfEdgeTriangleMesh::ComputeHalfEdges | ( | ) |
Compute and update half edges, half edge can only be computed if the mesh is a manifold. Returns true if half edges are computed.
std::vector< std::vector< int > > open3d::geometry::HalfEdgeTriangleMesh::GetBoundaries | ( | ) | const |
Returns a vector of boundaries. A boundary is a vector of vertices.
bool open3d::geometry::HalfEdgeTriangleMesh::HasHalfEdges | ( | ) | const |
True if half-edges have already been computed.
|
protected |
Returns the next half edge from starting vertex of the input half edge, in a counterclock wise manner. Returns -1 if when hitting a boundary. This is done by traversing to the next, next and twin half edge.
|
protected |
HalfEdgeTriangleMesh open3d::geometry::HalfEdgeTriangleMesh::operator+ | ( | const HalfEdgeTriangleMesh & | mesh | ) | const |
HalfEdgeTriangleMesh & open3d::geometry::HalfEdgeTriangleMesh::operator+= | ( | const HalfEdgeTriangleMesh & | mesh | ) |
|
overrideprotectedvirtual |
Reimplemented from open3d::geometry::TriangleMesh.
|
overrideprotectedvirtual |
Reimplemented from open3d::geometry::TriangleMesh.
|
overrideprotectedvirtual |
Reimplemented from open3d::geometry::TriangleMesh.
|
overrideprotectedvirtual |
Reimplemented from open3d::geometry::TriangleMesh.
std::vector<HalfEdge> open3d::geometry::HalfEdgeTriangleMesh::half_edges_ |
std::vector<std::vector<int> > open3d::geometry::HalfEdgeTriangleMesh::ordered_half_edge_from_vertex_ |
Counter-clockwise ordered half-edges started from each vertex If the vertex is on boundary, the starting edge must be on boundary too