RcPolyMesh.cs 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. Copyright (c) 2009-2010 Mikko Mononen memon@inside.org
  3. Recast4J Copyright (c) 2015 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 DotRecast.Core;
  20. namespace DotRecast.Recast
  21. {
  22. /** Represents a polygon mesh suitable for use in building a navigation mesh. */
  23. public class RcPolyMesh
  24. {
  25. /** The mesh vertices. [Form: (x, y, z) coordinates * #nverts] */
  26. public int[] verts;
  27. /** Polygon and neighbor data. [Length: #maxpolys * 2 * #nvp] */
  28. public int[] polys;
  29. /** The region id assigned to each polygon. [Length: #maxpolys] */
  30. public int[] regs;
  31. /** The area id assigned to each polygon. [Length: #maxpolys] */
  32. public int[] areas;
  33. /** The number of vertices. */
  34. public int nverts;
  35. /** The number of polygons. */
  36. public int npolys;
  37. /** The maximum number of vertices per polygon. */
  38. public int nvp;
  39. /** The number of allocated polygons. */
  40. public int maxpolys;
  41. /** The user defined flags for each polygon. [Length: #maxpolys] */
  42. public int[] flags;
  43. /** The minimum bounds in world space. [(x, y, z)] */
  44. public RcVec3f bmin = new RcVec3f();
  45. /** The maximum bounds in world space. [(x, y, z)] */
  46. public RcVec3f bmax = new RcVec3f();
  47. /** The size of each cell. (On the xz-plane.) */
  48. public float cs;
  49. /** The height of each cell. (The minimum increment along the y-axis.) */
  50. public float ch;
  51. /** The AABB border size used to generate the source data from which the mesh was derived. */
  52. public int borderSize;
  53. /** The max error of the polygon edges in the mesh. */
  54. public float maxEdgeError;
  55. }
  56. }