39 size_t nv = fs_mesh.num_vertices();
41 for (
size_t i = 0; i < nv; i++) {
43 fs_mesh.vertices[i * 3],
44 fs_mesh.vertices[i * 3 + 1],
45 fs_mesh.vertices[i * 3 + 2]));
47 size_t nf = fs_mesh.num_faces();
49 for (
size_t i = 0; i < nf; i++) {
51 static_cast<uint32_t
>(fs_mesh.faces[i * 3]),
52 static_cast<uint32_t
>(fs_mesh.faces[i * 3 + 1]),
53 static_cast<uint32_t
>(fs_mesh.faces[i * 3 + 2])});
138 const std::vector<float> &morph_data,
139 const std::vector<uint8_t> &rgb_colors) {
143 for (
size_t i = 0; i < nv; i++) {
144 if (std::isnan(morph_data[i])) {
145 out.
colors.push_back(
Color(1.0f, 1.0f, 1.0f, 1.0f));
148 rgb_colors[i * 3] / 255.0f,
149 rgb_colors[i * 3 + 1] / 255.0f,
150 rgb_colors[i * 3 + 2] / 255.0f,