public JPSAlgorithmHelper() { HeursticInfo = new JPSHeurstic() { HeuristicFunc = HeuristicFunction.Euclidean }; }
/// <summary> /// 构造函数 - 将参数传入节点内进行初始化 /// </summary> /// <param name="mFPoint3">点</param> /// <param name="mParentNode">父节点</param> public Node(FPoint3 mFPoint3, Node mParentNode, JPSHeurstic mHeurstic = null) : base() { ///mHeurstic不要写成Static,否则没办法多线程并行化处理~ ///函数式编程的IDEA吧。 /// NodeLocation = new FPoint3(mFPoint3.X, mFPoint3.Y, mFPoint3.Z); ParentNode = mParentNode; if (mHeurstic != null) { ///刷出来俩宝贝。。。。。 GValue = mHeurstic.GValueFunction(this); HValue = mHeurstic.HValueFunction(this); } else { GValue = 0; HValue = double.MaxValue; } }