当前位置: 首页>>代码示例>>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;未经允许,请勿转载。