DataConfig.cs 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. public class DataConfig : MonoBehaviour
  4. {
  5. }
  6. public class objectData
  7. {
  8. public Vector3 pos;
  9. public Vector3 rot;
  10. public Vector3 scale;
  11. }
  12. public enum MaterialType
  13. {
  14. None,
  15. Image,
  16. Video,
  17. Model,
  18. Text,
  19. Image_Video_Text,
  20. Model_Text,
  21. LocaImage,
  22. Vuforia,
  23. }
  24. public enum SpoitType
  25. {
  26. Null,
  27. ShanXin,
  28. PingZiXing,
  29. BingLie,
  30. LunBo,
  31. }
  32. public enum SceneType
  33. {
  34. Vuforial,
  35. PointCloud,
  36. }
  37. public class ObjectTransform
  38. {
  39. public Vector3 startPos { get; set; }
  40. public Vector3 startRot { get; set; }
  41. public Vector3 startScale { get; set; }
  42. public Vector3 nowPos { get; set; }
  43. public Vector3 nowRot { get; set; }
  44. public Vector3 nowScale { get; set; }
  45. public void SetStartValue(Vector3 _startPos, Vector3 _StartRot, Vector3 _startScale)
  46. {
  47. startPos = _startPos;
  48. nowPos = _startPos;
  49. startRot = _StartRot;
  50. nowRot = _StartRot;
  51. startScale = _startScale;
  52. nowScale = _startScale;
  53. }
  54. public void SavePos(Vector3 _startPos, Vector3 _StartRot, Vector3 _startScale)
  55. {
  56. nowPos = _startPos;
  57. nowRot = _StartRot;
  58. nowScale = _startScale;
  59. }
  60. }
  61. /// <summary>
  62. /// 锚点属性
  63. /// </summary>
  64. public class Anchor
  65. {
  66. public int id { get; set; }
  67. public bool select { get; set; }
  68. public string pictureName { get; set; }
  69. public ObjectTransform objectTransform { get; set; }
  70. public AnchorPos picturePosition { get; set; }
  71. public string pictureUrl { get; set; }
  72. // public string localloadPath { get; set; }
  73. public Anchor()
  74. {
  75. select = false;
  76. objectTransform = new ObjectTransform();
  77. }
  78. }
  79. /// <summary>
  80. /// 景点坐标以及触发器坐标和范围
  81. /// </summary>
  82. public class AnchorPos
  83. {
  84. /// <summary>
  85. /// 景点所在X | Y轴坐标
  86. /// </summary>
  87. public double pointRelativeX { get; set; }
  88. public double pointRelativeY { get; set; }
  89. /// <summary>
  90. /// 景点矩形区域宽高
  91. /// </summary>
  92. public double areaRelativeW { get; set; }
  93. public double areaRelativeH { get; set; }
  94. /// <summary>
  95. /// 景点矩形区域所在X Y轴坐标
  96. /// </summary>
  97. public double areaRelativeX { get; set; }
  98. public double areaRelativeY { get; set; }
  99. }
  100. /// <summary>
  101. /// 景点坐标以及触发器坐标和范围
  102. /// </summary>
  103. public class SpoitPos
  104. {
  105. /// <summary>
  106. /// 景点所在X | Y轴坐标
  107. /// </summary>
  108. public double pointRelativeX { get; set; }
  109. public double pointRelativeY { get; set; }
  110. /// <summary>
  111. /// 景点矩形区域宽高
  112. /// </summary>
  113. public double areaRelativeW { get; set; }
  114. public double areaRelativeH { get; set; }
  115. /// <summary>
  116. /// 景点矩形区域所在X Y轴坐标
  117. /// </summary>
  118. public double areaRelativeX { get; set; }
  119. public double areaRelativeY { get; set; }
  120. }
  121. /// <summary>
  122. /// 单个素材属性
  123. /// </summary>
  124. public class MaterialObjValue
  125. {
  126. public string uid { get; set; }
  127. //素材名称
  128. public string name { get; set; }
  129. /// <summary>
  130. /// 素材类型
  131. /// </summary>
  132. public string type { get; set; }
  133. /// <summary>
  134. /// 文本内容
  135. /// </summary>
  136. public string textContent { get; set; }
  137. /// <summary>
  138. /// 文字位置(如果类型不为文字 则为NULL)
  139. /// </summary>
  140. public string textPosition { get; set; }
  141. /// <summary>
  142. /// 文本框背景
  143. /// </summary>
  144. public string TextBJ { get; set; }
  145. /// <summary>
  146. /// 下载地址
  147. /// </summary>
  148. public string DownloadPath { get; set; }
  149. /// <summary>
  150. /// 本地保存地址
  151. /// </summary>
  152. public string localSavePath { get; set; }
  153. /// <summary>
  154. /// 素材位置信息
  155. /// 文字传递的是方位,其余类型场地为空值
  156. /// </summary>
  157. public ObjectTransform ObjectTransform { get; set; }
  158. }
  159. /// <summary>
  160. /// 景点下素材组合
  161. /// </summary>
  162. public class MaterialObl
  163. {
  164. /// <summary>
  165. /// 主键id
  166. /// </summary>
  167. public int id { get; set; }
  168. /// <summary>
  169. /// 是否设置过素材
  170. /// </summary>
  171. public bool select { get; set; }
  172. /// <summary>
  173. /// 素材名称
  174. /// </summary>
  175. public string name { get; set; }
  176. /// <summary>
  177. /// 素材类型 1图片 2视频 3模型 4文字 5图片+文字/视频+文字 6模型+文字
  178. /// </summary>
  179. public int type { get; set; }
  180. /// <summary>
  181. /// 描述
  182. /// </summary>
  183. public string describe { get; set; }
  184. /// <summary>
  185. /// 素材json数组
  186. /// </summary>
  187. public List<MaterialObjValue> materialList { get; set; }
  188. /// <summary>
  189. /// 素材图标(缩略图)
  190. /// </summary>
  191. public string icon { get; set; }
  192. /// <summary>
  193. /// 更新时间
  194. /// </summary>
  195. public int updateTime { get; set; }
  196. /// <summary>
  197. /// 素材坐标
  198. /// 网页端传递的数据为空
  199. /// </summary>
  200. public ObjectTransform objectTransform { get; set; }
  201. /// <summary>
  202. /// 用户ID
  203. /// </summary>
  204. public int userId { get; set; }
  205. /// <summary>
  206. /// 排版
  207. /// 1-单排平铺,2-单排扇形,3-双排平铺,4-双排扇形,5-巨幕
  208. /// </summary>
  209. public string typesetting;
  210. public MaterialObl()
  211. {
  212. select = false;
  213. materialList = new List<MaterialObjValue>();
  214. objectTransform = new ObjectTransform();
  215. }
  216. }
  217. /// <summary>
  218. /// 景点属性
  219. /// </summary>
  220. public class SpoitValue
  221. {
  222. /// <summary>
  223. /// 景点ID
  224. /// </summary>
  225. public int id;
  226. /// <summary>
  227. /// 场景id
  228. /// </summary>
  229. public int projectId;
  230. /// <summary>
  231. /// 景点名称
  232. /// </summary>
  233. public string name { get; set; }
  234. /// <summary>
  235. /// 景点和触发范围信息
  236. /// </summary>
  237. public List<SpoitPos> SpoitTransform { get; set; }
  238. //坐标 旋转 尺寸 如果没有数据的话默认为NULL
  239. public ObjectTransform spoitTf { get; set; }
  240. /// <summary>
  241. /// 更新时间
  242. /// </summary>
  243. public int updateTime { get; set; }
  244. /// <summary>
  245. /// 素材
  246. /// </summary>
  247. public List<MaterialObl> material { get; set; }
  248. /// <summary>
  249. /// 景点和触发范围信息
  250. /// </summary>
  251. public SpoitPos position { get; set; }
  252. /// <summary>
  253. /// 景点和触发范围信息
  254. /// </summary>
  255. public SpoitPos triggerRange { get; set; }
  256. }
  257. public class SpoitValueDetail
  258. {
  259. /// <summary>
  260. /// 景点ID
  261. /// </summary>
  262. public int id;
  263. /// <summary>
  264. /// 场景id
  265. /// </summary>
  266. public int projectId;
  267. /// <summary>
  268. /// 景点名称
  269. /// </summary>
  270. public string name { get; set; }
  271. /// <summary>
  272. /// 景点和触发范围信息
  273. /// </summary>
  274. public List<SpoitPos> position { get; set; }
  275. /// <summary>
  276. /// 景点和触发范围信息
  277. /// </summary>
  278. public SpoitPos triggerRange { get; set; }
  279. /// <summary>
  280. /// 景点素材父物体坐标 旋转 尺寸 如果没有数据的话默认为NULL
  281. /// </summary>
  282. public ObjectTransform spoitTf { get; set; }
  283. /// <summary>
  284. /// 更新时间
  285. /// </summary>
  286. public int updateTime { get; set; }
  287. /// <summary>
  288. /// 素材
  289. /// </summary>
  290. public List<MaterialObl> material { get; set; }
  291. }
  292. /// <summary>
  293. /// 整个场景属性
  294. /// </summary>
  295. public class SceneValue
  296. {
  297. public int id { get; set; }
  298. /// <summary>
  299. /// 场景名称
  300. /// </summary>
  301. public string name { get; set; }
  302. /// <summary>
  303. /// 场景照片
  304. /// </summary>
  305. public string image { get; set; }
  306. /// <summary>
  307. /// 更新时间
  308. /// </summary>
  309. public long updateTime { get; set; }
  310. /// <summary>
  311. /// 景点信息
  312. /// </summary>
  313. public List<SpoitValue> listSpoit { get; set; }
  314. /// <summary>
  315. /// 场景-地图
  316. /// url
  317. /// </summary>
  318. public string map { get; set; }
  319. /// <summary>
  320. /// 场景-沙盘
  321. /// url
  322. /// </summary>
  323. public string sandTable { get; set; }
  324. /// <summary>
  325. /// 线路
  326. /// </summary>
  327. public List<NavLinesItem> navLines { get; set; }
  328. public List<BdImage> backgroundImages;
  329. /// <summary>
  330. /// 场景真实长宽
  331. /// </summary>
  332. public float length { get; set; }
  333. public float width { get; set; }
  334. /// <summary>
  335. /// 锚点Vuforia 数据
  336. /// </summary>
  337. public string vuforiaXML { get; set; }
  338. public string vuforiaDat { get; set; }
  339. /// <summary>
  340. /// 锚点列表
  341. /// </summary>
  342. public List<Anchor> listPicture { get; set; }
  343. }
  344. public class BdImage
  345. {
  346. public string base64;
  347. }
  348. #region 路线
  349. public class NavLinesItem
  350. {
  351. /// <summary>
  352. /// 更新时间
  353. /// </summary>
  354. public long updateTime { get; set; }
  355. /// <summary>
  356. /// 图片高度
  357. /// </summary>
  358. public double realityHeight { get; set; }
  359. /// <summary>
  360. /// 图片宽度
  361. /// </summary>
  362. public double realityWidth { get; set; }
  363. /// <summary>
  364. /// 路线的虚拟导游信息 : 1 导游A, 2 导游B, 3 不使用虚拟导游
  365. /// </summary>
  366. public int guideMod { get; set; }
  367. /// <summary>
  368. /// 路线样式风格 : 1 样式1, 2 样式2, 3 样式3
  369. /// </summary>
  370. public int routerMod { get; set; }
  371. /// <summary>
  372. /// 路线名称
  373. /// </summary>
  374. public string name { get; set; }
  375. /// <summary>
  376. /// 起点(x1,y1)
  377. /// </summary>
  378. public double x1 { get; set; }
  379. /// <summary>
  380. /// 起点(x1,y1)
  381. /// </summary>
  382. public double y1 { get; set; }
  383. /// <summary>
  384. /// 终点(x2, y2)
  385. /// </summary>
  386. public double x2 { get; set; }
  387. /// <summary>
  388. ///终点(x2, y2)
  389. /// </summary>
  390. public double y2 { get; set; }
  391. /// <summary>
  392. /// 路径线段
  393. /// </summary>
  394. public List<line> lines { get; set; }
  395. }
  396. public class line
  397. {
  398. /// <summary>
  399. /// 起点(x1,y1)
  400. /// </summary>
  401. public double x1 { get; set; }
  402. /// <summary>
  403. /// 起点(x1,y1)
  404. /// </summary>
  405. public double y1 { get; set; }
  406. /// <summary>
  407. /// 终点(x2, y2)
  408. /// </summary>
  409. public double x2 { get; set; }
  410. /// <summary>
  411. ///终点(x2, y2)
  412. /// </summary>
  413. public double y2 { get; set; }
  414. // 以下为路线段的私有信息
  415. public string _groups { get; set; }
  416. public string _id { get; set; }
  417. public int _index { get; set; }
  418. public string _name { get; set; }
  419. public string _type { get; set; }
  420. }
  421. #endregion