Pack Vertices to Points.
712 {
714
715 std::unordered_map<uint32_t, bool> pointsMap;
716
717 auto& positions = *meshPack->m_MeshResource.positions.attributes;
718 auto& vertices = *meshPack->m_MeshResource.vertices .attributes;
719 for (auto& primVertex : primVertices)
720 {
721 const glm::uvec4& vertex0 = vertices[primVertex.x];
722 const glm::uvec4& vertex1 = vertices[primVertex.y];
723 const glm::uvec4& vertex2 = vertices[primVertex.z];
724
725 pointsMap[vertex0.x] = true;
726 pointsMap[vertex1.x] = true;
727 pointsMap[vertex2.x] = true;
728 }
729
730 points.resize(pointsMap.size());
731 uint32_t i = 0;
732 for (auto& [pt, ignore] : pointsMap)
733 {
734 points[i] = positions[pt];
735 ++i;
736 }
737
738 return true;
739 }
#define SPICES_PROFILE_ZONE