mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
fixed build error backward compatibility pcl 1.7 < pcl 1.8
This commit is contained in:
@@ -48,6 +48,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <pcl/io/ply_io.h>
|
#include <pcl/io/ply_io.h>
|
||||||
#include <pcl/io/vtk_io.h>
|
#include <pcl/io/vtk_io.h>
|
||||||
#include <pcl/io/obj_io.h>
|
#include <pcl/io/obj_io.h>
|
||||||
|
#include <pcl/pcl_config.h>
|
||||||
|
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -1295,7 +1296,11 @@ bool ExportCloudsDialog::getExportedClouds(
|
|||||||
{
|
{
|
||||||
// When not saving to file, tex_coordinates should be linked to points, not polygon vertices
|
// When not saving to file, tex_coordinates should be linked to points, not polygon vertices
|
||||||
int nPoints = textureMesh->cloud.data.size()/textureMesh->cloud.point_step;
|
int nPoints = textureMesh->cloud.data.size()/textureMesh->cloud.point_step;
|
||||||
|
#if PCL_VERSION_COMPARE(>=, 1, 8, 0)
|
||||||
std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > tmpCoordinates = textureMesh->tex_coordinates[0];
|
std::vector<Eigen::Vector2f, Eigen::aligned_allocator<Eigen::Vector2f> > tmpCoordinates = textureMesh->tex_coordinates[0];
|
||||||
|
#else
|
||||||
|
std::vector<Eigen::Vector2f> tmpCoordinates = textureMesh->tex_coordinates[0];
|
||||||
|
#endif
|
||||||
textureMesh->tex_coordinates[0].resize(nPoints);
|
textureMesh->tex_coordinates[0].resize(nPoints);
|
||||||
|
|
||||||
int polygonSize = textureMesh->tex_polygons[0][0].vertices.size();
|
int polygonSize = textureMesh->tex_polygons[0][0].vertices.size();
|
||||||
|
|||||||
Reference in New Issue
Block a user