本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}