diff --git a/CI/ci-linux-build.sh b/CI/ci-linux-build.sh index eb64b64d..8a3a5fca 100755 --- a/CI/ci-linux-build.sh +++ b/CI/ci-linux-build.sh @@ -58,6 +58,9 @@ else # build unittests make $MAKE_OPTIONS unittests + ldd Unittests/unittests + + # Creating System Library folder to contain all dependend libraries to run OpenFlipper if [ ! -d systemlib ]; then echo "Creating systemlib folder" @@ -72,4 +75,4 @@ else fi fi -cd .. \ No newline at end of file +cd .. diff --git a/CI/ci-linux-test.sh b/CI/ci-linux-test.sh index 063e3781..0fedf3ae 100755 --- a/CI/ci-linux-test.sh +++ b/CI/ci-linux-test.sh @@ -60,6 +60,8 @@ echo -e "${NC}" cd Unittests +ldd ./unittests + #execute tests ./unittests --gtest_color=yes --gtest_output=xml:./report.xml diff --git a/Doc/changelog.docu b/Doc/changelog.docu index 1b5e0bf2..385679c7 100644 --- a/Doc/changelog.docu +++ b/Doc/changelog.docu @@ -33,6 +33,7 @@
  • OM Writer: Removed debug output
  • OM Writer/Reader: Added support for (re)storing properties of type vector
  • OM Reader: Properties can now be restored from files without the need to create the properties beforehand. Custom types need to be registered for this to work using the OM_REGISTER_PROPERTY_TYPE macro.
  • +
  • PLY writer: Added option to choose if we want to write texture coordinates as uv or st (Thanks to Ossi Saukko from Centria Research and Development for the patch)
  • Tools diff --git a/cmake-library b/cmake-library index f235866f..44f85cf6 160000 --- a/cmake-library +++ b/cmake-library @@ -1 +1 @@ -Subproject commit f235866ffe218fc6e440de27622d6c8a1e1210a5 +Subproject commit 44f85cf6ddf7d58676795a0bd3c258bbd5f56700 diff --git a/src/OpenMesh/Core/IO/IOManager.cc b/src/OpenMesh/Core/IO/IOManager.cc index 8b3a4193..bdc77859 100644 --- a/src/OpenMesh/Core/IO/IOManager.cc +++ b/src/OpenMesh/Core/IO/IOManager.cc @@ -241,13 +241,13 @@ find_writer(const std::string& _format) { using std::string; - string::size_type dot = _format.rfind('.'); + string::size_type dotpos = _format.rfind('.'); string ext; - if (dot == string::npos) + if (dotpos == string::npos) ext = _format; else - ext = _format.substr(dot+1,_format.length()-(dot+1)); + ext = _format.substr(dotpos+1,_format.length()-(dotpos+1)); std::set::const_iterator it = writer_modules_.begin(); std::set::const_iterator it_end = writer_modules_.end(); diff --git a/src/OpenMesh/Core/IO/Options.hh b/src/OpenMesh/Core/IO/Options.hh index 2e642180..347098af 100644 --- a/src/OpenMesh/Core/IO/Options.hh +++ b/src/OpenMesh/Core/IO/Options.hh @@ -111,7 +111,8 @@ public: ColorAlpha = 0x0800, ///< Has (r) / store (w) alpha values for colors ColorFloat = 0x1000, ///< Has (r) / store (w) float values for colors (currently only implemented for PLY and OFF files) Custom = 0x2000, ///< Has (r) custom properties (currently only implemented in PLY Reader ASCII version) - Status = 0x4000 ///< Has (r) / store (w) status properties + Status = 0x4000, ///< Has (r) / store (w) status properties + TexCoordST = 0x8000 ///< Write texture coordinates as ST instead of UV }; public: @@ -212,6 +213,7 @@ public: bool face_has_status() const { return check(Status); } bool color_has_alpha() const { return check(ColorAlpha); } bool color_is_float() const { return check(ColorFloat); } + bool use_st_coordinates() const { return check(TexCoordST); } /// Returns true if _rhs has the same options enabled. diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc index 681fbfb1..b83dde24 100644 --- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc @@ -327,7 +327,7 @@ write(std::ostream& _out, BaseExporter& _be, Options _opt, std::streamsize _prec { if (useMatrial && _opt.check(Options::FaceColor) ){ - size_t material = std::numeric_limits::max(); + size_t material; //color with alpha if ( _opt.color_has_alpha() ){ diff --git a/src/OpenMesh/Core/IO/writer/PLYWriter.cc b/src/OpenMesh/Core/IO/writer/PLYWriter.cc index 49db3ec6..dc9e864a 100644 --- a/src/OpenMesh/Core/IO/writer/PLYWriter.cc +++ b/src/OpenMesh/Core/IO/writer/PLYWriter.cc @@ -278,8 +278,13 @@ void _PLYWriter_::write_header(std::ostream& _out, BaseExporter& _be, Options& _ } if ( _opt.vertex_has_texcoord() ){ - _out << "property float u" << '\n'; - _out << "property float v" << '\n'; + if ( _opt.use_st_coordinates() ){ + _out << "property float s" << '\n'; + _out << "property float t" << '\n'; + } else { + _out << "property float u" << '\n'; + _out << "property float v" << '\n'; + } } if ( _opt.vertex_has_color() ){