Dear Möbius,
I would like to ask about giving colors to the edges and visualizing them
on the Openflipper visualization framework.
Here is my code, but I cannot see the colored edges;
m_mesh->request_edge_colors();
m_mesh->set_color(m_mesh->edge_handle(0), PolyMesh::Color(0, 255, 0));
PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
emit updatedObject(m_targetObject->id(), UPDATE_COLOR);
Thank you.
Erkan Gunpinar
The University of Tokyo
Hi!
I was trying to export a TriMesh to the PLY file format with vertex colors.
The mesh looks as expected in OpenFlipper. But the exported mesh was all
black in MeshLab. When looking at the PLY file, the components of the
colors were all either 0 or 1.
I believe there is a bug in the PLY exporter. TriTraits::Color is
defined as Vec4f. FilePLYT.cc exports this as
ofs << " " << OpenMesh::color_cast<OpenMesh::Vec3i>(c);
That means, that in fact OpenMesh::color_coder<Vec3i, Vec4f> is used for
the conversion. Since there is no such specialization of color_coder,
the default template will be used, which just converts to int. Thus, the
resulting colors will all be not correct.
Shouldn't it be this?
ofs << " " << OpenMesh::color_cast<OpenMesh::Vec3uc>(c);
Bye,
Bengt