public GCompositeRing2NodeTerrainCreator(
     Ring1PaintingOrderGrabber orderGrabber,
     GameObject parentObject,
     MeshGeneratorUTProxy meshGenerator,
     ITerrainShapeDb terrainShapeDb,
     UnityCoordsCalculator coordsCalculator,
     GRing2PatchesCreatorProxy patchesCreator,
     GRingSpotUpdater spotUpdater,
     HeightArrayWeldingPack weldingPack,
     Ring2PatchStamplingOverseerFinalizer patchStamper,
     GRingGroundShapeProviderConfiguration groundShapeProviderConfiguration,
     GRingTerrainMeshProviderConfiguration terrainMeshProviderConfiguration)
 {
     _orderGrabber     = orderGrabber;
     _parentObject     = parentObject;
     _meshGenerator    = meshGenerator;
     _terrainShapeDb   = terrainShapeDb;
     _coordsCalculator = coordsCalculator;
     _patchesCreator   = patchesCreator;
     _spotUpdater      = spotUpdater;
     _weldingPack      = weldingPack;
     _patchStamper     = patchStamper;
     _groundShapeProviderConfiguration = groundShapeProviderConfiguration;
     _terrainMeshProviderConfiguration = terrainMeshProviderConfiguration;
 }
 public GRing0NodeTerrainCreator(
     Ring1PaintingOrderGrabber orderGrabber,
     GameObject parentObject,
     MeshGeneratorUTProxy meshGenerator,
     ITerrainShapeDb terrainShapeDb,
     UnityCoordsCalculator coordsCalculator, GRingSpotUpdater spotUpdater,
     HeightArrayWeldingPack weldingPack,
     GRingGroundShapeProviderConfiguration groundShapeProviderConfiguration,
     GRingTerrainMeshProviderConfiguration terrainMeshProviderConfiguration)
 {
     _orderGrabber     = orderGrabber;
     _parentObject     = parentObject;
     _meshGenerator    = meshGenerator;
     _terrainShapeDb   = terrainShapeDb;
     _coordsCalculator = coordsCalculator;
     _spotUpdater      = spotUpdater;
     _groundShapeProviderConfiguration = groundShapeProviderConfiguration;
     _terrainMeshProviderConfiguration = terrainMeshProviderConfiguration;
     _weldingPack = weldingPack;
 }
        private void InitializeWelding()
        {
            var weldingTexture = new RenderTexture(1024, 1024, 0, RenderTextureFormat.RFloat);

            weldingTexture.enableRandomWrite = true;
            weldingTexture.filterMode        = FilterMode.Point;
            weldingTexture.wrapMode          = TextureWrapMode.Clamp;
            weldingTexture.Create();

            HeightArrayWelderProxy welderProxy = new HeightArrayWelderProxy(
                new HeightArrayWeldingDispatcher(
                    new WeldMapLevel1Manager(
                        new WeldMapLevel2Manager(
                            new WeldingExecutor(
                                _gameInitializationFields.Retrive <ComputeShaderContainerGameObject>(),
                                _gameInitializationFields.Retrive <UnityThreadComputeShaderExecutorObject>(),
                                weldingTexture),
                            new WeldMapLevel2ManagerConfiguration()
            {
                WeldTextureSize         = new IntVector2(1024, 1024),
                ColumnsCount            = 1024,
                StripLength             = 240,
                StripsPerOneColumnCount = 2,                 //todo
                StripStride             = 256
            }))));

            _ultraUpdatableContainer.AddOtherThreadProxy(welderProxy);

            var terrainThreadAssignBox = new LateAssignBox <Ring1TreeProxy>();

            _gameInitializationFields.SetField(terrainThreadAssignBox);

            var weldingPack = new HeightArrayWeldingPack(new TextureWithSize()
            {
                Texture = weldingTexture,
                Size    = new IntVector2(1024, 1024)
            }, welderProxy, _gameInitializationFields.Retrive <CommonExecutorUTProxy>(), _gRingConfiguration.WeldingEnabled);

            _gameInitializationFields.SetField(weldingPack);
        }
Esempio n. 4
0
 public GRingWeldingUpdater(HeightArrayWeldingPack weldingPack)
 {
     _weldingPack = weldingPack;
 }