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

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