40 #include <pcl/TextureMesh.h>
41 #include <pcl/io/file_io.h>
61 read (
const std::string& filename);
69 read (
const std::string& obj_file_name,
const std::string& mtl_file_name);
71 std::vector<pcl::TexMaterial>::const_iterator
88 Eigen::Matrix3f xyz_to_rgb_matrix_;
123 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
124 int &file_version,
int &data_type,
unsigned int &data_idx,
125 const int offset)
override;
144 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
145 int &file_version,
const int offset = 0)
override;
177 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
178 int &file_version,
const int offset = 0);
206 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation,
207 int &file_version,
const int offset = 0);
231 template<
typename Po
intT>
inline int
238 file_version, offset);
248 std::vector<pcl::MTLReader> companions_;
262 Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
266 return (p.
read (file_name, cloud, origin, orientation, obj_version));
280 return (p.
read (file_name, cloud));
288 template<
typename Po
intT>
inline int
292 return (p.
read (file_name, cloud));
306 return (p.
read (file_name, mesh));
320 return (p.
read (file_name, mesh));
333 unsigned precision = 5);
344 unsigned precision = 5);
Point Cloud Data (FILE) file format reader interface.
virtual ~MTLReader()=default
empty destructor
int read(const std::string &filename)
Read a MTL file given its full path.
std::vector< pcl::TexMaterial >::const_iterator getMaterial(const std::string &material_name) const
MTLReader()
empty constructor
std::vector< pcl::TexMaterial > materials_
materials array
int read(const std::string &obj_file_name, const std::string &mtl_file_name)
Read a MTL file given an OBJ file full path and the MTL file name.
int read(const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0) override
Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2.
~OBJReader() override=default
empty destructor
int read(const std::string &file_name, pcl::TextureMesh &mesh, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0)
Read a point cloud data from a FILE file and store it into a pcl/TextureMesh.
int read(const std::string &file_name, pcl::PolygonMesh &mesh, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, const int offset=0)
Read a point cloud data from a FILE file and store it into a pcl/PolygonMesh.
int readHeader(const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation, int &file_version, int &data_type, unsigned int &data_idx, const int offset) override
Read a point cloud data header from a FILE file.
int read(const std::string &file_name, pcl::PCLPointCloud2 &cloud, const int offset=0)
Read a point cloud data from a FILE file and store it into a pcl/PCLPointCloud2.
int read(const std::string &file_name, pcl::PolygonMesh &mesh, const int offset=0)
Read a point cloud data from a FILE file and store it into a pcl/PolygonMesh.
int read(const std::string &file_name, pcl::PointCloud< PointT > &cloud, const int offset=0)
Read a point cloud data from any FILE file, and convert it to the given template format.
OBJReader()=default
empty constructor
int read(const std::string &file_name, pcl::TextureMesh &mesh, const int offset=0)
Read a point cloud data from a FILE file and store it into a pcl/TextureMesh.
PointCloud represents the base class in PCL for storing collections of 3D points.
Eigen::Quaternionf sensor_orientation_
Sensor acquisition pose (rotation).
Eigen::Vector4f sensor_origin_
Sensor acquisition pose (origin/translation).
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
PCL_EXPORTS int saveOBJFile(const std::string &file_name, const pcl::TextureMesh &tex_mesh, unsigned precision=5)
Saves a TextureMesh in ascii OBJ format.
int loadOBJFile(const std::string &file_name, pcl::PCLPointCloud2 &cloud, Eigen::Vector4f &origin, Eigen::Quaternionf &orientation)
Load any OBJ file into a templated PointCloud type.
Defines functions, macros and traits for allocating and using memory.
void read(std::istream &stream, Type &value)
Function for reading data from a stream.
void fromPCLPointCloud2(const pcl::PCLPointCloud2 &msg, pcl::PointCloud< PointT > &cloud, const MsgFieldMap &field_map, const std::uint8_t *msg_data)
Convert a PCLPointCloud2 binary data blob into a pcl::PointCloud<T> object using a field_map.