CrowdAgent.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // CrowdAgent.cs
  6. //
  7. // Copyright 2015 Xamarin Inc. All rights reserved.
  8. using System;
  9. using System.Runtime.InteropServices;
  10. using System.Collections.Generic;
  11. using Urho.Urho2D;
  12. using Urho.Gui;
  13. using Urho.Resources;
  14. using Urho.IO;
  15. using Urho.Navigation;
  16. using Urho.Network;
  17. namespace Urho.Navigation
  18. {
  19. /// <summary>
  20. /// Crowd agent component, requires a CrowdManager component in the scene. When not set explicitly, agent's radius and height are defaulted to navigation mesh's agent radius and height, respectively.
  21. /// </summary>
  22. public unsafe partial class CrowdAgent : Component
  23. {
  24. unsafe partial void OnCrowdAgentCreated ();
  25. [Preserve]
  26. public CrowdAgent (IntPtr handle) : base (handle)
  27. {
  28. OnCrowdAgentCreated ();
  29. }
  30. [Preserve]
  31. protected CrowdAgent (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnCrowdAgentCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int CrowdAgent_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (CrowdAgent_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr CrowdAgent_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (CrowdAgent_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int CrowdAgent_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(CrowdAgent));
  54. return new StringHash (CrowdAgent_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr CrowdAgent_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(CrowdAgent));
  61. return Marshal.PtrToStringAnsi (CrowdAgent_GetTypeNameStatic ());
  62. }
  63. [Preserve]
  64. public CrowdAgent () : this (Application.CurrentContext)
  65. {
  66. }
  67. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  68. internal static extern IntPtr CrowdAgent_CrowdAgent (IntPtr context);
  69. [Preserve]
  70. public CrowdAgent (Context context) : base (UrhoObjectFlag.Empty)
  71. {
  72. Runtime.Validate (typeof(CrowdAgent));
  73. handle = CrowdAgent_CrowdAgent ((object)context == null ? IntPtr.Zero : context.Handle);
  74. Runtime.RegisterObject (this);
  75. OnCrowdAgentCreated ();
  76. }
  77. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  78. internal static extern void CrowdAgent_RegisterObject (IntPtr context);
  79. /// <summary>
  80. /// Register object factory.
  81. /// </summary>
  82. public new static void RegisterObject (Context context)
  83. {
  84. Runtime.Validate (typeof(CrowdAgent));
  85. CrowdAgent_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  86. }
  87. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  88. internal static extern void CrowdAgent_ApplyAttributes (IntPtr handle);
  89. /// <summary>
  90. /// Apply attribute changes that can not be applied immediately. Called after scene load or a network update.
  91. /// </summary>
  92. public override void ApplyAttributes ()
  93. {
  94. Runtime.ValidateRefCounted (this);
  95. CrowdAgent_ApplyAttributes (handle);
  96. }
  97. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  98. internal static extern void CrowdAgent_OnSetEnabled (IntPtr handle);
  99. /// <summary>
  100. /// Handle enabled/disabled state change.
  101. /// </summary>
  102. public override void OnSetEnabled ()
  103. {
  104. Runtime.ValidateRefCounted (this);
  105. CrowdAgent_OnSetEnabled (handle);
  106. }
  107. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  108. internal static extern void CrowdAgent_DrawDebugGeometry (IntPtr handle, bool depthTest);
  109. /// <summary>
  110. /// Draw debug geometry.
  111. /// </summary>
  112. public void DrawDebugGeometry (bool depthTest)
  113. {
  114. Runtime.ValidateRefCounted (this);
  115. CrowdAgent_DrawDebugGeometry (handle, depthTest);
  116. }
  117. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  118. internal static extern void CrowdAgent_DrawDebugGeometry0 (IntPtr handle, IntPtr debug, bool depthTest);
  119. /// <summary>
  120. /// Draw debug feelers.
  121. /// </summary>
  122. public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
  123. {
  124. Runtime.ValidateRefCounted (this);
  125. CrowdAgent_DrawDebugGeometry0 (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
  126. }
  127. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  128. internal static extern void CrowdAgent_SetTargetPosition (IntPtr handle, ref Urho.Vector3 position);
  129. /// <summary>
  130. /// Submit a new target position request for this agent.
  131. /// </summary>
  132. private void SetTargetPosition (Urho.Vector3 position)
  133. {
  134. Runtime.ValidateRefCounted (this);
  135. CrowdAgent_SetTargetPosition (handle, ref position);
  136. }
  137. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  138. internal static extern void CrowdAgent_SetTargetVelocity (IntPtr handle, ref Urho.Vector3 velocity);
  139. /// <summary>
  140. /// Submit a new target velocity request for this agent.
  141. /// </summary>
  142. private void SetTargetVelocity (Urho.Vector3 velocity)
  143. {
  144. Runtime.ValidateRefCounted (this);
  145. CrowdAgent_SetTargetVelocity (handle, ref velocity);
  146. }
  147. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  148. internal static extern void CrowdAgent_ResetTarget (IntPtr handle);
  149. /// <summary>
  150. /// Reset any target request for the specified agent. Note that the agent will continue to move into the current direction; set a zero target velocity to actually stop.
  151. /// </summary>
  152. public void ResetTarget ()
  153. {
  154. Runtime.ValidateRefCounted (this);
  155. CrowdAgent_ResetTarget (handle);
  156. }
  157. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  158. internal static extern void CrowdAgent_SetUpdateNodePosition (IntPtr handle, bool unodepos);
  159. /// <summary>
  160. /// Update the node position. When set to false, the node position should be updated by other means (e.g. using Physics) in response to the E_CROWD_AGENT_REPOSITION event.
  161. /// </summary>
  162. private void SetUpdateNodePosition (bool unodepos)
  163. {
  164. Runtime.ValidateRefCounted (this);
  165. CrowdAgent_SetUpdateNodePosition (handle, unodepos);
  166. }
  167. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  168. internal static extern void CrowdAgent_SetMaxAccel (IntPtr handle, float maxAccel);
  169. /// <summary>
  170. /// Set the agent's max acceleration.
  171. /// </summary>
  172. private void SetMaxAccel (float maxAccel)
  173. {
  174. Runtime.ValidateRefCounted (this);
  175. CrowdAgent_SetMaxAccel (handle, maxAccel);
  176. }
  177. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  178. internal static extern void CrowdAgent_SetMaxSpeed (IntPtr handle, float maxSpeed);
  179. /// <summary>
  180. /// Set the agent's max velocity.
  181. /// </summary>
  182. private void SetMaxSpeed (float maxSpeed)
  183. {
  184. Runtime.ValidateRefCounted (this);
  185. CrowdAgent_SetMaxSpeed (handle, maxSpeed);
  186. }
  187. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  188. internal static extern void CrowdAgent_SetRadius (IntPtr handle, float radius);
  189. /// <summary>
  190. /// Set the agent's radius.
  191. /// </summary>
  192. private void SetRadius (float radius)
  193. {
  194. Runtime.ValidateRefCounted (this);
  195. CrowdAgent_SetRadius (handle, radius);
  196. }
  197. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  198. internal static extern void CrowdAgent_SetHeight (IntPtr handle, float height);
  199. /// <summary>
  200. /// Set the agent's height.
  201. /// </summary>
  202. private void SetHeight (float height)
  203. {
  204. Runtime.ValidateRefCounted (this);
  205. CrowdAgent_SetHeight (handle, height);
  206. }
  207. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  208. internal static extern void CrowdAgent_SetQueryFilterType (IntPtr handle, uint queryFilterType);
  209. /// <summary>
  210. /// Set the agent's query filter type.
  211. /// </summary>
  212. private void SetQueryFilterType (uint queryFilterType)
  213. {
  214. Runtime.ValidateRefCounted (this);
  215. CrowdAgent_SetQueryFilterType (handle, queryFilterType);
  216. }
  217. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  218. internal static extern void CrowdAgent_SetObstacleAvoidanceType (IntPtr handle, uint obstacleAvoidanceType);
  219. /// <summary>
  220. /// Set the agent's obstacle avoidance type.
  221. /// </summary>
  222. private void SetObstacleAvoidanceType (uint obstacleAvoidanceType)
  223. {
  224. Runtime.ValidateRefCounted (this);
  225. CrowdAgent_SetObstacleAvoidanceType (handle, obstacleAvoidanceType);
  226. }
  227. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  228. internal static extern void CrowdAgent_SetNavigationQuality (IntPtr handle, NavigationQuality val);
  229. /// <summary>
  230. /// Set the agent's navigation quality.
  231. /// </summary>
  232. private void SetNavigationQuality (NavigationQuality val)
  233. {
  234. Runtime.ValidateRefCounted (this);
  235. CrowdAgent_SetNavigationQuality (handle, val);
  236. }
  237. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  238. internal static extern void CrowdAgent_SetNavigationPushiness (IntPtr handle, NavigationPushiness val);
  239. /// <summary>
  240. /// Set the agent's navigation pushiness.
  241. /// </summary>
  242. private void SetNavigationPushiness (NavigationPushiness val)
  243. {
  244. Runtime.ValidateRefCounted (this);
  245. CrowdAgent_SetNavigationPushiness (handle, val);
  246. }
  247. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  248. internal static extern Vector3 CrowdAgent_GetPosition (IntPtr handle);
  249. /// <summary>
  250. /// Return the agent's position.
  251. /// </summary>
  252. private Vector3 GetPosition ()
  253. {
  254. Runtime.ValidateRefCounted (this);
  255. return CrowdAgent_GetPosition (handle);
  256. }
  257. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  258. internal static extern Vector3 CrowdAgent_GetDesiredVelocity (IntPtr handle);
  259. /// <summary>
  260. /// Return the agent's desired velocity.
  261. /// </summary>
  262. private Vector3 GetDesiredVelocity ()
  263. {
  264. Runtime.ValidateRefCounted (this);
  265. return CrowdAgent_GetDesiredVelocity (handle);
  266. }
  267. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  268. internal static extern Vector3 CrowdAgent_GetActualVelocity (IntPtr handle);
  269. /// <summary>
  270. /// Return the agent's actual velocity.
  271. /// </summary>
  272. private Vector3 GetActualVelocity ()
  273. {
  274. Runtime.ValidateRefCounted (this);
  275. return CrowdAgent_GetActualVelocity (handle);
  276. }
  277. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  278. internal static extern Urho.Vector3 CrowdAgent_GetTargetPosition (IntPtr handle);
  279. /// <summary>
  280. /// Return the agent's requested target position.
  281. /// </summary>
  282. private Urho.Vector3 GetTargetPosition ()
  283. {
  284. Runtime.ValidateRefCounted (this);
  285. return CrowdAgent_GetTargetPosition (handle);
  286. }
  287. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  288. internal static extern Urho.Vector3 CrowdAgent_GetTargetVelocity (IntPtr handle);
  289. /// <summary>
  290. /// Return the agent's requested target velocity.
  291. /// </summary>
  292. private Urho.Vector3 GetTargetVelocity ()
  293. {
  294. Runtime.ValidateRefCounted (this);
  295. return CrowdAgent_GetTargetVelocity (handle);
  296. }
  297. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  298. internal static extern CrowdAgentRequestedTarget CrowdAgent_GetRequestedTargetType (IntPtr handle);
  299. /// <summary>
  300. /// Return the agent's requested target type, if any.
  301. /// </summary>
  302. private CrowdAgentRequestedTarget GetRequestedTargetType ()
  303. {
  304. Runtime.ValidateRefCounted (this);
  305. return CrowdAgent_GetRequestedTargetType (handle);
  306. }
  307. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  308. internal static extern CrowdAgentState CrowdAgent_GetAgentState (IntPtr handle);
  309. /// <summary>
  310. /// Return the agent's state.
  311. /// </summary>
  312. private CrowdAgentState GetAgentState ()
  313. {
  314. Runtime.ValidateRefCounted (this);
  315. return CrowdAgent_GetAgentState (handle);
  316. }
  317. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  318. internal static extern CrowdAgentTargetState CrowdAgent_GetTargetState (IntPtr handle);
  319. /// <summary>
  320. /// Return the agent's target state.
  321. /// </summary>
  322. private CrowdAgentTargetState GetTargetState ()
  323. {
  324. Runtime.ValidateRefCounted (this);
  325. return CrowdAgent_GetTargetState (handle);
  326. }
  327. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  328. internal static extern bool CrowdAgent_GetUpdateNodePosition (IntPtr handle);
  329. /// <summary>
  330. /// Return true when the node's position should be updated by the CrowdManager.
  331. /// </summary>
  332. private bool GetUpdateNodePosition ()
  333. {
  334. Runtime.ValidateRefCounted (this);
  335. return CrowdAgent_GetUpdateNodePosition (handle);
  336. }
  337. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  338. internal static extern int CrowdAgent_GetAgentCrowdId (IntPtr handle);
  339. /// <summary>
  340. /// Return the agent id.
  341. /// </summary>
  342. private int GetAgentCrowdId ()
  343. {
  344. Runtime.ValidateRefCounted (this);
  345. return CrowdAgent_GetAgentCrowdId (handle);
  346. }
  347. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  348. internal static extern float CrowdAgent_GetMaxAccel (IntPtr handle);
  349. /// <summary>
  350. /// Get the agent's max acceleration.
  351. /// </summary>
  352. private float GetMaxAccel ()
  353. {
  354. Runtime.ValidateRefCounted (this);
  355. return CrowdAgent_GetMaxAccel (handle);
  356. }
  357. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  358. internal static extern float CrowdAgent_GetMaxSpeed (IntPtr handle);
  359. /// <summary>
  360. /// Get the agent's max velocity.
  361. /// </summary>
  362. private float GetMaxSpeed ()
  363. {
  364. Runtime.ValidateRefCounted (this);
  365. return CrowdAgent_GetMaxSpeed (handle);
  366. }
  367. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  368. internal static extern float CrowdAgent_GetRadius (IntPtr handle);
  369. /// <summary>
  370. /// Get the agent's radius.
  371. /// </summary>
  372. private float GetRadius ()
  373. {
  374. Runtime.ValidateRefCounted (this);
  375. return CrowdAgent_GetRadius (handle);
  376. }
  377. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  378. internal static extern float CrowdAgent_GetHeight (IntPtr handle);
  379. /// <summary>
  380. /// Get the agent's height.
  381. /// </summary>
  382. private float GetHeight ()
  383. {
  384. Runtime.ValidateRefCounted (this);
  385. return CrowdAgent_GetHeight (handle);
  386. }
  387. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  388. internal static extern uint CrowdAgent_GetQueryFilterType (IntPtr handle);
  389. /// <summary>
  390. /// Get the agent's query filter type.
  391. /// </summary>
  392. private uint GetQueryFilterType ()
  393. {
  394. Runtime.ValidateRefCounted (this);
  395. return CrowdAgent_GetQueryFilterType (handle);
  396. }
  397. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  398. internal static extern uint CrowdAgent_GetObstacleAvoidanceType (IntPtr handle);
  399. /// <summary>
  400. /// Get the agent's obstacle avoidance type.
  401. /// </summary>
  402. private uint GetObstacleAvoidanceType ()
  403. {
  404. Runtime.ValidateRefCounted (this);
  405. return CrowdAgent_GetObstacleAvoidanceType (handle);
  406. }
  407. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  408. internal static extern NavigationQuality CrowdAgent_GetNavigationQuality (IntPtr handle);
  409. /// <summary>
  410. /// Get the agent's navigation quality.
  411. /// </summary>
  412. private NavigationQuality GetNavigationQuality ()
  413. {
  414. Runtime.ValidateRefCounted (this);
  415. return CrowdAgent_GetNavigationQuality (handle);
  416. }
  417. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  418. internal static extern NavigationPushiness CrowdAgent_GetNavigationPushiness (IntPtr handle);
  419. /// <summary>
  420. /// Get the agent's navigation pushiness.
  421. /// </summary>
  422. private NavigationPushiness GetNavigationPushiness ()
  423. {
  424. Runtime.ValidateRefCounted (this);
  425. return CrowdAgent_GetNavigationPushiness (handle);
  426. }
  427. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  428. internal static extern bool CrowdAgent_HasRequestedTarget (IntPtr handle);
  429. /// <summary>
  430. /// Return true when the agent has a target.
  431. /// </summary>
  432. public bool HasRequestedTarget ()
  433. {
  434. Runtime.ValidateRefCounted (this);
  435. return CrowdAgent_HasRequestedTarget (handle);
  436. }
  437. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  438. internal static extern bool CrowdAgent_HasArrived (IntPtr handle);
  439. /// <summary>
  440. /// Return true when the agent has arrived at its target.
  441. /// </summary>
  442. public bool HasArrived ()
  443. {
  444. Runtime.ValidateRefCounted (this);
  445. return CrowdAgent_HasArrived (handle);
  446. }
  447. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  448. internal static extern bool CrowdAgent_IsInCrowd (IntPtr handle);
  449. /// <summary>
  450. /// Return true when the agent is in crowd (being managed by a crowd manager).
  451. /// </summary>
  452. private bool IsInCrowd ()
  453. {
  454. Runtime.ValidateRefCounted (this);
  455. return CrowdAgent_IsInCrowd (handle);
  456. }
  457. public override StringHash Type {
  458. get {
  459. return UrhoGetType ();
  460. }
  461. }
  462. public override string TypeName {
  463. get {
  464. return GetTypeName ();
  465. }
  466. }
  467. [Preserve]
  468. public new static StringHash TypeStatic {
  469. get {
  470. return GetTypeStatic ();
  471. }
  472. }
  473. public new static string TypeNameStatic {
  474. get {
  475. return GetTypeNameStatic ();
  476. }
  477. }
  478. /// <summary>
  479. /// Return the agent's requested target position.
  480. /// Or
  481. /// Submit a new target position request for this agent.
  482. /// </summary>
  483. public Urho.Vector3 TargetPosition {
  484. get {
  485. return GetTargetPosition ();
  486. }
  487. set {
  488. SetTargetPosition (value);
  489. }
  490. }
  491. /// <summary>
  492. /// Return the agent's requested target velocity.
  493. /// Or
  494. /// Submit a new target velocity request for this agent.
  495. /// </summary>
  496. public Urho.Vector3 TargetVelocity {
  497. get {
  498. return GetTargetVelocity ();
  499. }
  500. set {
  501. SetTargetVelocity (value);
  502. }
  503. }
  504. /// <summary>
  505. /// Return true when the node's position should be updated by the CrowdManager.
  506. /// Or
  507. /// Update the node position. When set to false, the node position should be updated by other means (e.g. using Physics) in response to the E_CROWD_AGENT_REPOSITION event.
  508. /// </summary>
  509. public bool UpdateNodePosition {
  510. get {
  511. return GetUpdateNodePosition ();
  512. }
  513. set {
  514. SetUpdateNodePosition (value);
  515. }
  516. }
  517. /// <summary>
  518. /// Get the agent's max acceleration.
  519. /// Or
  520. /// Set the agent's max acceleration.
  521. /// </summary>
  522. public float MaxAccel {
  523. get {
  524. return GetMaxAccel ();
  525. }
  526. set {
  527. SetMaxAccel (value);
  528. }
  529. }
  530. /// <summary>
  531. /// Get the agent's max velocity.
  532. /// Or
  533. /// Set the agent's max velocity.
  534. /// </summary>
  535. public float MaxSpeed {
  536. get {
  537. return GetMaxSpeed ();
  538. }
  539. set {
  540. SetMaxSpeed (value);
  541. }
  542. }
  543. /// <summary>
  544. /// Get the agent's radius.
  545. /// Or
  546. /// Set the agent's radius.
  547. /// </summary>
  548. public float Radius {
  549. get {
  550. return GetRadius ();
  551. }
  552. set {
  553. SetRadius (value);
  554. }
  555. }
  556. /// <summary>
  557. /// Get the agent's height.
  558. /// Or
  559. /// Set the agent's height.
  560. /// </summary>
  561. public float Height {
  562. get {
  563. return GetHeight ();
  564. }
  565. set {
  566. SetHeight (value);
  567. }
  568. }
  569. /// <summary>
  570. /// Get the agent's query filter type.
  571. /// Or
  572. /// Set the agent's query filter type.
  573. /// </summary>
  574. public uint QueryFilterType {
  575. get {
  576. return GetQueryFilterType ();
  577. }
  578. set {
  579. SetQueryFilterType (value);
  580. }
  581. }
  582. /// <summary>
  583. /// Get the agent's obstacle avoidance type.
  584. /// Or
  585. /// Set the agent's obstacle avoidance type.
  586. /// </summary>
  587. public uint ObstacleAvoidanceType {
  588. get {
  589. return GetObstacleAvoidanceType ();
  590. }
  591. set {
  592. SetObstacleAvoidanceType (value);
  593. }
  594. }
  595. /// <summary>
  596. /// Get the agent's navigation quality.
  597. /// Or
  598. /// Set the agent's navigation quality.
  599. /// </summary>
  600. public NavigationQuality NavigationQuality {
  601. get {
  602. return GetNavigationQuality ();
  603. }
  604. set {
  605. SetNavigationQuality (value);
  606. }
  607. }
  608. /// <summary>
  609. /// Get the agent's navigation pushiness.
  610. /// Or
  611. /// Set the agent's navigation pushiness.
  612. /// </summary>
  613. public NavigationPushiness NavigationPushiness {
  614. get {
  615. return GetNavigationPushiness ();
  616. }
  617. set {
  618. SetNavigationPushiness (value);
  619. }
  620. }
  621. /// <summary>
  622. /// Return the agent's position.
  623. /// </summary>
  624. public Vector3 Position {
  625. get {
  626. return GetPosition ();
  627. }
  628. }
  629. /// <summary>
  630. /// Return the agent's desired velocity.
  631. /// </summary>
  632. public Vector3 DesiredVelocity {
  633. get {
  634. return GetDesiredVelocity ();
  635. }
  636. }
  637. /// <summary>
  638. /// Return the agent's actual velocity.
  639. /// </summary>
  640. public Vector3 ActualVelocity {
  641. get {
  642. return GetActualVelocity ();
  643. }
  644. }
  645. /// <summary>
  646. /// Return the agent's requested target type, if any.
  647. /// </summary>
  648. public CrowdAgentRequestedTarget RequestedTargetType {
  649. get {
  650. return GetRequestedTargetType ();
  651. }
  652. }
  653. /// <summary>
  654. /// Return the agent's state.
  655. /// </summary>
  656. public CrowdAgentState AgentState {
  657. get {
  658. return GetAgentState ();
  659. }
  660. }
  661. /// <summary>
  662. /// Return the agent's target state.
  663. /// </summary>
  664. public CrowdAgentTargetState TargetState {
  665. get {
  666. return GetTargetState ();
  667. }
  668. }
  669. /// <summary>
  670. /// Return the agent id.
  671. /// </summary>
  672. public int AgentCrowdId {
  673. get {
  674. return GetAgentCrowdId ();
  675. }
  676. }
  677. /// <summary>
  678. /// Return true when the agent is in crowd (being managed by a crowd manager).
  679. /// </summary>
  680. public bool InCrowd {
  681. get {
  682. return IsInCrowd ();
  683. }
  684. }
  685. }
  686. }