Esempio n. 1
0
 public PotentialField(GridTransformer gridTransformer, Point2 targetNodePosition, Array2D <float> potentialArray) : base(gridTransformer)
 {
     if (potentialArray.Width != gridTransformer.GridSize.X || potentialArray.Height != gridTransformer.GridSize.Y)
     {
         throw new ArgumentException("The grid dimensions of the transformer have to match the array");
     }
     PotentialArray      = potentialArray;
     TargetNode          = targetNodePosition;
     TargetWorldPosition = gridTransformer.ToWorld(targetNodePosition);
 }
Esempio n. 2
0
 public PotentialField(GridTransformer gridTransformer, Point2 targetNodePosition) : base(gridTransformer)
 {
     TargetNode          = targetNodePosition;
     TargetWorldPosition = gridTransformer.ToWorld(targetNodePosition);
 }