public ESurfacePatchProvider(GRing2PatchesCreatorProxy patchesCreator, Ring2PatchStamplingOverseerFinalizer patchStamper, CommonExecutorUTProxy commonExecutor, MipmapExtractor mipmapExtractor, int mipmapLevelToExtract) { _patchesCreator = patchesCreator; _patchStamper = patchStamper; _commonExecutor = commonExecutor; _mipmapExtractor = mipmapExtractor; _mipmapLevelToExtract = mipmapLevelToExtract; }
public static ESurfacePatchProvider ConstructProvider(UltraUpdatableContainer updatableContainer, Dictionary <int, float> intensityPatternPixelsPerUnit, ComputeShaderContainerGameObject shaderContainerGO, int mipmapLevelToExtract, Dictionary <int, float> plateStampPixelsPerUnit) { var ring2ShaderRepository = Ring2PlateShaderRepository.Create(); TextureConcieverUTProxy conciever = new TextureConcieverUTProxy(); updatableContainer.Add(conciever); var ring2PatchesPainterUtProxy = new Ring2PatchesPainterUTProxy( new Ring2PatchesPainter( new Ring2MultishaderMaterialRepository(ring2ShaderRepository, Ring2ShaderNames.ShaderNames))); updatableContainer.Add(ring2PatchesPainterUtProxy); UTRing2PlateStamperProxy stamperProxy = new UTRing2PlateStamperProxy( new Ring2PlateStamper(new Ring2PlateStamperConfiguration() { PlateStampPixelsPerUnit = plateStampPixelsPerUnit }, shaderContainerGO)); updatableContainer.Add(stamperProxy); UTTextureRendererProxy textureRendererProxy = new UTTextureRendererProxy(new TextureRendererService( new MultistepTextureRenderer(shaderContainerGO), new TextureRendererServiceConfiguration() { StepSize = new Vector2(500, 500) })); updatableContainer.Add(textureRendererProxy); CommonExecutorUTProxy commonExecutorUtProxy = new CommonExecutorUTProxy(); //todo updatableContainer.Add(commonExecutorUtProxy); Ring2PatchStamplingOverseerFinalizer patchStamperOverseerFinalizer = new Ring2PatchStamplingOverseerFinalizer(stamperProxy, textureRendererProxy, commonExecutorUtProxy); MipmapExtractor mipmapExtractor = new MipmapExtractor(textureRendererProxy); var patchesCreatorProxy = new GRing2PatchesCreatorProxy(CreateRing2PatchesCreator(updatableContainer, intensityPatternPixelsPerUnit)); return(new ESurfacePatchProvider(patchesCreatorProxy, patchStamperOverseerFinalizer, commonExecutorUtProxy, mipmapExtractor, mipmapLevelToExtract)); }