Write color property as correct data type to file. Closes #262.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@529 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Mike Kremer
2012-01-24 12:22:27 +00:00
parent ef47a33314
commit 94804e95f7

View File

@@ -172,8 +172,8 @@ write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
unsigned int i, j, nV, nF; unsigned int i, j, nV, nF;
Vec3f v, n; Vec3f v, n;
OpenMesh::Vec3f c; OpenMesh::Vec3uc c;
OpenMesh::Vec4f cA; OpenMesh::Vec4uc cA;
OpenMesh::Vec2f t; OpenMesh::Vec2f t;
VertexHandle vh; VertexHandle vh;
std::vector<VertexHandle> vhandles; std::vector<VertexHandle> vhandles;
@@ -199,12 +199,12 @@ write_ascii(std::ostream& _out, BaseExporter& _be, Options _opt) const
} }
if ( _opt.vertex_has_color() ){ if ( _opt.vertex_has_color() ){
_out << "property int32 red" << std::endl; _out << "property uint8 red" << std::endl;
_out << "property int32 green" << std::endl; _out << "property uint8 green" << std::endl;
_out << "property int32 blue" << std::endl; _out << "property uint8 blue" << std::endl;
if ( _opt.color_has_alpha() ) if ( _opt.color_has_alpha() )
_out << "property int32 alpha" << std::endl; _out << "property uint8 alpha" << std::endl;
} }
_out << "element face " << _be.n_faces() << std::endl; _out << "element face " << _be.n_faces() << std::endl;