Inheritance: ILocatable
 private void DrawClusterPoints(Cluster cluster, Brush brush, DrawingContext drawingContext)
 {
     foreach (var point in cluster.Points)
     {
         drawingContext.DrawRectangle(brush, null, new Rect(point.X, point.Y, clusterPointSize, clusterPointSize));
     }
 }
Beispiel #2
0
 private void DrawClusterPoints(Cluster cluster, Graphics g, Brush brush)
 {
     foreach (var point in cluster.Points)
     {
         var halfSize = clusterPointSize / 2;
         g.FillRectangle(brush, point.X - halfSize, point.Y - halfSize, clusterPointSize, clusterPointSize);
     }
 }
 private DepthMap CreateMap(Cluster cluster)
 {
     var map = new int[(int)cluster.Width + 1, (int)cluster.Height + 1];
     foreach (var point in cluster.AllPoints)
     {
         map[(int)(point.X - cluster.X), (int)(point.Y - cluster.Y)] = (int)point.Z;
     }
     return new DepthMap(map);
 }
Beispiel #4
0
 private void AssertClusterCenterIsAt(Cluster cluster, int x, int y, int z)
 {
     Assert.AreEqual(new Point(x, y, z), cluster.Center);
     Assert.AreEqual(cluster.Location, cluster.Center);
 }
Beispiel #5
0
 private void DrawCenter(Cluster cluster, Graphics g)  
 {
     var halfSize = centerSize / 2;
     g.FillEllipse(Brushes.Blue, cluster.Center.X - halfSize, cluster.Center.Y - halfSize, centerSize, centerSize);
 }
 private Contour CreateContour(DepthMap map, Cluster cluster)
 {
     return this.contourFactory.CreateContour(map, cluster.X, cluster.Y);
 }
 private void DrawCenter(Cluster cluster, DrawingContext drawingContext)
 {
     drawingContext.DrawEllipse(Brushes.Blue, null, new System.Windows.Point(cluster.Center.X, cluster.Center.Y), centerSize, centerSize);
 }