From bd4825dcd50a4ddd39aba3a9203b7f724b91f5cd Mon Sep 17 00:00:00 2001 From: ikpil Date: Wed, 14 Feb 2024 01:48:33 +0900 Subject: [PATCH] reposition DtCrwdAgent class comment --- src/DotRecast.Detour.Crowd/DtCrowdAgent.cs | 52 +++++--------------- src/DotRecast.Detour.Crowd/DtPathCorridor.cs | 7 +-- 2 files changed, 16 insertions(+), 43 deletions(-) diff --git a/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs b/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs index 032d92d..0e2e3f8 100644 --- a/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs +++ b/src/DotRecast.Detour.Crowd/DtCrowdAgent.cs @@ -33,8 +33,7 @@ namespace DotRecast.Detour.Crowd /// The type of mesh polygon the agent is traversing. (See: #CrowdAgentState) public DtCrowdAgentState state; - /// True if the agent has valid path (targetState == DT_CROWDAGENT_TARGET_VALID) and the path does not lead to the - /// requested position, else false. + /// True if the agent has valid path (targetState == DT_CROWDAGENT_TARGET_VALID) and the path does not lead to the requested position, else false. public bool partial; /// The path corridor the agent is using. @@ -52,51 +51,24 @@ namespace DotRecast.Detour.Crowd /// The desired speed. public float desiredSpeed; - public RcVec3f npos = new RcVec3f(); + public RcVec3f npos = new RcVec3f(); // < The current agent position. [(x, y, z)] + public RcVec3f disp = new RcVec3f(); // < A temporary value used to accumulate agent displacement during iterative collision resolution. [(x, y, z)] + public RcVec3f dvel = new RcVec3f(); // < The desired velocity of the agent. Based on the current path, calculated from scratch each frame. [(x, y, z)] + public RcVec3f nvel = new RcVec3f(); // < The desired velocity adjusted by obstacle avoidance, calculated from scratch each frame. [(x, y, z)] + public RcVec3f vel = new RcVec3f(); // < The actual velocity of the agent. The change from nvel -> vel is constrained by max acceleration. [(x, y, z)] - /// < The current agent position. [(x, y, z)] - public RcVec3f disp = new RcVec3f(); - - /// < A temporary value used to accumulate agent displacement during iterative - /// collision resolution. [(x, y, z)] - public RcVec3f dvel = new RcVec3f(); - - /// < The desired velocity of the agent. Based on the current path, calculated - /// from - /// scratch each frame. [(x, y, z)] - public RcVec3f nvel = new RcVec3f(); - - /// < The desired velocity adjusted by obstacle avoidance, calculated from scratch each - /// frame. [(x, y, z)] - public RcVec3f vel = new RcVec3f(); - - /// < The actual velocity of the agent. The change from nvel -> vel is - /// constrained by max acceleration. [(x, y, z)] /// The agent's configuration parameters. public DtCrowdAgentParams option; /// The local path corridor corners for the agent. public List corners = new List(); - public DtMoveRequestState targetState; - - /// < State of the movement request. - public long targetRef; - - /// < Target polyref of the movement request. - public RcVec3f targetPos = new RcVec3f(); - - /// < Target position of the movement request (or velocity in case of - /// DT_CROWDAGENT_TARGET_VELOCITY). - public DtPathQueryResult targetPathQueryResult; - - /// < Path finder query - public bool targetReplan; - - /// < Flag indicating that the current path is being replanned. - public float targetReplanTime; - - ///