#pragma once #include #include #include #include namespace openVulkanoCpp { class Utils { public: static std::vector toCString(const std::vector& values) { std::vector result; result.reserve(values.size()); for (const auto& string : values) { result.push_back(string.c_str()); } return result; } static std::vector toCString(const std::set& values) { std::vector result; result.reserve(values.size()); for (const auto& string : values) { result.push_back(string.c_str()); } return result; } template static bool Contains(std::vector& vec, const T& element) { return (std::find(vec.begin(), vec.end(), element) != vec.end()); } template static void Remove(std::vector& vec, const T& element) { vec.erase(std::remove(vec.begin(), vec.end(), element), vec.end()); } template static auto EnumAsInt(Enumeration const value) -> typename std::underlying_type::type { return static_cast::type>(value); } static bool MatchesAnyElementWise(const glm::vec3& a, const glm::vec3& b) { return a.x == b.x || a.y == b.y || a.z == b.z; } }; }