Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/helpers/VertexPathfinder.cpp
Show First 20 Lines • Show All 506 Lines • ▼ Show 20 Lines | bool operator()(const Square& a, const Square& b) const | ||||
if ((a.p0 - src).CompareLength(b.p0 - src) < 0) | if ((a.p0 - src).CompareLength(b.p0 - src) < 0) | ||||
return true; | return true; | ||||
return false; | return false; | ||||
} | } | ||||
}; | }; | ||||
WaypointPath VertexPathfinder::ComputeShortPath(const ShortPathRequest& request, CmpPtr<ICmpObstructionManager> cmpObstructionManager) const | WaypointPath VertexPathfinder::ComputeShortPath(const ShortPathRequest& request, CmpPtr<ICmpObstructionManager> cmpObstructionManager) const | ||||
{ | { | ||||
PROFILE2("ComputeShortPath"); | PROFILE3("ComputeShortPath"); | ||||
DebugRenderGoal(cmpObstructionManager->GetSimContext(), request.goal); | DebugRenderGoal(cmpObstructionManager->GetSimContext(), request.goal); | ||||
// Create impassable edges at the max-range boundary, so we can't escape the region | // Create impassable edges at the max-range boundary, so we can't escape the region | ||||
// where we're meant to be searching | // where we're meant to be searching | ||||
fixed rangeXMin = request.x0 - request.range; | fixed rangeXMin = request.x0 - request.range; | ||||
fixed rangeXMax = request.x0 + request.range; | fixed rangeXMax = request.x0 + request.range; | ||||
fixed rangeZMin = request.z0 - request.range; | fixed rangeZMin = request.z0 - request.range; | ||||
▲ Show 20 Lines • Show All 450 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator