public void AddCenter(ulong id, Vector3D coord, double dir) { _ccoord = new PointF(coord.X, coord.Y); _items.Clear(); _center = new TriangleRadarItem(id, _r, new PointF((float)(_size / 2), (float)(_size / 2)), coord.Z, dir, CustomLineColor); _items.Add(_center); }
/// <summary> /// Add circle item to radar /// </summary> /// <param name="id">Object GUID</param> /// <param name="coord">Object absolute coordinated</param> /// <param name="color">Circle color</param> /// <param name="radius">Circle radius</param> /// <param name="is_hollow">Is circle hollow. /// Please note that circle outer width is 1 pixels /// so if radius is 2 pixels than it can't be hollow</param> public RadarItem AddItem(ulong id, Vector3D coord, Color color, byte radius, bool is_hollow, RadarItem link) { PointF p = GetXY(coord.X, coord.Y); RadarItem ri = new CircleRadarItem(id, radius, p, coord.Z, color, is_hollow, link); _items.Add(ri); return(ri); }
public RadarItem(ulong id, int r, PointF p, float z, double dir, Color c, bool hollow, RadarItem link) { ID = id; R = r; P = p; Z = z; D = dir; C = c; H = hollow; Created = DateTime.Now; Link = link; }
public RadarItem(ulong id, int r, PointF p, float z, double dir, Color c, RadarItem link) : this(id, r, p, z, dir, c, false, link) { }
/// <summary> /// Add circle item to radar /// </summary> /// <param name="id">Object GUID</param> /// <param name="coord">Object absolute coordinated</param> /// <param name="color">Circle color</param> /// <param name="radius">Circle radius</param> /// <param name="is_hollow">Is circle hollow. /// Please note that circle outer width is 1 pixels /// so if radius is 2 pixels than it can't be hollow</param> public RadarItem AddItem(ulong id, Vector3D coord, Color color, byte radius, bool is_hollow, RadarItem link) { PointF p = GetXY(coord.X, coord.Y); RadarItem ri = new CircleRadarItem(id, radius, p, coord.Z, color, is_hollow, link); _items.Add(ri); return ri; }
/// <summary> /// Add triangle item to radar /// </summary> /// <param name="id">Object GUID</param> /// <param name="coord">Object absolute coordinated</param> /// <param name="dir">Direction (orientation) in radians</param> /// <param name="color">Triangle color</param> public void AddItem(ulong id, Vector3D coord, double dir, Color color, RadarItem link) { PointF p = GetXY(coord.X, coord.Y); _items.Add(new TriangleRadarItem(id, _r, p, coord.Z, dir, color, link)); }
// Implement IComparable CompareTo method - provide default sort order. public int CompareTo(object obj) { RadarItem r = obj as RadarItem; return((Z < r.Z) ? -1 : ((Z > r.Z) ? 1 : 0)); }