當前位置: 首頁>>代碼示例>>C#>>正文


C# NNInfo.UpdateInfo方法代碼示例

本文整理匯總了C#中Pathfinding.NNInfo.UpdateInfo方法的典型用法代碼示例。如果您正苦於以下問題:C# NNInfo.UpdateInfo方法的具體用法?C# NNInfo.UpdateInfo怎麽用?C# NNInfo.UpdateInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Pathfinding.NNInfo的用法示例。


在下文中一共展示了NNInfo.UpdateInfo方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Query

		public NNInfo Query (Vector3 p, NNConstraint constraint) {
			
			BBTreeBox c = root;
			
			if (c == null) {
				return new NNInfo();
			}
			
			NNInfo nnInfo = new NNInfo ();
			
			SearchBox (c,p, constraint, ref nnInfo);
			
			nnInfo.UpdateInfo ();
			
			return nnInfo;
		}
開發者ID:JoseRego,項目名稱:summer-rush,代碼行數:16,代碼來源:BBTree.cs

示例2: QueryCircle

		/** Queries the tree for the best node, searching within a circle around \a p with the specified radius.
		  * Will fill in both the constrained node and the not constrained node in the NNInfo.
		  * 
		  * \see QueryClosest
		  */
		public NNInfo QueryCircle (Vector3 p, float radius, NNConstraint constraint) {
			BBTreeBox c = root;
			
			if (c == null) {
				return new NNInfo();
			}
			
#if ASTARDEBUG
			Vector3 prev = new Vector3 (1,0,0)*radius+p;
			for (double i=0;i< Math.PI*2; i += Math.PI/50.0) {
				Vector3 cpos = new Vector3 ((float)Math.Cos (i),0,(float)Math.Sin (i))*radius+p;
				Debug.DrawLine (prev,cpos,Color.yellow);
				prev = cpos;
			}
#endif
			
			NNInfo nnInfo = new NNInfo (null);
			
			SearchBoxCircle (c,p, radius, constraint, ref nnInfo);
			
			nnInfo.UpdateInfo ();
			
			return nnInfo;
		}
開發者ID:JoseRego,項目名稱:summer-rush,代碼行數:29,代碼來源:BBTree.cs

示例3: QueryCircle

		/** Queries the tree for the best node, searching within a circle around \a p with the specified radius.
		  * Will fill in both the constrained node and the not constrained node in the NNInfo.
		  *
		  * \see QueryClosest
		  */
		public NNInfo QueryCircle (Vector3 p, float radius, NNConstraint constraint) {

			if ( count == 0 ) return new NNInfo(null);

			var nnInfo = new NNInfo (null);

			SearchBoxCircle (0,p, radius, constraint, ref nnInfo);

			nnInfo.UpdateInfo ();

			return nnInfo;
		}
開發者ID:smclallen,項目名稱:Galactic_Parcel_Service,代碼行數:17,代碼來源:BBTree.cs

示例4: Query

		public NNInfo Query (Vector3 p, NNConstraint constraint) {

			if ( count == 0 ) return new NNInfo(null);

			var nnInfo = new NNInfo ();

			SearchBox (0,p, constraint, ref nnInfo);

			nnInfo.UpdateInfo ();

			return nnInfo;
		}
開發者ID:smclallen,項目名稱:Galactic_Parcel_Service,代碼行數:12,代碼來源:BBTree.cs

示例5: QueryCircle

 public NNInfo QueryCircle(Vector3 p, float radius, NNConstraint constraint)
 {
     if (this.count == 0)
     {
         return new NNInfo(null);
     }
     NNInfo result = new NNInfo(null);
     this.SearchBoxCircle(0, p, radius, constraint, ref result);
     result.UpdateInfo();
     return result;
 }
開發者ID:GameDiffs,項目名稱:TheForest,代碼行數:11,代碼來源:BBTree.cs


注:本文中的Pathfinding.NNInfo.UpdateInfo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。