forked from bit/DotRecastNetSim
remove Tuple<int, Vector3f>
This commit is contained in:
parent
bf07c8f3ff
commit
ba89398253
|
@ -1183,10 +1183,8 @@ namespace DotRecast.Detour.Crowd
|
||||||
|
|
||||||
if (adaptive)
|
if (adaptive)
|
||||||
{
|
{
|
||||||
var nsnvel = _obstacleQuery.SampleVelocityAdaptive(ag.npos, ag.option.radius,
|
ns = _obstacleQuery.SampleVelocityAdaptive(ag.npos, ag.option.radius, ag.desiredSpeed,
|
||||||
ag.desiredSpeed, ag.vel, ag.dvel, option, vod);
|
ag.vel, ag.dvel, out ag.nvel, option, vod);
|
||||||
ns = nsnvel.Item1;
|
|
||||||
ag.nvel = nsnvel.Item2;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -383,8 +383,9 @@ namespace DotRecast.Detour.Crowd
|
||||||
|
|
||||||
static readonly float DT_PI = 3.14159265f;
|
static readonly float DT_PI = 3.14159265f;
|
||||||
|
|
||||||
public Tuple<int, Vector3f> SampleVelocityAdaptive(Vector3f pos, float rad, float vmax, Vector3f vel,
|
public int SampleVelocityAdaptive(Vector3f pos, float rad, float vmax, Vector3f vel, Vector3f dvel, out Vector3f nvel,
|
||||||
Vector3f dvel, ObstacleAvoidanceParams option, ObstacleAvoidanceDebugData debug)
|
ObstacleAvoidanceParams option,
|
||||||
|
ObstacleAvoidanceDebugData debug)
|
||||||
{
|
{
|
||||||
Prepare(pos, dvel);
|
Prepare(pos, dvel);
|
||||||
m_params = option;
|
m_params = option;
|
||||||
|
@ -392,7 +393,7 @@ namespace DotRecast.Detour.Crowd
|
||||||
m_vmax = vmax;
|
m_vmax = vmax;
|
||||||
m_invVmax = vmax > 0 ? 1.0f / vmax : float.MaxValue;
|
m_invVmax = vmax > 0 ? 1.0f / vmax : float.MaxValue;
|
||||||
|
|
||||||
Vector3f nvel = Vector3f.Zero;
|
nvel = Vector3f.Zero;
|
||||||
|
|
||||||
if (debug != null)
|
if (debug != null)
|
||||||
debug.Reset();
|
debug.Reset();
|
||||||
|
@ -490,7 +491,7 @@ namespace DotRecast.Detour.Crowd
|
||||||
|
|
||||||
nvel = res;
|
nvel = res;
|
||||||
|
|
||||||
return Tuple.Create(ns, nvel);
|
return ns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue