ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
TriangleMeshIO.cpp File Reference
#include "io/TriangleMeshIO.h"
#include <Eigen/Geometry>
#include <fstream>
#include <numeric>
#include <unordered_map>
#include <FileSystem.h>
#include <Helper.h>
#include <Logging.h>
#include <ProgressReporters.h>
#include <ecvHObjectCaster.h>
#include <ecvMesh.h>
#include <ecvPointCloud.h>
#include <ImageIO.h>
#include <rply.h>
#include <tiny_gltf.h>
#include <tiny_obj_loader.h>
#include "io/FileFormatIO.h"
Include dependency graph for TriangleMeshIO.cpp:

Go to the source code of this file.

Classes

struct  cloudViewer::io::ArrayAdapter< T >
 
struct  cloudViewer::io::IntArrayBase
 
struct  cloudViewer::io::IntArray< T >
 

Namespaces

 cloudViewer
 Generic file read and write utility for python interface.
 
 cloudViewer::ply_trianglemesh_reader
 
 cloudViewer::io
 

Functions

std::shared_ptr< ccMeshcloudViewer::io::CreateMeshFromFile (const std::string &filename, bool print_progress)
 
bool cloudViewer::io::ReadTriangleMesh (const std::string &filename, ccMesh &mesh, ReadTriangleMeshOptions params)
 
bool cloudViewer::io::WriteTriangleMesh (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
bool cloudViewer::io::IsPointInsidePolygon (const Eigen::MatrixX2d &polygon, double x, double y)
 
bool cloudViewer::io::AddTrianglesByEarClipping (ccMesh &mesh, std::vector< unsigned int > &indices)
 
bool cloudViewer::io::ReadTriangleMeshFromPLY (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool cloudViewer::io::WriteTriangleMeshToPLY (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
FileGeometry cloudViewer::io::ReadFileGeometryTypeFBX (const std::string &path)
 
FileGeometry cloudViewer::io::ReadFileGeometryTypeSTL (const std::string &path)
 
bool cloudViewer::io::ReadTriangleMeshFromSTL (const std::string &filename, ccMesh &mesh, bool print_progress)
 
bool cloudViewer::io::WriteTriangleMeshToSTL (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
FileGeometry cloudViewer::io::ReadFileGeometryTypeOBJ (const std::string &path)
 
bool cloudViewer::io::ReadTriangleMeshFromOBJ (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &)
 
bool cloudViewer::io::WriteTriangleMeshToOBJ (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
FileGeometry cloudViewer::io::ReadFileGeometryTypeOFF (const std::string &path)
 
bool cloudViewer::io::ReadTriangleMeshFromOFF (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool cloudViewer::io::WriteTriangleMeshToOFF (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 
FileGeometry cloudViewer::io::ReadFileGeometryTypeGLTF (const std::string &path)
 
bool cloudViewer::io::ReadTriangleMeshFromGLTF (const std::string &filename, ccMesh &mesh, const ReadTriangleMeshOptions &params)
 
bool cloudViewer::io::WriteTriangleMeshToGLTF (const std::string &filename, const ccMesh &mesh, bool write_ascii, bool compressed, bool write_vertex_normals, bool write_vertex_colors, bool write_triangle_uvs, bool print_progress)
 

Variable Documentation

◆ color_index

long color_index

Definition at line 48 of file TriangleMeshIO.cpp.

◆ color_num

long color_num

Definition at line 49 of file TriangleMeshIO.cpp.

◆ colors

double colors[3]

Definition at line 53 of file TriangleMeshIO.cpp.

Referenced by cloudViewer::pipelines::registration::TransformationEstimationForColoredICP::ComputeRMSE(), cloudViewer::pipelines::registration::TransformationEstimationForColoredICP::ComputeTransformation(), cloudViewer::visualization::rendering::TMeshBuffersBuilder::ConstructBuffers(), cloudViewer::t::geometry::PointCloud::CreateFromRGBDImage(), define_ccPointCloud(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingHybridSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingKNNSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingRadiusSearchCPU(), cloudViewer::t::geometry::kernel::voxel_grid::ExtractPointCloud(), cloudViewer::t::geometry::VoxelBlockGrid::ExtractPointCloud(), cloudViewer::t::geometry::kernel::voxel_grid::ExtractPointCloudCPU(), cloudViewer::t::geometry::TriangleMesh::FromLegacy(), IoUtils::newCCMeshFromAIMesh(), cloudViewer::t::geometry::kernel::pointcloud::Project(), cloudViewer::t::geometry::kernel::pointcloud::ProjectCPU(), cloudViewer::t::io::ReadPCDData(), cloudViewer::io::ReadTriangleMeshFromGLTF(), ccHistogramWindow::refresh(), ccHistogramWindow::refreshBars(), cloudViewer::t::geometry::kernel::trianglemesh::SamplePointsUniformlyCPU(), QCPColoredBars::setData(), cloudViewer::visualization::rendering::TLineSetBuffersBuilder::TLineSetBuffersBuilder(), cloudViewer::visualization::rendering::TMeshBuffersBuilder::TMeshBuffersBuilder(), cloudViewer::visualization::rendering::TPointCloudBuffersBuilder::TPointCloudBuffersBuilder(), cloudViewer::t::geometry::kernel::pointcloud::Unproject(), cloudViewer::t::geometry::kernel::pointcloud::UnprojectCPU(), and cloudViewer::t::io::WritePointCloudToPTS().

◆ face

◆ face_index

long face_index

Definition at line 51 of file TriangleMeshIO.cpp.

◆ face_num

long face_num

Definition at line 52 of file TriangleMeshIO.cpp.

◆ mesh_ptr

◆ normal_index

long normal_index

Definition at line 46 of file TriangleMeshIO.cpp.

◆ normal_num

long normal_num

Definition at line 47 of file TriangleMeshIO.cpp.

◆ normals

double normals[3]

Definition at line 54 of file TriangleMeshIO.cpp.

Referenced by NormalEstimation::compute(), MLSSmoothingUpsampling::compute(), ProjectionFilter::compute(), GreedyTriangulation::compute(), MarchingCubeReconstruction::compute(), PoissonReconstruction::compute(), cloudViewer::t::pipelines::kernel::ComputeFPFHFeature(), cloudViewer::t::pipelines::kernel::ComputeFPFHFeatureCPU(), cloudViewer::t::geometry::vtkutils::ComputeNormals(), cloudViewer::t::geometry::kernel::trianglemesh::ComputeTriangleNormalsCPU(), cloudViewer::visualization::rendering::TriangleMeshBuffersBuilder::ConstructBuffers(), cloudViewer::visualization::rendering::PointCloudBuffersBuilder::ConstructBuffers(), cloudViewer::visualization::rendering::TMeshBuffersBuilder::ConstructBuffers(), cloudViewer::visualization::rendering::TPointCloudBuffersBuilder::ConstructBuffers(), qHoughNormals::doAction(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingHybridSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingKNNSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateColorGradientsUsingRadiusSearchCPU(), cloudViewer::t::geometry::kernel::pointcloud::EstimateNormalsFromCovariancesCPU(), cloudViewer::t::geometry::kernel::voxel_grid::ExtractPointCloud(), cloudViewer::t::geometry::VoxelBlockGrid::ExtractPointCloud(), cloudViewer::t::geometry::kernel::voxel_grid::ExtractPointCloudCPU(), cloudViewer::pipelines::integration::ScalableTSDFVolume::ExtractTriangleMesh(), cloudViewer::pipelines::integration::UniformTSDFVolume::ExtractTriangleMesh(), FromFbxMesh(), cloudViewer::t::geometry::TriangleMesh::FromLegacy(), main(), cloudViewer::t::geometry::PointCloud::NormalizeNormals(), cloudViewer::t::geometry::kernel::pointcloud::NormalizeNormalsCPU(), cloudViewer::t::geometry::kernel::trianglemesh::NormalizeNormalsCPU(), cloudViewer::t::geometry::PointCloud::OrientNormalsToAlignWithDirection(), cloudViewer::t::geometry::kernel::pointcloud::OrientNormalsToAlignWithDirectionCPU(), cloudViewer::t::geometry::PointCloud::OrientNormalsTowardsCameraLocation(), cloudViewer::t::geometry::kernel::pointcloud::OrientNormalsTowardsCameraLocationCPU(), pc_save(), cloudViewer::io::ReadModelUsingAssimp(), cloudViewer::io::ReadTriangleMeshFromGLTF(), cloudViewer::t::geometry::kernel::transform::RotateNormals(), cloudViewer::t::geometry::kernel::transform::RotateNormalsCPU(), cloudViewer::t::geometry::kernel::trianglemesh::SamplePointsUniformlyCPU(), cloudViewer::io::rpc::SetPointCloud(), cloudViewer::io::rpc::SetTriangleMesh(), cloudViewer::visualization::rendering::TMeshBuffersBuilder::TMeshBuffersBuilder(), cloudViewer::visualization::rendering::TPointCloudBuffersBuilder::TPointCloudBuffersBuilder(), cloudViewer::t::geometry::kernel::transform::TransformNormals(), cloudViewer::t::geometry::kernel::transform::TransformNormalsCPU(), and cloudViewer::visualization::rendering::FilamentScene::UpdateGeometry().

◆ progress_bar

Definition at line 42 of file TriangleMeshIO.cpp.

◆ vertex_index

long vertex_index

Definition at line 44 of file TriangleMeshIO.cpp.

◆ vertex_num

long vertex_num

Definition at line 45 of file TriangleMeshIO.cpp.