Пример #1
0
        public Sight(IObserver observer, SightConfiguration config, ISightCache cache, ISightRaycaster raycaster, ISightPathExtrapolator extrapolator)
        {
            Assert.IsNotNull(observer);
            Assert.IsNotNull(config);
//            Assert.IsNotNull(cache); // Cache can be null IF all targets use manual indexing.
            Assert.IsNotNull(raycaster);
            if (config.extrapolatePath)
            {
                Assert.IsNotNull(extrapolator, "Use extrapolate path is enabled, but no ISightPathExtrapolator implementation given.");
            }

            this.observer     = observer;
            this.config       = config;
            this.cache        = cache;
            this.raycaster    = raycaster;
            this.extrapolator = extrapolator;

            targetsInRange = new List <SightTargetInfo>(16);
        }
Пример #2
0
 public Sight2D(IObserver observer, SightConfiguration config, ISightCache cache, ISightRaycaster raycaster, ISightPathExtrapolator extrapolator)
     : base(observer, config, cache, raycaster, extrapolator)
 {
 }
Пример #3
0
 public Sight2D(IObserver observer, SightConfiguration config, ISightCache cache)
     : base(observer, config, cache, new Raycaster3D(), new SightPathExtrapolator(config))
 {
 }
Пример #4
0
 public Sight(IObserver observer, SightConfiguration config)
     : this(observer, config, new SightCache(config), new Raycaster3D(), new SightPathExtrapolator(config))
 {
 }
Пример #5
0
 public SightCache2D(SightConfiguration config)
     : base(config)
 {
 }
Пример #6
0
        public SightCache(SightConfiguration config)
        {
            this.config = config;

            vertexCache = new Dictionary <int, SightCacheLookup>(64);
        }
Пример #7
0
 public SightPathVelocityBasedExtrapolator(SightConfiguration config)
 {
     _config           = config;
     _samplesQueue     = new Dictionary <ISightTarget, FixedSizeQueue <SightTargetSampleData> >();
     _extrapolatedData = new Dictionary <ISightTarget, SightTargetSampleData[]>();
 }