Open3D (C++ API)
0.18.0+252c867
|
Tetra mesh contains vertices and tetrahedra represented by the indices to the vertices. More...
#include <TetraMesh.h>
Public Member Functions | |
TetraMesh () | |
Default Constructor. More... | |
TetraMesh (const std::vector< Eigen::Vector3d > &vertices, const std::vector< Eigen::Vector4i, utility::Vector4i_allocator > &tetras) | |
Parameterized Constructor. More... | |
~TetraMesh () override | |
TetraMesh & | Clear () override |
Clear all elements in the geometry. More... | |
TetraMesh & | operator+= (const TetraMesh &mesh) |
TetraMesh | operator+ (const TetraMesh &mesh) const |
TetraMesh & | RemoveDuplicatedVertices () |
Function that removes duplicated verties, i.e., vertices that have identical coordinates. More... | |
TetraMesh & | RemoveDuplicatedTetras () |
Function that removes duplicated tetrahedra, i.e., removes tetrahedra that reference the same four vertices, independent of their order. More... | |
TetraMesh & | RemoveUnreferencedVertices () |
This function removes vertices from the tetra mesh that are not referenced in any tetrahedron of the mesh. More... | |
TetraMesh & | RemoveDegenerateTetras () |
Function that removes degenerate tetrahedra, i.e., tetrahedra that reference a single vertex multiple times in a single tetrahedron. They are usually the product of removing duplicated vertices. More... | |
bool | HasTetras () const |
Returns true if the mesh contains tetras. More... | |
std::shared_ptr< TriangleMesh > | ExtractTriangleMesh (const std::vector< double > &values, double level) |
Function to extract a triangle mesh of the specified iso-surface at a level This method applies primal contouring and generates triangles for each tetrahedron. More... | |
![]() | |
MeshBase () | |
Default Constructor. More... | |
~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 |
virtual OrientedBoundingBox | GetOrientedBoundingBox (bool robust=false) const override |
virtual OrientedBoundingBox | GetMinimalOrientedBoundingBox (bool robust=false) const override |
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, const Eigen::Vector3d ¢er) override |
Apply scaling to the geometry coordinates. Given a scaling factor s, and center c, a given point p is transformed according to s (p - c) + c. More... | |
virtual MeshBase & | Rotate (const Eigen::Matrix3d &R, const Eigen::Vector3d ¢er) override |
Apply rotation to the geometry coordinates and normals. Given a rotation matrix R, and center c, a given point p is transformed according to R (p - c) + c. More... | |
MeshBase & | operator+= (const MeshBase &mesh) |
MeshBase | operator+ (const MeshBase &mesh) const |
bool | HasVertices () const |
Returns True if the mesh contains vertices. More... | |
bool | HasVertexNormals () const |
Returns True if the mesh contains vertex normals. More... | |
bool | HasVertexColors () const |
Returns True if the mesh contains vertex colors. More... | |
MeshBase & | NormalizeNormals () |
Normalize vertex normals to length 1. More... | |
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 Geometry3D & | Rotate (const Eigen::Matrix3d &R) |
![]() | |
virtual | ~Geometry () |
GeometryType | GetGeometryType () const |
Returns one of registered geometry types. More... | |
int | Dimension () const |
Returns whether the geometry is 2D or 3D. More... | |
std::string | GetName () const |
void | SetName (const std::string &name) |
Static Public Member Functions | |
static std::tuple< std::shared_ptr< TetraMesh >, std::vector< size_t > > | CreateFromPointCloud (const PointCloud &point_cloud) |
Function that creates a tetrahedral mesh (TetraMeshFactory.cpp). from a point cloud. More... | |
![]() | |
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::Vector4i, utility::Vector4i_allocator > | tetras_ |
List of tetras denoted by the index of points forming the tetra. More... | |
![]() | |
std::vector< Eigen::Vector3d > | vertices_ |
Vertex coordinates. More... | |
std::vector< Eigen::Vector3d > | vertex_normals_ |
Vertex normals. More... | |
std::vector< Eigen::Vector3d > | vertex_colors_ |
RGB colors of vertices. More... | |
Protected Member Functions | |
TetraMesh (Geometry::GeometryType type) | |
![]() | |
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 | TransformCovariances (const Eigen::Matrix4d &transformation, std::vector< Eigen::Matrix3d > &covariances) const |
Transforms all covariance matrices with the transformation. 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, const Eigen::Vector3d ¢er) const |
Scale the coordinates of all points by the scaling factor scale . More... | |
void | RotatePoints (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &points, const Eigen::Vector3d ¢er) const |
Rotate all points with the rotation matrix R . More... | |
void | RotateNormals (const Eigen::Matrix3d &R, std::vector< Eigen::Vector3d > &normals) const |
Rotate all normals with the rotation matrix R . More... | |
void | RotateCovariances (const Eigen::Matrix3d &R, std::vector< Eigen::Matrix3d > &covariances) const |
Rotate all covariance matrices with the rotation matrix R . More... | |
![]() | |
Geometry (GeometryType type, int dimension) | |
Parameterized Constructor. More... | |
Additional Inherited Members | |
![]() | |
enum class | SimplificationContraction { Average , Quadric } |
Indicates the method that is used for mesh simplification if multiple vertices are combined to a single one. More... | |
enum class | FilterScope { All , Color , Normal , Vertex } |
Indicates the scope of filter operations. More... | |
enum class | DeformAsRigidAsPossibleEnergy { Spokes , Smoothed } |
![]() | |
enum class | GeometryType { Unspecified = 0 , PointCloud = 1 , VoxelGrid = 2 , Octree = 3 , LineSet = 4 , MeshBase = 5 , TriangleMesh = 6 , HalfEdgeTriangleMesh = 7 , Image = 8 , RGBDImage = 9 , TetraMesh = 10 , OrientedBoundingBox = 11 , AxisAlignedBoundingBox = 12 } |
Specifies possible geometry types. More... | |
Tetra mesh contains vertices and tetrahedra represented by the indices to the vertices.
|
inline |
Default Constructor.
|
inline |
Parameterized Constructor.
vertices | Vertex coordinates. |
tetras | List of tetras denoted by the index of points forming the tetra. |
|
inlineoverride |
|
inlineprotected |
|
overridevirtual |
Clear all elements in the geometry.
Reimplemented from open3d::geometry::MeshBase.
|
static |
Function that creates a tetrahedral mesh (TetraMeshFactory.cpp). from a point cloud.
The method creates the Delaunay triangulation using the implementation from Qhull.
std::shared_ptr< TriangleMesh > open3d::geometry::TetraMesh::ExtractTriangleMesh | ( | const std::vector< double > & | values, |
double | level | ||
) |
Function to extract a triangle mesh of the specified iso-surface at a level This method applies primal contouring and generates triangles for each tetrahedron.
level | specifies the level. |
values | specifies values per-vertex. |
|
inline |
Returns true
if the mesh contains tetras.
TetraMesh & open3d::geometry::TetraMesh::RemoveDegenerateTetras | ( | ) |
Function that removes degenerate tetrahedra, i.e., tetrahedra that reference a single vertex multiple times in a single tetrahedron. They are usually the product of removing duplicated vertices.
TetraMesh & open3d::geometry::TetraMesh::RemoveDuplicatedTetras | ( | ) |
Function that removes duplicated tetrahedra, i.e., removes tetrahedra that reference the same four vertices, independent of their order.
TetraMesh & open3d::geometry::TetraMesh::RemoveDuplicatedVertices | ( | ) |
Function that removes duplicated verties, i.e., vertices that have identical coordinates.
TetraMesh & open3d::geometry::TetraMesh::RemoveUnreferencedVertices | ( | ) |
This function removes vertices from the tetra mesh that are not referenced in any tetrahedron of the mesh.
std::vector<Eigen::Vector4i, utility::Vector4i_allocator> open3d::geometry::TetraMesh::tetras_ |
List of tetras denoted by the index of points forming the tetra.