private void DrawActor(DrawingContext dc, CanvasData canvas, RadarObject actor)
        {
            try
            {

                var baseColor = GetActorColor(actor);            
                var actorName = actor.Actor.Name;
                //var trinityType = actor.Actor.TrinityType;
                var actorRadius = actor.Actor.Radius;

                var unit = actor.Actor as TrinityUnit;
                if (unit != null)
                {
                    if (unit.Source.IsDisposed)
                        return;

                    // Draw a line to indicate which way the unit is facing
                    var lighterBaseColor = ControlPaint.Light(baseColor.ToDrawingColor(), 50);
                    var drawingPen = new Pen(new SolidColorBrush(lighterBaseColor.ToMediaColor()), 1);
                    dc.DrawLine(drawingPen, actor.Point, actor.HeadingPointAtRadius);
                }

                if ((actor.Actor.IsGizmo || actor.Actor.IsUnit) && baseColor != Colors.Transparent )
                {
                    // Draw a circle representing the size of the actor
                    var outerFill = new SolidColorBrush(baseColor);
                    var gridRadius = actorRadius*GridSize;
                    outerFill.Opacity = 0.25;
                    dc.DrawEllipse(outerFill, null, actor.Point, gridRadius, gridRadius);

                    var formattedText = new FormattedText(string.Format("{0}", actorName), CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface("Arial"), 11, new SolidColorBrush(baseColor))
                    {
                        MaxTextWidth = 80,
                        Trimming = TextTrimming.WordEllipsis,
                        TextAlignment = TextAlignment.Center
                    };

                    var textOffsetPosition = new Point(actor.Point.X - (formattedText.WidthIncludingTrailingWhitespace / 2), actor.Point.Y - 10 - formattedText.Height);
                    dc.DrawText(formattedText, textOffsetPosition);

                    // Draw a dot in the center of the actor;
                    var innerFill = new SolidColorBrush(baseColor);
                    dc.DrawEllipse(innerFill, null, actor.Point, MarkerSize / 2, MarkerSize / 2);
                }
               

            }
            catch (Exception ex)
            {
                Logger.Log("Exception in RadarUI.DrawActor(). {0} {1}", ex.Message, ex.InnerException);
            }           
        }
        /// <summary>
        /// Returns a base color for actor based on type and stuff
        /// </summary>
        private static Color GetActorColor(RadarObject actor)
        {
            Color baseColor = Colors.White;
            try
            {
                switch (actor.Actor.TrinityType)
                {
                    case TrinityObjectType.Avoidance:
                        baseColor = Colors.OrangeRed;
                        break;

                    case TrinityObjectType.Portal:
                    case TrinityObjectType.Container:
                    case TrinityObjectType.CursedChest:
                    case TrinityObjectType.CursedShrine:
                    case TrinityObjectType.Shrine:
                    case TrinityObjectType.HealthWell:
                    case TrinityObjectType.Interactable:
                        baseColor = Colors.Yellow;
                        break;

                    case TrinityObjectType.ProgressionGlobe:
                    case TrinityObjectType.PowerGlobe:
                    case TrinityObjectType.HealthGlobe:
                    case TrinityObjectType.Gold:
                    case TrinityObjectType.Item:
                        baseColor = Colors.DarkSeaGreen;
                        break;

                    case TrinityObjectType.Player:
                        baseColor = Colors.White;
                        break;

                    case TrinityObjectType.Unit:

                        var unit = actor.Actor as TrinityUnit;
                        if (unit != null)
                        {
                            if (unit.IsBossOrEliteRareUnique)
                                baseColor = Colors.Blue;
                            else if (unit.IsHostile)
                                baseColor = Colors.DodgerBlue;
                            else
                                baseColor = Colors.LightSkyBlue;
  
                        }
                        else
                        {
                            baseColor = Colors.SlateGray;
                        }
                        break;

                    default:
                        baseColor = Colors.Transparent;
                        break;
                }
                    

            }
            catch (Exception ex)
            {
                Logger.Log("Exception in RadarUI.GetActorColor(). {0} {1}", ex.Message, ex.InnerException);
            }   
            return baseColor;
        }
        /// <summary>
        /// Go through the ItemSource collection and calculate their canvas positions
        /// </summary>
        void UpdateData()
        {
            try
            {
                using (new PerformanceLogger("RadarUI UpdateData"))
                {
                    
                    if (DesiredSize.Height <= 0 || DesiredSize.Width <= 0)
                        return;

                    if (!IsVisible)
                        return;

                    Objects.Clear();

                    CanvasData.Update(DesiredSize, GridSize);

                    // Find the actor who should be in the center of the radar
                    // and whos position all other points should be plotted against.

                    var center = ItemsSource.OfType<TrinityUnit>().FirstOrDefault(u => u.IsMe);
                    if (center == null)
                        return;

                    CenterActor = new RadarObject(center, CanvasData);
                    CanvasData.CenterVector = CenterActor.Actor.Position;

                    // Calculate locations for all actors positions
                    // on RadarObject ctor; or with .Update();

                    foreach (var trinityObject in ItemsSource.OfType<TrinityObject>())
                    {
                        var radarObject = new RadarObject(trinityObject, CanvasData);
                        Objects.Add(radarObject);
                    }

                    UpdateSceneData();

                    //// Reset interpolation timer
                    ////dispatcherTimer.Start();

                    //var futureTime = DateTime.UtcNow.AddMilliseconds(50);
                    //foreach (var radarObject in Objects)
                    //{
                    //    Vector3 estimatedPosition;
                    //    if (radarObject.Actor.Movement.HasMoved && radarObject.Actor.Movement.TryPredictPosition(futureTime, out estimatedPosition))
                    //    {
                    //        //radarObject.Morph.Update();
                    //        _predictions.Add(estimatedPosition);
                    //        //changeCount++;
                    //    }
                    //}

                    //while (_predictions.Count >= 10)
                    //{
                    //    _predictions.RemoveAt(0);
                    //}

                }

                // Trigger Canvas to Render
                InvalidateVisual();  
                



            }
            catch (Exception ex)
            {
                Logger.Log("Exception in RadarUI.UpdateData(). {0} {1}", ex.Message, ex.InnerException);
            }
        }