本文整理匯總了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;
}