Esempio n. 1
0
 public GRing2SurfaceProvider(GRing2PatchesCreatorProxy patchesCreator, MyRectangle inGamePosition,
                              FlatLod flatLod)
 {
     _patchesCreator = patchesCreator;
     _inGamePosition = inGamePosition;
     _flatLod        = flatLod;
 }
Esempio n. 2
0
        public IAsyncGRingNodeListener CreateNewListener(Ring1Node node, FlatLod flatLod)
        {
            var inGamePosition = _coordsCalculator.CalculateGlobalObjectPosition(node.Ring1Position);

            GRingTerrainMeshProvider terrainMeshProvider = new GRingTerrainMeshProvider(
                _meshGenerator,
                flatLod,
                _terrainMeshProviderConfiguration
                );
            GRingGroundShapeProvider groundShapeProvider = new GRingGroundShapeProvider(
                _terrainShapeDb,
                flatLod,
                inGamePosition,
                _spotUpdater,
                _groundShapeProviderConfiguration);

            GRing1SurfaceProvider surfaceProvider = new GRing1SurfaceProvider(
                _stainTerrainServiceProxy,
                inGamePosition);

            GRingTripletProvider tripletProvider = new GRingTripletProvider(
                inGamePosition, Repositioner.Default, HeightDenormalizer.Default);

            return(new GRingNodeTerrain(
                       _orderGrabber,
                       _parentObject,
                       terrainMeshProvider,
                       groundShapeProvider,
                       surfaceProvider,
                       tripletProvider,
                       flatLod,
                       new GRingWeldingUpdater(_weldingPack)
                       ));
        }
Esempio n. 3
0
 public GRingTerrainMeshProvider(MeshGeneratorUTProxy meshGenerator, FlatLod flatLod,
                                 GRingTerrainMeshProviderConfiguration configuration)
 {
     _meshGenerator = meshGenerator;
     _flatLod       = flatLod;
     _configuration = configuration;
     CalculateMeshResolution();
 }
 public GStampedRing2SurfaceProvider(GRing2PatchesCreatorProxy patchesCreator,
                                     MyRectangle inGamePosition, Ring2PatchStamplingOverseerFinalizer patchStamper, FlatLod flatLod)
 {
     _patchesCreator = patchesCreator;
     _inGamePosition = inGamePosition;
     _patchStamper   = patchStamper;
     _flatLod        = flatLod;
 }
Esempio n. 5
0
        public IAsyncGRingNodeListener CreateNewListener(Ring1Node node, FlatLod flatLod)
        {
            var inGamePosition = _coordsCalculator.CalculateGlobalObjectPosition(node.Ring1Position);

            GRingTripletProvider tripletProvider = new GRingTripletProvider(
                inGamePosition, Repositioner.Default, HeightDenormalizer.Default);

            return(new GDebugLodNodeTerrain(_orderGrabber, _parentObject, tripletProvider, flatLod,
                                            _meshGeneratorUtProxy));
        }
Esempio n. 6
0
 public GDebugLodNodeTerrain(
     Ring1PaintingOrderGrabber orderGrabber,
     GameObject parentObject,
     GRingTripletProvider tripletProvider,
     FlatLod flatLod,
     MeshGeneratorUTProxy meshGeneratorUtProxy)
 {
     _orderGrabber         = orderGrabber;
     _parentObject         = parentObject;
     _tripletProvider      = tripletProvider;
     _flatLod              = flatLod;
     _meshGeneratorUtProxy = meshGeneratorUtProxy;
 }
Esempio n. 7
0
 public GRingGroundShapeProvider(
     ITerrainShapeDb terrainShapeDb,
     FlatLod flatLod,
     MyRectangle terrainDetailAreaPosition,
     GRingSpotUpdater spotUpdater,
     GRingGroundShapeProviderConfiguration configuration
     )
 {
     _terrainShapeDb            = terrainShapeDb;
     _flatLod                   = flatLod;
     _terrainDetailAreaPosition = terrainDetailAreaPosition;
     _spotUpdater               = spotUpdater;
     _configuration             = configuration;
 }
Esempio n. 8
0
        public IAsyncGRingNodeListener CreateNewListener(Ring1Node node, FlatLod flatLod)
        {
            var inGamePosition = _coordsCalculator.CalculateGlobalObjectPosition(node.Ring1Position);

            GRingTripletProvider tripletProvider = new GRingTripletProvider(
                inGamePosition, Repositioner.Default, HeightDenormalizer.Default);

            GRingGroundShapeProvider groundShapeProvider = new GRingGroundShapeProvider(
                _terrainShapeDb,
                flatLod,
                inGamePosition,
                _gRingSpotUpdater,
                _groundShapeProviderConfiguration);

            return(new GDebugTerrainedLodNodeTerrain(
                       _orderGrabber, _parentObject, tripletProvider, flatLod, _meshGeneratorUtProxy, groundShapeProvider));
        }
Esempio n. 9
0
 public GRingNodeTerrain(
     Ring1PaintingOrderGrabber orderGrabber,
     GameObject parentObject,
     GRingTerrainMeshProvider terrainMeshProvider,
     GRingGroundShapeProvider groundShapeProvider,
     IGRingSurfaceProvider surfaceProvider,
     GRingTripletProvider tripletProvider,
     FlatLod flatLod, GRingWeldingUpdater weldingUpdater)
 {
     _orderGrabber        = orderGrabber;
     _parentObject        = parentObject;
     _terrainMeshProvider = terrainMeshProvider;
     _groundShapeProvider = groundShapeProvider;
     _surfaceProvider     = surfaceProvider;
     _tripletProvider     = tripletProvider;
     _flatLod             = flatLod;
     _weldingUpdater      = weldingUpdater;
 }
        public IAsyncGRingNodeListener CreateNewListener(Ring1Node node, FlatLod lod)
        {
            var creatorsFilteredList = _creatorsList
                                       .Where(c => c.PositionLimiter == null || c.PositionLimiter.IsAccepted(node))
                                       .Where(c => c.MaximumLod.ScalarValue >= lod.ScalarValue)
                                       .OrderBy(c => c.MaximumLod.ScalarValue).Select(c => c.Creator).ToList();

            INewGRingListenersCreator creator = null;

            if (creatorsFilteredList.Any())
            {
                creator = creatorsFilteredList.First();
            }
            else
            {
                creator =
                    _creatorsList.Where(c => c.IsFallthroughCreator).Select(c => c.Creator).First();
            }

            return(creator.CreateNewListener(node, lod));
        }
 public IAsyncGRingNodeListener CreateNewListener(Ring1Node node, FlatLod lod)
 {
     return(new GCompositeRing2Node(_innerCreators.Select(c => c.CreateNewListener(node, lod)).ToList()));
 }
Esempio n. 12
0
 public IAsyncGRingNodeListener CreateNewListener(Ring1Node node, FlatLod flatLod)
 {
     return(new GVoidNodeTerrain());
 }
Esempio n. 13
0
 public bool Equals(FlatLod other)
 {
     return(_scalarValue == other._scalarValue);
 }