CrowdAgent.pkg 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. $#include "Navigation/CrowdAgent.h"
  2. enum CrowdAgentRequestedTarget
  3. {
  4. CA_REQUESTEDTARGET_NONE = 0,
  5. CA_REQUESTEDTARGET_POSITION,
  6. CA_REQUESTEDTARGET_VELOCITY
  7. };
  8. enum CrowdAgentTargetState
  9. {
  10. CA_TARGET_NONE = 0,
  11. CA_TARGET_FAILED,
  12. CA_TARGET_VALID,
  13. CA_TARGET_REQUESTING,
  14. CA_TARGET_WAITINGFORQUEUE,
  15. CA_TARGET_WAITINGFORPATH,
  16. CA_TARGET_VELOCITY
  17. };
  18. enum CrowdAgentState
  19. {
  20. CA_STATE_INVALID = 0,
  21. CA_STATE_WALKING,
  22. CA_STATE_OFFMESH
  23. };
  24. enum NavigationQuality
  25. {
  26. NAVIGATIONQUALITY_LOW = 0,
  27. NAVIGATIONQUALITY_MEDIUM,
  28. NAVIGATIONQUALITY_HIGH
  29. };
  30. enum NavigationPushiness
  31. {
  32. NAVIGATIONPUSHINESS_LOW = 0,
  33. NAVIGATIONPUSHINESS_MEDIUM,
  34. NAVIGATIONPUSHINESS_HIGH,
  35. NAVIGATIONPUSHINESS_NONE
  36. };
  37. class CrowdAgent : public Component
  38. {
  39. void DrawDebugGeometry(bool depthTest);
  40. void SetTargetPosition(const Vector3& position);
  41. void SetTargetVelocity(const Vector3& velocity);
  42. void ResetTarget();
  43. void SetUpdateNodePosition(bool unodepos);
  44. void SetMaxAccel(float maxAccel);
  45. void SetMaxSpeed(float maxSpeed);
  46. void SetRadius(float radius);
  47. void SetHeight(float height);
  48. void SetQueryFilterType(unsigned queryFilterType);
  49. void SetObstacleAvoidanceType(unsigned obstacleOvoidanceType);
  50. void SetNavigationQuality(NavigationQuality val);
  51. void SetNavigationPushiness(NavigationPushiness val);
  52. Vector3 GetPosition() const;
  53. Vector3 GetDesiredVelocity() const;
  54. Vector3 GetActualVelocity() const;
  55. const Vector3& GetTargetPosition() const;
  56. const Vector3& GetTargetVelocity() const;
  57. CrowdAgentRequestedTarget GetRequestedTargetType() const;
  58. CrowdAgentState GetAgentState() const;
  59. CrowdAgentTargetState GetTargetState() const;
  60. bool GetUpdateNodePosition() const;
  61. float GetMaxAccel() const;
  62. float GetMaxSpeed() const;
  63. float GetRadius() const;
  64. float GetHeight() const;
  65. unsigned GetQueryFilterType() const;
  66. unsigned GetObstacleAvoidanceType() const;
  67. NavigationQuality GetNavigationQuality() const;
  68. NavigationPushiness GetNavigationPushiness() const;
  69. bool HasRequestedTarget() const;
  70. bool HasArrived() const;
  71. bool IsInCrowd() const;
  72. tolua_property__get_set Vector3 targetPosition;
  73. tolua_property__get_set Vector3 targetVelocity;
  74. tolua_property__get_set bool updateNodePosition;
  75. tolua_property__get_set float maxAccel;
  76. tolua_property__get_set float maxSpeed;
  77. tolua_property__get_set float radius;
  78. tolua_property__get_set float height;
  79. tolua_property__get_set unsigned queryFilterType;
  80. tolua_property__get_set unsigned obstacleAvoidanceType;
  81. tolua_property__get_set NavigationQuality navigationQuality;
  82. tolua_property__get_set NavigationPushiness navigationPushiness;
  83. tolua_readonly tolua_property__get_set Vector3 position;
  84. tolua_readonly tolua_property__get_set Vector3 desiredVelocity;
  85. tolua_readonly tolua_property__get_set Vector3 actualVelocity;
  86. tolua_readonly tolua_property__get_set CrowdAgentRequestedTarget requestedTargetType;
  87. tolua_readonly tolua_property__get_set CrowdAgentState agentState;
  88. tolua_readonly tolua_property__get_set CrowdAgentTargetState targetState;
  89. tolua_readonly tolua_property__has_set bool requestedTarget;
  90. tolua_readonly tolua_property__has_set bool arrived;
  91. tolua_readonly tolua_property__is_set bool inCrowd;
  92. };