Exemple #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);
        }
Exemple #2
0
 public Sight2D(IObserver observer, SightConfiguration config, ISightCache cache, ISightRaycaster raycaster, ISightPathExtrapolator extrapolator)
     : base(observer, config, cache, raycaster, extrapolator)
 {
 }
Exemple #3
0
 public Sight2D(IObserver observer, SightConfiguration config, ISightCache cache)
     : base(observer, config, cache, new Raycaster3D(), new SightPathExtrapolator(config))
 {
 }
Exemple #4
0
 public Sight(IObserver observer, SightConfiguration config)
     : this(observer, config, new SightCache(config), new Raycaster3D(), new SightPathExtrapolator(config))
 {
 }
Exemple #5
0
 public SightCache2D(SightConfiguration config)
     : base(config)
 {
 }
        public SightCache(SightConfiguration config)
        {
            this.config = config;

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