Beispiel #1
0
        //public List<Edge> ActiveEdges { get; set; }
        // Event raiser
        protected virtual void RaiseSensorUpdate(SensorUpdateEventArgs e)
        {
            var handler = this.OnSensorUpdate;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Beispiel #2
0
        //public List<Edge> PastEdges { get; set; }
        //protected virtual SensorUpdateEventArgs GenerateSensordata();
        protected virtual SensorUpdateEventArgs GenerateSensordata()
        {
            var _suea = new SensorUpdateEventArgs();

            foreach (LocateableObject _object in IpSimCore.Instance.LocatableObjects)
            {
                Vector3D _dir;
                if (this.Fov.IsInRange(this.Position, out _dir))
                {
                    var _vec2Obj = _dir.ToSpherical();
                    var _det     = new IpSensorDetection(_object, _vec2Obj);
                    _suea.Detections.Add(_det);
                }
            }
            return(_suea);
        }