change interface SegmentVert

This commit is contained in:
ikpil 2023-06-25 22:46:18 +09:00
parent 1d7c329f23
commit 6d8062b41e
2 changed files with 8 additions and 8 deletions

View File

@ -118,8 +118,8 @@ namespace DotRecast.Detour.Crowd
for (int k = 0; k < segmentRefs.Count; ++k)
{
SegmentVert s = segmentVerts[k];
var s0 = RcVec3f.Of(s[0], s[1], s[2]);
var s3 = RcVec3f.Of(s[3], s[4], s[5]);
var s0 = s.vmin;
var s3 = s.vmax;
// Skip too distant segments.
var distSqr = DetourCommon.DistancePtSegSqr2D(pos, s0, s3, out var tseg);

View File

@ -845,8 +845,8 @@ public class TestNavmeshTool : IRcTool
for (int j = 0; j < segmentVerts.Count; ++j)
{
SegmentVert s = segmentVerts[j];
var v0 = RcVec3f.Of(s[0], s[1], s[2]);
var s3 = RcVec3f.Of(s[3], s[4], s[5]);
var v0 = s.vmin;
var s3 = s.vmax;
// Skip too distant segments.
var distSqr = DetourCommon.DistancePtSegSqr2D(m_spos, v0, s3, out var tseg);
if (distSqr > RcMath.Sqr(m_neighbourhoodRadius))
@ -863,8 +863,8 @@ public class TestNavmeshTool : IRcTool
if (segmentRefs[j] != 0)
{
int col = DuRGBA(255, 255, 255, 32);
dd.Vertex(s[0], s[1] + agentClimb, s[2], col);
dd.Vertex(s[3], s[4] + agentClimb, s[5], col);
dd.Vertex(s.vmin.x, s.vmin.y + agentClimb, s.vmin.z, col);
dd.Vertex(s.vmax.x, s.vmax.y + agentClimb, s.vmax.z, col);
}
else
{
@ -877,8 +877,8 @@ public class TestNavmeshTool : IRcTool
dd.Vertex(p0.x, p0.y + agentClimb, p0.z, col);
dd.Vertex(p1.x, p1.y + agentClimb, p1.z, col);
dd.Vertex(s[0], s[1] + agentClimb, s[2], col);
dd.Vertex(s[3], s[4] + agentClimb, s[5], col);
dd.Vertex(s.vmin.x, s.vmin.y + agentClimb, s.vmin.z, col);
dd.Vertex(s.vmax.x, s.vmax.y + agentClimb, s.vmax.z, col);
}
}