DtTileCacheObstacle.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. using System.Collections.Generic;
  20. using DotRecast.Core;
  21. namespace DotRecast.Detour.TileCache
  22. {
  23. public class DtTileCacheObstacle
  24. {
  25. public readonly int index;
  26. public TileCacheObstacleType type;
  27. public RcVec3f pos = new RcVec3f();
  28. public RcVec3f bmin = new RcVec3f();
  29. public RcVec3f bmax = new RcVec3f();
  30. public float radius, height;
  31. public RcVec3f center = new RcVec3f();
  32. public RcVec3f extents = new RcVec3f();
  33. public readonly float[] rotAux = new float[2]; // { Cos(0.5f*angle)*Sin(-0.5f*angle); Cos(0.5f*angle)*Cos(0.5f*angle) - 0.5 }
  34. public List<long> touched = new List<long>();
  35. public readonly List<long> pending = new List<long>();
  36. public int salt;
  37. public DtObstacleState state = DtObstacleState.DT_OBSTACLE_EMPTY;
  38. public DtTileCacheObstacle next;
  39. public DtTileCacheObstacle(int index)
  40. {
  41. salt = 1;
  42. this.index = index;
  43. }
  44. }
  45. }