CrowdAgent.pkg 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. $#include "Navigation/CrowdAgent.h"
  2. enum CrowdTargetState
  3. {
  4. CROWD_AGENT_TARGET_NONE = 0,
  5. CROWD_AGENT_TARGET_FAILED,
  6. CROWD_AGENT_TARGET_VALID,
  7. CROWD_AGENT_TARGET_REQUESTING,
  8. CROWD_AGENT_TARGET_WAITINGFORPATH,
  9. CROWD_AGENT_TARGET_WAITINGFORQUEUE,
  10. CROWD_AGENT_TARGET_VELOCITY,
  11. CROWD_AGENT_TARGET_ARRIVED
  12. };
  13. enum CrowdAgentState
  14. {
  15. CROWD_AGENT_INVALID = 0,
  16. CROWD_AGENT_READY,
  17. CROWD_AGENT_TRAVERSINGLINK
  18. };
  19. class CrowdAgent : public Component
  20. {
  21. void SetNavigationFilterType(unsigned filterID);
  22. bool SetMoveTarget(const Vector3& position);
  23. bool SetMoveVelocity(const Vector3& velocity);
  24. void SetUpdateNodePosition(bool unodepos);
  25. void SetMaxAccel(float val);
  26. void SetMaxSpeed(float val);
  27. void SetNavigationQuality(NavigationQuality val);
  28. void SetNavigationPushiness(NavigationPushiness val);
  29. void SetRadius(float radius);
  30. void SetHeight(float height);
  31. unsigned GetNavigationFilterType() const;
  32. Vector3 GetDesiredVelocity() const;
  33. Vector3 GetActualVelocity() const;
  34. const Vector3& GetTargetPosition() const;
  35. CrowdAgentState GetAgentState() const;
  36. CrowdTargetState GetTargetState() const;
  37. bool GetUpdateNodePosition() const;
  38. float GetMaxSpeed() const;
  39. float GetMaxAccel() const;
  40. NavigationQuality GetNavigationQuality() const;
  41. NavigationPushiness GetNavigationPushiness() const;
  42. float GetRadius() const;
  43. float GetHeight() const;
  44. Vector3 GetPosition() const;
  45. void DrawDebugGeometry(bool depthTest);
  46. tolua_property__get_set bool updateNodePosition;
  47. tolua_property__get_set NavigationQuality navigationQuality;
  48. tolua_property__get_set NavigationPushiness navigationPushiness;
  49. tolua_property__get_set float maxSpeed;
  50. tolua_property__get_set float maxAccel;
  51. tolua_property__get_set float radius;
  52. tolua_property__get_set float height;
  53. tolua_property__get_set unsigned navigationFilterType;
  54. tolua_readonly tolua_property__get_set Vector3 desiredVelocity;
  55. tolua_readonly tolua_property__get_set Vector3 actualVelocity;
  56. tolua_readonly tolua_property__get_set Vector3 targetPosition;
  57. tolua_readonly tolua_property__get_set Vector3 position;
  58. tolua_readonly tolua_property__get_set CrowdAgentState agentState;
  59. tolua_readonly tolua_property__get_set CrowdTargetState targetState;
  60. };