DtCrowdAgentParams.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
  3. recast4j copyright (c) 2015-2019 Piotr Piastucki piotr@jtilia.org
  4. DotRecast Copyright (c) 2023 Choi Ikpil ikpil@naver.com
  5. This software is provided 'as-is', without any express or implied
  6. warranty. In no event will the authors be held liable for any damages
  7. arising from the use of this software.
  8. Permission is granted to anyone to use this software for any purpose,
  9. including commercial applications, and to alter it and redistribute it
  10. freely, subject to the following restrictions:
  11. 1. The origin of this software must not be misrepresented; you must not
  12. claim that you wrote the original software. If you use this software
  13. in a product, an acknowledgment in the product documentation would be
  14. appreciated but is not required.
  15. 2. Altered source versions must be plainly marked as such, and must not be
  16. misrepresented as being the original software.
  17. 3. This notice may not be removed or altered from any source distribution.
  18. */
  19. namespace DotRecast.Detour.Crowd
  20. {
  21. /// Configuration parameters for a crowd agent.
  22. /// @ingroup crowd
  23. public class DtCrowdAgentParams
  24. {
  25. /// < Agent radius. [Limit: >= 0]
  26. public float radius;
  27. /// < Agent height. [Limit: > 0]
  28. public float height;
  29. /// < Maximum allowed acceleration. [Limit: >= 0]
  30. public float maxAcceleration;
  31. /// < Maximum allowed speed. [Limit: >= 0]
  32. public float maxSpeed;
  33. /// Defines how close a collision element must be before it is considered for steering behaviors. [Limits: > 0]
  34. public float collisionQueryRange;
  35. /// < The path visibility optimization range. [Limit: > 0]
  36. public float pathOptimizationRange;
  37. /// How aggresive the agent manager should be at avoiding collisions with this agent. [Limit: >= 0]
  38. public float separationWeight;
  39. /// Crowd agent update flags.
  40. public const int DT_CROWD_ANTICIPATE_TURNS = 1;
  41. public const int DT_CROWD_OBSTACLE_AVOIDANCE = 2;
  42. public const int DT_CROWD_SEPARATION = 4;
  43. public const int DT_CROWD_OPTIMIZE_VIS = 8;
  44. /// < Use #dtPathCorridor::OptimizePathVisibility() to optimize
  45. /// the agent path.
  46. public const int DT_CROWD_OPTIMIZE_TOPO = 16;
  47. /// < Use dtPathCorridor::OptimizePathTopology() to optimize
  48. /// the agent path.
  49. /// Flags that impact steering behavior. (See: #UpdateFlags)
  50. public int updateFlags;
  51. /// The index of the avoidance configuration to use for the agent.
  52. /// [Limits: 0 <= value < #DT_CROWD_MAX_OBSTAVOIDANCE_PARAMS]
  53. public int obstacleAvoidanceType;
  54. /// The index of the query filter used by this agent.
  55. public int queryFilterType;
  56. /// User defined data attached to the agent.
  57. public object userData;
  58. }
  59. }