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

Function to_draco_mesh

tools/Compression/Draco/DracoCompressionEngine.cpp:136–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136std::unique_ptr<draco::Mesh> to_draco_mesh(Mesh::Ptr mesh,
137 bool with_attributes=true) {
138 std::unique_ptr<draco::Mesh> draco_mesh(new draco::Mesh());
139
140 const size_t vertex_per_face = mesh->get_vertex_per_face();
141 if (vertex_per_face != 3) {
142 throw NotImplementedError(
143 "Draco encoding only supports triangle mesh.");
144 }
145
146 copy_vertices(mesh, draco_mesh);
147 copy_faces(mesh, draco_mesh);
148
149 if (with_attributes) {
150 copy_vertex_attributes(mesh, draco_mesh);
151 //copy_face_attributes(mesh, draco_mesh);
152 }
153
154 return draco_mesh;
155}
156
157std::unique_ptr<draco::PointCloud> to_draco_point_cloud(Mesh::Ptr mesh,
158 bool with_attributes=true) {

Callers 1

compressMethod · 0.85

Calls 5

NotImplementedErrorClass · 0.85
copy_verticesFunction · 0.85
copy_facesFunction · 0.85
copy_vertex_attributesFunction · 0.85
get_vertex_per_faceMethod · 0.45

Tested by

no test coverage detected