Commit 2aa69c05 authored by Matthias Möller's avatar Matthias Möller

- fix: alphacolor per face is saved only once

- fix: removed spaces in OFF Header

refs #1475
refs #1477

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16724 383ad7c9-94d9-4d36-a494-682f7c89f535
parent f70cf5d2
...@@ -58,17 +58,17 @@ bool FileOFFPlugin::writeMesh(std::ostream& _out, MeshT& _mesh, BaseObject &_bas ...@@ -58,17 +58,17 @@ bool FileOFFPlugin::writeMesh(std::ostream& _out, MeshT& _mesh, BaseObject &_bas
// Write option ST // Write option ST
if(_mesh.has_vertex_texcoords2D() && (userWriteOptions_ & OFFImporter::VERTEXTEXCOORDS) ) { if(_mesh.has_vertex_texcoords2D() && (userWriteOptions_ & OFFImporter::VERTEXTEXCOORDS) ) {
_out << "ST "; _out << "ST";
} }
// Write option C // Write option C
if(_mesh.has_vertex_colors() && (userWriteOptions_ & OFFImporter::VERTEXCOLOR) ) { if(_mesh.has_vertex_colors() && (userWriteOptions_ & OFFImporter::VERTEXCOLOR) ) {
_out << "C "; _out << "C";
} }
// Write option N // Write option N
if(_mesh.has_vertex_normals() && (userWriteOptions_ & OFFImporter::VERTEXNORMAL) ) { if(_mesh.has_vertex_normals() && (userWriteOptions_ & OFFImporter::VERTEXNORMAL) ) {
_out << "N "; _out << "N";
} }
// Write // Write
...@@ -181,7 +181,7 @@ bool FileOFFPlugin::writeASCIIData(std::ostream& _out, MeshT& _mesh ) { ...@@ -181,7 +181,7 @@ bool FileOFFPlugin::writeASCIIData(std::ostream& _out, MeshT& _mesh ) {
// Write face colors // Write face colors
if(_mesh.has_face_colors() && (userWriteOptions_ & OFFImporter::FACECOLOR ) ) { if(_mesh.has_face_colors() && (userWriteOptions_ & OFFImporter::FACECOLOR ) ) {
c = OpenMesh::color_cast<OpenMesh::Vec4f> (_mesh.color(fit.handle())); c = OpenMesh::color_cast<OpenMesh::Vec4f> (_mesh.color(fit.handle()));
_out << " " << std::showpoint << c[0] << " " << std::showpoint << c[1] << " " << std::showpoint << c[2] << " " << std::showpoint << c[3]; _out << " " << std::showpoint << c[0] << " " << std::showpoint << c[1] << " " << std::showpoint << c[2];
if(userWriteOptions_ & OFFImporter::COLORALPHA) _out << " " << std::showpoint << c[3]; if(userWriteOptions_ & OFFImporter::COLORALPHA) _out << " " << std::showpoint << c[3];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment