mv TextureImportParamSet TextureDescriptorSet

This commit is contained in:
Masataka SUMI 2021-05-27 15:38:40 +09:00
parent adbe16e154
commit f2495f61b5
6 changed files with 20 additions and 20 deletions

View File

@ -28,24 +28,24 @@ namespace UniGLTF
public sealed class GltfTextureDescriptorGenerator : ITextureDescriptorGenerator
{
private readonly GltfParser m_parser;
private TextureImportParamSet _textureImportParamSet;
private TextureDescriptorSet _textureDescriptorSet;
public GltfTextureDescriptorGenerator(GltfParser parser)
{
m_parser = parser;
}
public TextureImportParamSet Get()
public TextureDescriptorSet Get()
{
if (_textureImportParamSet == null)
if (_textureDescriptorSet == null)
{
_textureImportParamSet = new TextureImportParamSet();
_textureDescriptorSet = new TextureDescriptorSet();
foreach (var (_, param) in EnumerateAllTextures(m_parser))
{
_textureImportParamSet.Add(param);
_textureDescriptorSet.Add(param);
}
}
return _textureImportParamSet;
return _textureDescriptorSet;
}
/// <summary>

View File

@ -9,6 +9,6 @@ namespace UniGLTF
/// </summary>
public interface ITextureDescriptorGenerator
{
TextureImportParamSet Get();
TextureDescriptorSet Get();
}
}

View File

@ -10,7 +10,7 @@ namespace VRM
{
private readonly GltfParser m_parser;
private readonly glTF_VRM_extensions m_vrm;
private TextureImportParamSet _textureImportParamSet;
private TextureDescriptorSet _textureDescriptorSet;
public VrmTextureDescriptorGenerator(GltfParser parser, glTF_VRM_extensions vrm)
{
@ -18,17 +18,17 @@ namespace VRM
m_vrm = vrm;
}
public TextureImportParamSet Get()
public TextureDescriptorSet Get()
{
if (_textureImportParamSet == null)
if (_textureDescriptorSet == null)
{
_textureImportParamSet = new TextureImportParamSet();
_textureDescriptorSet = new TextureDescriptorSet();
foreach (var (_, param) in EnumerateAllTextures(m_parser, m_vrm))
{
_textureImportParamSet.Add(param);
_textureDescriptorSet.Add(param);
}
}
return _textureImportParamSet;
return _textureDescriptorSet;
}

View File

@ -10,24 +10,24 @@ namespace UniVRM10
public sealed class Vrm10TextureDescriptorGenerator : ITextureDescriptorGenerator
{
private readonly GltfParser m_parser;
private TextureImportParamSet _textureImportParamSet;
private TextureDescriptorSet _textureDescriptorSet;
public Vrm10TextureDescriptorGenerator(GltfParser parser)
{
m_parser = parser;
}
public TextureImportParamSet Get()
public TextureDescriptorSet Get()
{
if (_textureImportParamSet == null)
if (_textureDescriptorSet == null)
{
_textureImportParamSet = new TextureImportParamSet();
_textureDescriptorSet = new TextureDescriptorSet();
foreach (var (_, param) in EnumerateAllTextures(m_parser))
{
_textureImportParamSet.Add(param);
_textureDescriptorSet.Add(param);
}
}
return _textureImportParamSet;
return _textureDescriptorSet;
}
/// <summary>

View File

@ -5,7 +5,7 @@ namespace VRMShaders
/// <summary>
/// TextureImportParam の集合を Unique な集合にする。
/// </summary>
public sealed class TextureImportParamSet
public sealed class TextureDescriptorSet
{
private readonly Dictionary<SubAssetKey, TextureImportParam> _params = new Dictionary<SubAssetKey, TextureImportParam>();