Пример #1
0
 public Vector2 this[SplicedPoint <TBasePoint> point]
 {
     get
     {
         return(baseMap[point.BasePoint] + offsets[point.I]);
     }
 }
Пример #2
0
 public static InspectableSplicedVectorPoint Create <TBasePoint>(SplicedPoint <TBasePoint> point)
     where TBasePoint : IVectorPoint <TBasePoint>, IGridPoint <TBasePoint>
 {
     return(new InspectableSplicedVectorPoint
     {
         x = point.BasePoint.X,
         y = point.BasePoint.Y,
         index = point.I
     });
 }
Пример #3
0
        public TCell this[SplicedPoint <TBasePoint> point]
        {
            get
            {
                return(baseGrid[point.BasePoint][point.I]);
            }

            set
            {
                baseGrid[point.BasePoint][point.I] = value;
            }
        }
Пример #4
0
 /**
  *      This method is not implemented for generic grids.
  *
  *      You have to override this method in a base class, and provide
  *      a suitable implementation for your grid.
  */
 public int DistanceFrom(SplicedPoint <TBasePoint> other)
 {
     throw new System.NotImplementedException();
 }
Пример #5
0
 public bool Equals(SplicedPoint <TBasePoint> other)
 {
     return((index == other.index) && basePoint.Equals(other.basePoint));
 }
Пример #6
0
 public IEnumerable <SplicedPoint <TBasePoint> > GetAllNeighbors(SplicedPoint <TBasePoint> point)
 {
     throw new System.NotImplementedException();
 }
Пример #7
0
 object IGrid <SplicedPoint <TBasePoint> > .this[SplicedPoint <TBasePoint> point]
 {
     get { return(this[point]); }
     set { this[point] = (TCell)value; }
 }
Пример #8
0
 public bool Contains(SplicedPoint <TBasePoint> point)
 {
     return(baseGrid.Contains(point.BasePoint) && point.I >= 0 && point.I < spliceCount);
 }