MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / copy_and_convert

Function copy_and_convert

source/MRMesh/miniply.cpp:419–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417
418
419 static void copy_and_convert(uint8_t* dest, PLYPropertyType destType, const uint8_t* src, PLYPropertyType srcType)
420 {
421 switch (destType) {
422 case PLYPropertyType::Char: copy_and_convert_to(reinterpret_cast<int8_t*> (dest), src, srcType); break;
423 case PLYPropertyType::UChar: copy_and_convert_to(reinterpret_cast<uint8_t*> (dest), src, srcType); break;
424 case PLYPropertyType::Short: copy_and_convert_to(reinterpret_cast<int16_t*> (dest), src, srcType); break;
425 case PLYPropertyType::UShort: copy_and_convert_to(reinterpret_cast<uint16_t*>(dest), src, srcType); break;
426 case PLYPropertyType::Int: copy_and_convert_to(reinterpret_cast<int32_t*> (dest), src, srcType); break;
427 case PLYPropertyType::UInt: copy_and_convert_to(reinterpret_cast<uint32_t*>(dest), src, srcType); break;
428 case PLYPropertyType::Float: copy_and_convert_to(reinterpret_cast<float*> (dest), src, srcType); break;
429 case PLYPropertyType::Double: copy_and_convert_to(reinterpret_cast<double*> (dest), src, srcType); break;
430 case PLYPropertyType::None: break;
431 }
432 }
433
434
435 static inline bool compatible_types(PLYPropertyType srcType, PLYPropertyType destType)

Callers 3

extract_propertiesMethod · 0.85
extract_list_propertyMethod · 0.85
extract_trianglesMethod · 0.85

Calls 1

copy_and_convert_toFunction · 0.85

Tested by

no test coverage detected