www.pudn.com > PersonModel-1.1.rar > Model.cs, change:2012-04-01,size:3373b


using System.Drawing; 
using System.Collections; 
using System.Collections.Generic; 
 
namespace PersonModel 
{ 
    public class Model 
    { 
       //  
         public const double root2 = 1.414; 
         private string tyle; 
         public string Tyle 
         { 
             set { 
                 tyle = value; 
             } 
             get { 
                 return tyle; 
             } 
         } 
        private int x; 
        /// <summary> 
        /// 网格的横坐标值 
        /// </summary> 
        
        public int X { 
            set { 
                x = value; 
            } 
            get { 
                return x; 
            } 
        } 
 
        private int y; 
        /// <summary> 
        /// 网格的纵坐标值 
        /// </summary> 
 
        public int Y 
        { 
            set 
            { 
                y = value; 
            } 
            get 
            { 
                return y; 
            } 
        } 
 
        private int costG = 0; 
        /// <summary> 
        /// CostG 从起点导航到本节点的代价。 
        /// </summary> 
        public int CostG 
        { 
            set { costG = value; } 
            get { return costG; } 
        } 
 
 
        private int costH = 0; 
        /// <summary> 
        /// CostH 使用启发式方法估算的从本节点到目的节点的代价。 
        /// </summary> 
        public int CostH 
        { 
            set { costH = value; } 
            get { return costH; } 
        } 
        /// <summary> 
        /// costg  
        /// </summary> 
        public int CostF 
        { 
            get 
            { 
                return this.costG + this.costH; 
            } 
        } 
 
        private Model previousNode; 
        public Model PreviousNode { 
            set { 
                previousNode = value; 
            } 
            get { 
                return previousNode; 
            } 
        } 
 
        public void ResetPreviousNode(Model previous, int _costG) 
        { 
            this.previousNode = previous; 
            this.costG = _costG; 
        } 
 
        private double intergral; 
        public double Intergral { 
            set { 
                intergral = value; 
            } 
            get { 
                return intergral; 
            } 
        } 
 
        private bool tongguo; 
 
        public bool Tonggguo { 
            set { 
                tongguo = value; 
            } 
            get { 
                return tongguo; 
            } 
        } 
 
        private bool isbiaoji; 
        public bool Isbiaoji { 
            set { 
                isbiaoji = value; 
            } 
 
            get { 
                return isbiaoji; 
            } 
        } 
       public IList<Point> plan = new List<Point>(); 
       public void AddPath(Point point) 
       { 
            plan.Add(point); 
       } 
       public IList<Point> getPath() 
       { 
           return plan; 
       } 
       public void removePath(Point point) 
       { 
           plan.Remove(point); 
       } 
 
       private int counter; 
       public int Counter { 
           set {  
           if(value >= 0) 
               counter = value; 
           } 
           get { 
               return counter; 
           } 
       } 
     } 
}