MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / finalize_colors

Method finalize_colors

src/IO/OFFParser.cpp:260–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void OFFParser::finalize_colors() {
261 if (!m_vertex_colors.empty() && m_vertex_colors.size() != m_vertices.size()) {
262 std::cerr << "Num vertex colors does not match num vertices. Ignoring colors."
263 << std::endl;
264 m_vertex_colors.clear();
265 }
266 if (!m_face_colors.empty() && m_face_colors.size() != m_faces.size()) {
267 std::cerr << "Num face colors does not match num faces. Ignoring colors."
268 << std::endl;
269 m_face_colors.clear();
270 }
271}
272
273void OFFParser::export_color(const ColorList& colors, const std::string& name,
274 Float* buffer) {

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected