/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Engine/RendererCore/ShaderCompiler/PermutationGenerator.h
34 строки
1 KB
C-Core
Array usage cleanup (#1864)
11 мар 2026, 23:44
Не верифицирован
11 мар 2026, 23:44
f7cb730
Код
Авторство
О чём код?
#pragma once #include <Foundation/Containers/HashSet.h> #include <Foundation/Containers/HybridArray.h> #include <Foundation/Containers/Map.h> #include <Foundation/Strings/HashedString.h> #include <RendererCore/Declarations.h> /// \brief A helper class to iterate over all possible permutations. /// /// Just add all permutation variables and their possible values. /// Then the number of possible permutations and each permutation /// can be queried. class EZ_RENDERERCORE_DLL ezPermutationGenerator { public: /// \brief Resets everything. void Clear(); /// \brief Removes all permutations for the given variable void RemovePermutations(const ezHashedString& sPermVarName); /// \brief Adds the name and one of the possible values of a permutation variable. void AddPermutation(const ezHashedString& sName, const ezHashedString& sValue); /// \brief Returns how many permutations are possible. ezUInt32 GetPermutationCount() const; /// \brief Returns the n-th permutation. void GetPermutation(ezUInt32 uiPerm, ezDynamicArray<ezPermutationVar>& out_permVars) const; private: ezMap<ezHashedString, ezHashSet<ezHashedString>> m_Permutations; };