- read_mesh now throws a compile error if an Options::Flag enum is passed as an argument instead of an Options object

- added a unit test for writing and reading vertex colors to and from an OFF file. The default color type Vec3uc from DefaultTraits in Traits.hh is used.

refs #1404

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@809 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Isaak Lim
2013-02-25 13:30:56 +00:00
parent 9a69c39b60
commit 740d23ed36
2 changed files with 52 additions and 7 deletions

View File

@@ -89,19 +89,16 @@ namespace IO {
@param _mesh The target mesh that will be filled with the read data
@param _filename fill to load
@param _clear Clear the target data before filling it (allows to
load multiple files into one Mesh)
@return Successful?
*/
template <class Mesh>
bool
read_mesh(Mesh& _mesh,
const std::string& _filename,
bool _clear = true)
const std::string& _filename)
{
Options opt;
return read_mesh(_mesh, _filename, opt, _clear);
return read_mesh(_mesh, _filename, opt, true);
}
@@ -116,9 +113,12 @@ read_mesh(Mesh& _mesh,
@param _mesh The target mesh that will be filled with the read data
@param _filename fill to load
@param _opt Reader options (e.g. skip loading of normals ... depends
on the reader capabilities)
on the reader capabilities). Note that simply passing an
Options::Flag enum is not sufficient.
@param _clear Clear the target data before filling it (allows to
load multiple files into one Mesh)
load multiple files into one Mesh). If you only want to read a mesh
without clearing set _clear to false. Providing a default Options
object is sufficient in this case.
@return Successful?
*/