Example #1
0
 /// <summary>
 /// Copies input plate points to this plate.
 /// </summary>
 /// <param name="cPlate">Input plate.</param>
 public void Copy(Plate cPlate)
 {
     Value.Clear();
     for (int i = 0; i < cPlate.Value.Count; i++)
     {
         Value.Add(new Point(cPlate.Value[i].XCoord, cPlate.Value[i].YCoord, cPlate.Value[i].Height));
     }
 }
Example #2
0
 /// <summary>
 /// Allocates space for arrays and sets up the point class.
 /// </summary>
 /// <param name="iSize">Size of the map, see <see cref="_layerSize"/></param>
 /// <param name="iNumberPlates">Number of plates in <see cref="Plates"/></param>
 public PlateLayer(int iSize, int iNumberPlates)
 {
     _layerSize = iSize;
     Plates     = new Plate[iNumberPlates];
     for (int i = 0; i < Plates.Length; i++)
     {
         Plates[i] = new Plate();
     }
     Map = new Point[2 * _layerSize, _layerSize];
     Point.MapSetup(iSize);
     for (int x = 0; x < 2 * _layerSize; x++)
     {
         for (int y = 0; y < _layerSize; y++)
         {
             Map[x, y] = new Point(x, y);
         }
     }
     testPlate    = new Plate();
     plateTracker = new int[2 * _layerSize, _layerSize];
 }
Example #3
0
 /// <summary>
 /// Allocates space for arrays and sets up the point class.
 /// </summary>
 /// <param name="iSize">Size of the map, see <see cref="_layerSize"/></param>
 /// <param name="iNumberPlates">Number of plates in <see cref="Plates"/></param>
 public PlateLayer(int iSize, int iNumberPlates)
 {
     _layerSize = iSize;
     BasePoint.MapSetup(iSize);
     Plates = new Plate[iNumberPlates];
     for (int i = 0; i < Plates.Length; i++)
     {
         Plates[i] = new Plate();
     }
     temporaryPlate  = new Plate();
     ActivePoints    = new bool[2 * _layerSize, _layerSize];
     PastPlates      = new int[2 * _layerSize, _layerSize];
     PastHeights     = new double[2 * _layerSize, _layerSize];
     PointMagnitudes = new double[2 * _layerSize, _layerSize];
     PointMap        = new BasePoint[2 * _layerSize, _layerSize];
     for (int x = 0; x < 2 * _layerSize; x++)
     {
         for (int y = 0; y < _layerSize; y++)
         {
             PointMap[x, y] = new BasePoint(x, y);
         }
     }
 }