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... | |
void | RemoveDuplicatedVertices () override |
void | RemoveDuplicatedTriangles () override |
void | RemoveUnreferencedVertices () override |
void | RemoveDegenerateTriangles () override |
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 |
TriangleMesh & | Transform (const Eigen::Matrix4d &transformation) override |
TriangleMesh & | Translate (const Eigen::Vector3d &translation) override |
TriangleMesh & | Scale (const double scale, bool center=true) override |
TriangleMesh & | Rotate (const Eigen::Vector3d &rotation, bool center=true, RotationType type=RotationType::XYZ) 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... | |
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< 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) | |
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 } |
|
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 | ) |
|
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.
|
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.
|
overridevirtual |
Function that removes duplicated verties, i.e., vertices that have identical coordinates.
Reimplemented from open3d::geometry::TriangleMesh.
|
overridevirtual |
This function removes vertices from the triangle mesh that are not referenced in any triangle of the mesh.
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