Commit 00d7449f authored by Isaak Lim's avatar Isaak Lim

use direct color_cast to Vec3ui instead of casting to Vec3uc first

refs #1405

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16418 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 933f2b03
......@@ -928,8 +928,7 @@ bool FilePLYPlugin::writeMeshFileAscii(QString _filename, MeshT* _mesh) {
// Write vertex color
if(vColors) {
c = _mesh->color(v_it);
OpenMesh::Vec3uc castedColor = OpenMesh::color_cast<OpenMesh::Vec3uc>(c);
ofs << " " << (unsigned int)castedColor[0] << " " << (unsigned int)castedColor[1] << " " << (unsigned int)castedColor[2];
ofs << " " << OpenMesh::color_cast<OpenMesh::Vec3ui>(c);
}
// Write vertex texcoord
......@@ -964,8 +963,7 @@ bool FilePLYPlugin::writeMeshFileAscii(QString _filename, MeshT* _mesh) {
// Write face color
if(fColors) {
c = _mesh->color(f_it);
OpenMesh::Vec3uc castedColor = OpenMesh::color_cast<OpenMesh::Vec3uc>(c);
ofs << " " << (unsigned int)castedColor[0] << " " << (unsigned int)castedColor[1] << " " << (unsigned int)castedColor[2];
ofs << " " << OpenMesh::color_cast<OpenMesh::Vec3ui>(c);
}
ofs << "\n";
......
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