private void ParseLooseClustersPacket(BinaryReader br)
        {
            LocalMapLooseClusterMsg msg = new LocalMapLooseClusterMsg();
            int numClusters             = br.ReadInt32();

            msg.clusters  = new List <LocalMapLooseCluster>(numClusters);
            msg.timestamp = br.ReadDouble();
            for (int i = 0; i < numClusters; i++)
            {
                LocalMapLooseCluster cluster = new LocalMapLooseCluster();
                int numPts      = br.ReadInt32();
                int clusterType = br.ReadInt32();
                cluster.targetClass = (LocalMapClusterClass)clusterType;
                cluster.points      = new List <LocalMapPoint>(numPts);
                for (int j = 0; j < numPts; j++)
                {
                    short x = br.ReadInt16();
                    short y = br.ReadInt16();
                    cluster.points.Add(new LocalMapPoint(x / 100.0, y / 100.0));
                }
                msg.clusters.Add(cluster);
            }

            if (LooseClustersReceived != null)
            {
                LooseClustersReceived(this, new LocalMapLooseClustersRXEventArgs(msg));
            }
        }
 public LocalMapLooseClustersRXEventArgs(LocalMapLooseClusterMsg p)
 {
     this.p = p;
 }
        private void ParseLooseClustersPacket(BinaryReader br)
        {
            LocalMapLooseClusterMsg msg = new LocalMapLooseClusterMsg();
              int numClusters = br.ReadInt32();
              msg.clusters = new List<LocalMapLooseCluster>(numClusters);
              msg.timestamp = br.ReadDouble();
              for (int i = 0; i < numClusters; i++)
              {
            LocalMapLooseCluster cluster = new LocalMapLooseCluster();
            int numPts = br.ReadInt32();
                int clusterType = br.ReadInt32();
                cluster.targetClass = (LocalMapClusterClass)clusterType;
            cluster.points = new List<LocalMapPoint>(numPts);
            for (int j = 0; j < numPts; j++)
            {
              short x = br.ReadInt16();
              short y = br.ReadInt16();
              cluster.points.Add(new LocalMapPoint(x / 100.0, y / 100.0));
            }
            msg.clusters.Add(cluster);
              }

              if (LooseClustersReceived != null) LooseClustersReceived(this, new LocalMapLooseClustersRXEventArgs(msg));
        }
 public LocalMapLooseClustersRXEventArgs(LocalMapLooseClusterMsg p)
 {
     this.p = p;
 }