EZVIOBackendMesh.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using EZXR.Glass.SixDof;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Runtime.InteropServices.WindowsRuntime;
  5. using UnityEngine;
  6. using System;
  7. namespace EZXR.Glass.SpatialMesh
  8. {
  9. /**************************************************************************//**
  10. * EZVIOMesh:后端Mesh(稠密)可视化数据结构
  11. * -------------------------------------------------------------------------
  12. * vertex
  13. * 用于生成mesh的世界坐标系3D点位置(x1,y1,z1,x2,y2,z2,...)
  14. * vertexLength
  15. * 顶点buffer长度
  16. * vertexCount
  17. * 顶点数目
  18. * normal
  19. * 法向量值(nx1,ny1,nz1,nx2,ny2,nz2,...)
  20. * normalLength
  21. * 法向量buffer长度
  22. * normalCount
  23. * 法向量数目
  24. * faces
  25. * 三角面片定点ID
  26. * facesLength
  27. * 面片buffer长度
  28. * facesCount
  29. * 面片数目
  30. ******************************************************************************/
  31. public struct EZVIOBackendMesh
  32. {
  33. public IntPtr vertex; //vertex points
  34. public int vertexLength; //vertex buffer length
  35. public int vertexCount; //vertex num
  36. public IntPtr normal; //vertex normal
  37. public int normalLength; //normal buffer length
  38. public int normalCount; //normal num
  39. public IntPtr faces; //triangle id
  40. public int facesLength; //triangle buffer length
  41. public int facesCount; //triangle num
  42. }
  43. public struct EZVIOChunkInfo
  44. {
  45. public int id_x;
  46. public int id_y;
  47. public int id_z;
  48. public int nv;
  49. public int sv;
  50. public int ni;
  51. public int si;
  52. public int a;
  53. }
  54. public struct EZVIOBackendIncrementalMesh
  55. {
  56. public EZVIOBackendMesh mesh;
  57. public IntPtr chunks;
  58. public int chunksCount;
  59. public int chunksLength;
  60. }
  61. }