Open3D (C++ API)
|
#include <HalfEdgeTriangleMesh.h>
Data Structures | |
class | HalfEdge |
Public Member Functions | |
HalfEdgeTriangleMesh () | |
virtual HalfEdgeTriangleMesh & | Clear () override |
Clear all elements in the geometry. More... | |
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... | |
HalfEdgeTriangleMesh & | operator+= (const HalfEdgeTriangleMesh &mesh) |
HalfEdgeTriangleMesh | operator+ (const HalfEdgeTriangleMesh &mesh) const |
![]() | |
MeshBase () | |
~MeshBase () override | |
virtual bool | IsEmpty () const override |
Returns true iff the geometry is empty. More... | |
virtual Eigen::Vector3d | GetMinBound () const override |
Returns min bounds for geometry coordinates. More... | |
virtual Eigen::Vector3d | GetMaxBound () const override |
Returns max bounds for geometry coordinates. More... | |
virtual Eigen::Vector3d | GetCenter () const override |
Returns the center of the geometry coordinates. More... | |
virtual AxisAlignedBoundingBox | GetAxisAlignedBoundingBox () const override |
Returns an axis-aligned bounding box of the geometry. More... | |
virtual OrientedBoundingBox | GetOrientedBoundingBox () const override |
Returns an oriented bounding box of the geometry. More... | |
virtual MeshBase & | Transform (const Eigen::Matrix4d &transformation) override |
Apply transformation (4x4 matrix) to the geometry coordinates. More... | |
virtual MeshBase & | Translate (const Eigen::Vector3d &translation, bool relative=true) override |
Apply translation to the geometry coordinates. More... | |
virtual MeshBase & | Scale (const double scale, bool center=true) override |
Apply scaling to the geometry coordinates. More... | |
virtual MeshBase & | Rotate (const Eigen::Matrix3d &R, bool center=true) override |
Apply rotation to the geometry coordinates and normals. More... | |
MeshBase & | operator+= (const MeshBase &mesh) |
MeshBase | operator+ (const MeshBase &mesh) const |
bool | HasVertices () const |
bool | HasVertexNormals () const |
bool | HasVertexColors () const |
MeshBase & | NormalizeNormals () |
MeshBase & | PaintUniformColor (const Eigen::Vector3d &color) |
Assigns each vertex in the TriangleMesh the same color. More... | |
std::tuple< std::shared_ptr< TriangleMesh >, std::vector< size_t > > | ComputeConvexHull () const |
Function that computes the convex hull of the triangle mesh using qhull. More... | |
![]() | |
~Geometry3D () override | |
![]() | |
virtual | ~Geometry () |
GeometryType | GetGeometryType () const |
Returns one of registered geometry types. More... | |
int | Dimension () const |
Returns whether the geometry is 2D or 3D. More... | |
Static Public Member Functions | |
static std::shared_ptr< HalfEdgeTriangleMesh > | CreateFromTriangleMesh (const TriangleMesh &mesh) |
![]() | |
static Eigen::Matrix3d | GetRotationMatrixFromXYZ (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from XYZ RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromYZX (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from YZX RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromZXY (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from ZXY RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromXZY (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from XZY RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromZYX (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from ZYX RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromYXZ (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from YXZ RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromAxisAngle (const Eigen::Vector3d &rotation) |
Get Rotation Matrix from AxisAngle RotationType. More... | |
static Eigen::Matrix3d | GetRotationMatrixFromQuaternion (const Eigen::Vector4d &rotation) |
Get Rotation Matrix from Quaternion. More... | |
Data Fields | |
std::vector< Eigen::Vector3i > | triangles_ |
std::vector< Eigen::Vector3d > | triangle_normals_ |
std::vector< HalfEdge > | half_edges_ |
std::vector< std::vector< int > > | ordered_half_edge_from_vertex_ |
![]() | |
std::vector< Eigen::Vector3d > | vertices_ |
std::vector< Eigen::Vector3d > | vertex_normals_ |
std::vector< Eigen::Vector3d > | vertex_colors_ |
Protected Member Functions | |
HalfEdgeTriangleMesh (Geometry::GeometryType type) | |
int | NextHalfEdgeFromVertex (int init_half_edge_index) const |
int | NextHalfEdgeOnBoundary (int curr_half_edge_index) const |
![]() | |
MeshBase (Geometry::GeometryType type) | |
MeshBase (Geometry::GeometryType type, const std::vector< Eigen::Vector3d > &vertices) | |
![]() | |
Geometry3D (GeometryType type) | |
Parameterized Constructor. More... | |
Eigen::Vector3d | ComputeMinBound (const std::vector< Eigen::Vector3d > &points) const |
Compute min bound of a list points. More... | |
Eigen::Vector3d | ComputeMaxBound (const std::vector< Eigen::Vector3d > &points) const |
Compute max bound of a list points. More... | |
Eigen::Vector3d | ComputeCenter (const std::vector< Eigen::Vector3d > &points) const |
Computer center of a list of points. More... | |
void | ResizeAndPaintUniformColor (std::vector< Eigen::Vector3d > &colors, const size_t size, const Eigen::Vector3d &color) const |
Resizes the colors vector and paints a uniform color. More... | |
void | TransformPoints (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &points) const |
Transforms all points with the transformation matrix. More... | |
void | TransformNormals (const Eigen::Matrix4d &transformation, std::vector< Eigen::Vector3d > &normals) const |
Transforms the normals with the transformation matrix. More... | |
void | TranslatePoints (const Eigen::Vector3d &translation, std::vector< Eigen::Vector3d > &points, bool relative) const |
Apply translation to the geometry coordinates. More... | |
void | ScalePoints (const double scale, std::vector< Eigen::Vector3d > &points, bool center) const |
Scale the coordinates of all points by the scaling factor scale . More... | |
void | RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, bool center) const |
Rotate all points with the rotation matrix R . More... | |
void | RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals, bool center) const |
Rotate all normals with the rotation matrix R . More... | |
![]() | |
Geometry (GeometryType type, int dimension) | |
Parameterized Constructor. More... | |
Additional Inherited Members | |
![]() | |
enum | SimplificationContraction { SimplificationContraction::Average, SimplificationContraction::Quadric } |
enum | FilterScope { FilterScope::All, FilterScope::Color, FilterScope::Normal, FilterScope::Vertex } |
![]() | |
enum | GeometryType { GeometryType::Unspecified = 0, GeometryType::PointCloud = 1, GeometryType::VoxelGrid = 2, GeometryType::Octree = 3, GeometryType::LineSet = 4, GeometryType::MeshBase = 5, GeometryType::TriangleMesh = 6, GeometryType::HalfEdgeTriangleMesh = 7, GeometryType::Image = 8, GeometryType::RGBDImage = 9, GeometryType::TetraMesh = 10, GeometryType::OrientedBoundingBox = 11, GeometryType::AxisAlignedBoundingBox = 12 } |
Specifies possible geometry types. More... | |
|
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 elements in the geometry.
Reimplemented from open3d::geometry::MeshBase.
|
static |
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 | ) |
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
std::vector<Eigen::Vector3d> open3d::geometry::HalfEdgeTriangleMesh::triangle_normals_ |
std::vector<Eigen::Vector3i> open3d::geometry::HalfEdgeTriangleMesh::triangles_ |