fixed build error backward compatibility pcl 1.7 < pcl 1.8

This commit is contained in:
matlabbe
2016-10-24 16:31:57 -04:00
parent 5d1ea43b9e
commit 49cb35175f

View File

@@ -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();