EZXRTrackableMeshChunck.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using UnityEngine;
  3. using EZXR.Glass.SixDof;
  4. namespace EZXR.Glass.SpatialMesh
  5. {
  6. public class EZXRTrackableMeshChunck : EZXRTrackable
  7. {
  8. private Vector3Int m_Vec3Id;
  9. private int m_UpdateCount;
  10. // TODO: @xuninghao
  11. // 增加接口通过Native提取mesh信息
  12. public EZXRTrackableMeshChunck()
  13. {
  14. this.m_Vec3Id = new Vector3Int(0, 0, 0);
  15. this.m_UpdateCount = -1;
  16. }
  17. public EZXRTrackableMeshChunck(EZVIOChunkInfo chunkinfo)
  18. {
  19. this.m_Vec3Id = new Vector3Int(chunkinfo.id_x, chunkinfo.id_y, chunkinfo.id_z);
  20. this.m_UpdateCount = chunkinfo.a;
  21. }
  22. public void UpdateWithChunkInfo(EZVIOChunkInfo chunkinfo)
  23. {
  24. this.m_UpdateCount = chunkinfo.a;
  25. }
  26. public Vector3Int vec3Id
  27. {
  28. get
  29. {
  30. return this.m_Vec3Id;
  31. }
  32. }
  33. public int updateCount
  34. {
  35. get
  36. {
  37. return this.m_UpdateCount;
  38. }
  39. }
  40. }
  41. }