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...
 
void RemoveDuplicatedVertices () override
 
void RemoveDuplicatedTriangles () override
 
void RemoveUnreferencedVertices () override
 
void RemoveDegenerateTriangles () override
 
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
 
TriangleMeshTransform (const Eigen::Matrix4d &transformation) override
 
TriangleMeshTranslate (const Eigen::Vector3d &translation) override
 
TriangleMeshScale (const double scale, bool center=true) override
 
TriangleMeshRotate (const Eigen::Vector3d &rotation, bool center=true, RotationType type=RotationType::XYZ) 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...
 
virtual void RemoveNonManifoldEdges ()
 
void FilterSharpen (int number_of_iterations, double strength, FilterScope scope=FilterScope::All)
 
void FilterSmoothSimple (int number_of_iterations, FilterScope scope=FilterScope::All)
 
void FilterSmoothLaplacian (int number_of_iterations, double lambda, FilterScope scope=FilterScope::All)
 
void FilterSmoothTaubin (int number_of_iterations, double lambda=0.5, double mu=-0.53, FilterScope scope=FilterScope::All)
 
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)
 Assigns each vertex in the TriangleMesh the same color. More...
 
int EulerPoincareCharacteristic () const
 
std::vector< Eigen::Vector2i > GetNonManifoldEdges (bool allow_boundary_edges=true) const
 
bool IsEdgeManifold (bool allow_boundary_edges=true) const
 
std::vector< int > GetNonManifoldVertices () const
 
bool IsVertexManifold () const
 
std::vector< Eigen::Vector2i > GetSelfIntersectingTriangles () const
 
bool IsSelfIntersecting () const
 
bool IsBoundingBoxIntersecting (const TriangleMesh &other) const
 
bool IsIntersecting (const TriangleMesh &other) const
 
bool IsOrientable () const
 
bool OrientTriangles ()
 
std::unordered_map< Eigen::Vector2i, std::vector< int >, utility::hash_eigen::hash< Eigen::Vector2i > > GetEdgeToTrianglesMap () const
 
double GetTriangleArea (size_t triangle_idx) const
 
double GetSurfaceArea () const
 
double GetSurfaceArea (std::vector< double > &triangle_areas) const
 
Eigen::Vector4d GetTrianglePlane (size_t triangle_idx) const
 
- 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)
 
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)
 
Eigen::Matrix3d GetRotationMatrix (const Eigen::Vector3d &rotation, RotationType type=RotationType::XYZ) const
 
- Protected Member Functions inherited from open3d::geometry::Geometry
 Geometry (GeometryType type, int dimension)
 

Additional Inherited Members

- Public Types inherited from open3d::geometry::TriangleMesh
enum  SimplificationContraction { SimplificationContraction::Average, SimplificationContraction::Quadric }
 
enum  FilterScope { FilterScope::All, FilterScope::Color, FilterScope::Normal, FilterScope::Vertex }
 
- Public Types inherited from open3d::geometry::Geometry3D
enum  RotationType {
  RotationType::XYZ, RotationType::YZX, RotationType::ZXY, RotationType::XZY,
  RotationType::ZYX, RotationType::YXZ, RotationType::AxisAngle
}
 
- 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)

◆ RemoveDegenerateTriangles()

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

Function that removes degenerate triangles, i.e., triangles that references a single vertex multiple times in a single triangle. They are usually the product of removing duplicated vertices.

Reimplemented from open3d::geometry::TriangleMesh.

◆ RemoveDuplicatedTriangles()

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

Function that removes duplicated triangles, i.e., removes triangles that reference the same three vertices, independent of their order.

Reimplemented from open3d::geometry::TriangleMesh.

◆ RemoveDuplicatedVertices()

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

Function that removes duplicated verties, i.e., vertices that have identical coordinates.

Reimplemented from open3d::geometry::TriangleMesh.

◆ RemoveUnreferencedVertices()

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

This function removes vertices from the triangle mesh that are not referenced in any triangle of the mesh.

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: