Open3D (C++ API)
Data Structures | Public Member Functions | Data Fields | Protected Member Functions
open3d::geometry::HalfEdgeTriangleMesh Class Reference

#include <HalfEdgeTriangleMesh.h>

Inheritance diagram for open3d::geometry::HalfEdgeTriangleMesh:
open3d::geometry::TriangleMesh open3d::geometry::Geometry3D open3d::geometry::Geometry

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...
 
HalfEdgeTriangleMeshoperator+= (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
 
TriangleMeshoperator+= (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< HalfEdgehalf_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
}
 

Constructor & Destructor Documentation

◆ HalfEdgeTriangleMesh() [1/2]

open3d::geometry::HalfEdgeTriangleMesh::HalfEdgeTriangleMesh ( )
inline

◆ HalfEdgeTriangleMesh() [2/2]

open3d::geometry::HalfEdgeTriangleMesh::HalfEdgeTriangleMesh ( Geometry::GeometryType  type)
inlineprotected

Member Function Documentation

◆ BoundaryHalfEdgesFromVertex()

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

◆ BoundaryVerticesFromVertex()

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

◆ Clear()

void open3d::geometry::HalfEdgeTriangleMesh::Clear ( )
overridevirtual

Clear all data in HalfEdgeTriangleMesh.

Implements open3d::geometry::Geometry3D.

◆ ComputeHalfEdges()

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.

◆ GetBoundaries()

std::vector< std::vector< int > > open3d::geometry::HalfEdgeTriangleMesh::GetBoundaries ( ) const

Returns a vector of boundaries. A boundary is a vector of vertices.

◆ HasHalfEdges()

bool open3d::geometry::HalfEdgeTriangleMesh::HasHalfEdges ( ) const

True if half-edges have already been computed.

◆ NextHalfEdgeFromVertex()

int open3d::geometry::HalfEdgeTriangleMesh::NextHalfEdgeFromVertex ( int  init_half_edge_index) const
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.

◆ NextHalfEdgeOnBoundary()

int open3d::geometry::HalfEdgeTriangleMesh::NextHalfEdgeOnBoundary ( int  curr_half_edge_index) const
protected

◆ operator+()

HalfEdgeTriangleMesh open3d::geometry::HalfEdgeTriangleMesh::operator+ ( const HalfEdgeTriangleMesh mesh) const

◆ operator+=()

HalfEdgeTriangleMesh & open3d::geometry::HalfEdgeTriangleMesh::operator+= ( const HalfEdgeTriangleMesh mesh)

◆ RemoveDuplicatedTriangles()

void open3d::geometry::HalfEdgeTriangleMesh::RemoveDuplicatedTriangles ( )
overrideprotectedvirtual

Reimplemented from open3d::geometry::TriangleMesh.

◆ RemoveDuplicatedVertices()

void open3d::geometry::HalfEdgeTriangleMesh::RemoveDuplicatedVertices ( )
overrideprotectedvirtual

Reimplemented from open3d::geometry::TriangleMesh.

◆ RemoveNonManifoldTriangles()

void open3d::geometry::HalfEdgeTriangleMesh::RemoveNonManifoldTriangles ( )
overrideprotectedvirtual

Reimplemented from open3d::geometry::TriangleMesh.

◆ RemoveNonManifoldVertices()

void open3d::geometry::HalfEdgeTriangleMesh::RemoveNonManifoldVertices ( )
overrideprotectedvirtual

Reimplemented from open3d::geometry::TriangleMesh.

Field Documentation

◆ half_edges_

std::vector<HalfEdge> open3d::geometry::HalfEdgeTriangleMesh::half_edges_

◆ ordered_half_edge_from_vertex_

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


The documentation for this class was generated from the following files: