DataConfig.cs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  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. Debug.Log("设置初始值");
  48. startPos = _startPos;
  49. startRot = _StartRot;
  50. startScale = _startScale;
  51. }
  52. public void SavePos(Vector3 _startPos, Vector3 _StartRot, Vector3 _startScale)
  53. {
  54. Debug.Log("SavePosSavePosSavePosSavePos");
  55. nowPos = _startPos;
  56. nowRot = _StartRot;
  57. nowScale = _startScale;
  58. }
  59. }
  60. /// <summary>
  61. /// 锚点属性
  62. /// </summary>
  63. public class Anchor
  64. {
  65. public int id { get; set; }
  66. public bool select { get; set; }
  67. public string pictureName { get; set; }
  68. public ObjectTransform objectTransform { get; set; }
  69. public AnchorPos picturePosition { get; set; }
  70. public string pictureUrl { get; set; }
  71. // public string localloadPath { get; set; }
  72. public Anchor()
  73. {
  74. select = false;
  75. objectTransform = new ObjectTransform();
  76. }
  77. }
  78. /// <summary>
  79. /// 景点坐标以及触发器坐标和范围
  80. /// </summary>
  81. public class AnchorPos
  82. {
  83. /// <summary>
  84. /// 景点所在X | Y轴坐标
  85. /// </summary>
  86. public double pointRelativeX { get; set; }
  87. public double pointRelativeY { get; set; }
  88. /// <summary>
  89. /// 景点矩形区域宽高
  90. /// </summary>
  91. public double areaRelativeW { get; set; }
  92. public double areaRelativeH { get; set; }
  93. /// <summary>
  94. /// 景点矩形区域所在X Y轴坐标
  95. /// </summary>
  96. public double areaRelativeX { get; set; }
  97. public double areaRelativeY { get; set; }
  98. }
  99. /// <summary>
  100. /// 景点坐标以及触发器坐标和范围
  101. /// </summary>
  102. public class SpoitPos
  103. {
  104. /// <summary>
  105. /// 景点所在X | Y轴坐标
  106. /// </summary>
  107. public double pointRelativeX { get; set; }
  108. public double pointRelativeY { get; set; }
  109. /// <summary>
  110. /// 景点矩形区域宽高
  111. /// </summary>
  112. public double areaRelativeW { get; set; }
  113. public double areaRelativeH { get; set; }
  114. /// <summary>
  115. /// 景点矩形区域所在X Y轴坐标
  116. /// </summary>
  117. public double areaRelativeX { get; set; }
  118. public double areaRelativeY { get; set; }
  119. }
  120. /// <summary>
  121. /// 单个素材属性
  122. /// </summary>
  123. public class MaterialObjValueNew
  124. {
  125. //WEB端排版
  126. public string template { get; set; }
  127. public int fileId { get; set; }
  128. public int id { get; set; }
  129. public string uid { get; set; }
  130. //素材名称
  131. public string name { get; set; }
  132. /// <summary>
  133. /// 素材类型
  134. /// </summary>
  135. public int type { get; set; }
  136. /// <summary>
  137. /// 文本内容
  138. /// </summary>
  139. public string textContent { get; set; }
  140. /// <summary>
  141. /// 文字位置(如果类型不为文字 则为NULL)
  142. /// </summary>
  143. public string textPosition { get; set; }
  144. /// <summary>
  145. /// 文本框背景
  146. /// </summary>
  147. public string textBJ { get; set; }
  148. /// <summary>
  149. /// 下载地址
  150. /// </summary>
  151. public string downloadPath { get; set; }
  152. /// <summary>
  153. /// 本地保存地址
  154. /// </summary>
  155. public string localSavePath { get; set; }
  156. /// <summary>
  157. /// 素材位置信息
  158. /// 文字传递的是方位,其余类型场地为空值
  159. /// </summary>
  160. public ObjectTransform objectTransform { get; set; }
  161. }
  162. /// <summary>
  163. /// 单个素材属性
  164. /// </summary>
  165. public class MaterialObjValue
  166. {
  167. public int fileId { get; set; }
  168. public int id { get; set; }
  169. public string uid { get; set; }
  170. //素材名称
  171. public string name { get; set; }
  172. /// <summary>
  173. /// 素材类型
  174. /// </summary>
  175. public int type { get; set; }
  176. /// <summary>
  177. /// 文本内容
  178. /// </summary>
  179. public string textContent { get; set; }
  180. /// <summary>
  181. /// 文字位置(如果类型不为文字 则为NULL)
  182. /// </summary>
  183. public string textPosition { get; set; }
  184. /// <summary>
  185. /// 文本框背景
  186. /// </summary>
  187. public string TextBJ { get; set; }
  188. /// <summary>
  189. /// 下载地址
  190. /// </summary>
  191. public string DownloadPath { get; set; }
  192. /// <summary>
  193. /// 本地保存地址
  194. /// </summary>
  195. public string localSavePath { get; set; }
  196. /// <summary>
  197. /// 素材位置信息
  198. /// 文字传递的是方位,其余类型场地为空值
  199. /// </summary>
  200. public ObjectTransform ObjectTransform { get; set; }
  201. }
  202. /// <summary>
  203. /// 景点下素材组合
  204. /// </summary>
  205. public class MaterialObl
  206. {
  207. /// <summary>
  208. /// 主键id
  209. /// </summary>
  210. public int id { get; set; }
  211. /// <summary>
  212. /// 是否设置过素材
  213. /// </summary>
  214. public bool select { get; set; }
  215. /// <summary>
  216. /// 素材名称
  217. /// </summary>
  218. public string name { get; set; }
  219. /// <summary>
  220. /// 素材类型 1图片 2视频 3模型 4文字 5图片+文字/视频+文字 6模型+文字
  221. /// </summary>
  222. public int type { get; set; }
  223. /// <summary>
  224. /// 描述
  225. /// </summary>
  226. public string describe { get; set; }
  227. /// <summary>
  228. /// 素材json数组
  229. /// </summary>
  230. public List<MaterialObjValue> materialList { get; set; }
  231. /// <summary>
  232. /// 素材图标(缩略图)
  233. /// </summary>
  234. public string icon { get; set; }
  235. /// <summary>
  236. /// 更新时间
  237. /// </summary>
  238. public int updateTime { get; set; }
  239. /// <summary>
  240. /// 素材坐标
  241. /// 网页端传递的数据为空
  242. /// </summary>
  243. public ObjectTransform objectTransform { get; set; }
  244. /// <summary>
  245. /// 用户ID
  246. /// </summary>
  247. public int userId { get; set; }
  248. /// <summary>
  249. /// 排版
  250. /// 1-单排平铺,2-单排扇形,3-双排平铺,4-双排扇形,5-巨幕
  251. /// </summary>
  252. public string typesetting { get; set; }
  253. public bool autoplay { get; set; }
  254. public int iconId { get; set; }
  255. public MaterialObl()
  256. {
  257. select = false;
  258. materialList = new List<MaterialObjValue>();
  259. objectTransform = new ObjectTransform();
  260. }
  261. }
  262. /// <summary>
  263. /// 景点下素材组合
  264. /// </summary>
  265. public class MaterialOblNew
  266. {
  267. /// <summary>
  268. /// 主键id
  269. /// </summary>
  270. public int id { get; set; }
  271. /// <summary>
  272. /// 是否设置过素材
  273. /// </summary>
  274. public bool select { get; set; }
  275. /// <summary>
  276. /// 素材名称
  277. /// </summary>
  278. public string name { get; set; }
  279. /// <summary>
  280. /// 素材类型 1图片 2视频 3模型 4文字 5图片+文字/视频+文字 6模型+文字
  281. /// </summary>
  282. public int type { get; set; }
  283. /// <summary>
  284. /// 描述
  285. /// </summary>
  286. public string describe { get; set; }
  287. /// <summary>
  288. /// 素材json数组
  289. /// </summary>
  290. public List<MaterialObjValueNew> materialList { get; set; }
  291. /// <summary>
  292. /// 素材图标(缩略图)
  293. /// </summary>
  294. public string icon { get; set; }
  295. /// <summary>
  296. /// 更新时间
  297. /// </summary>
  298. public int updateTime { get; set; }
  299. /// <summary>
  300. /// 素材坐标
  301. /// 网页端传递的数据为空
  302. /// </summary>
  303. public ObjectTransform objectTransform { get; set; }
  304. /// <summary>
  305. /// 用户ID
  306. /// </summary>
  307. public int userId { get; set; }
  308. /// <summary>
  309. /// 排版
  310. /// 1-单排平铺,2-单排扇形,3-双排平铺,4-双排扇形,5-巨幕
  311. /// </summary>
  312. public string typesetting { get; set; }
  313. public bool autoplay { get; set; }
  314. public MaterialOblNew()
  315. {
  316. select = false;
  317. materialList = new List<MaterialObjValueNew>();
  318. objectTransform = new ObjectTransform();
  319. }
  320. }
  321. /// <summary>
  322. /// 景点属性
  323. /// </summary>
  324. public class SpoitValue
  325. {
  326. public int triggerImageId;
  327. /// <summary>
  328. /// 景点ID
  329. /// </summary>
  330. public int id;
  331. /// <summary>
  332. /// 场景id
  333. /// </summary>
  334. public int projectId;
  335. /// <summary>
  336. /// 景点名称
  337. /// </summary>
  338. public string name { get; set; }
  339. /// <summary>
  340. /// 景点和触发范围信息
  341. /// </summary>
  342. public List<SpoitPos> SpoitTransform { get; set; }
  343. //坐标 旋转 尺寸 如果没有数据的话默认为NULL
  344. public ObjectTransform spoitTf { get; set; }
  345. /// <summary>
  346. /// 更新时间
  347. /// </summary>
  348. public int updateTime { get; set; }
  349. /// <summary>
  350. /// 素材
  351. /// </summary>
  352. public List<MaterialObl> material { get; set; }
  353. /// <summary>
  354. /// 景点和触发范围信息
  355. /// </summary>
  356. public List<SpoitPos> position { get; set; }
  357. /// <summary>
  358. /// 景点和触发范围信息
  359. /// </summary>
  360. public SpoitPos triggerRange { get; set; }
  361. public bool location;
  362. }
  363. public class SpoitValueDetail
  364. {
  365. /// <summary>
  366. /// 景点ID
  367. /// </summary>
  368. public int id;
  369. /// <summary>
  370. /// 场景id
  371. /// </summary>
  372. public int projectId;
  373. /// <summary>
  374. /// 景点名称
  375. /// </summary>
  376. public string name { get; set; }
  377. /// <summary>
  378. /// 景点和触发范围信息
  379. /// </summary>
  380. public List<SpoitPos> position { get; set; }
  381. /// <summary>
  382. /// 景点和触发范围信息
  383. /// </summary>
  384. public SpoitPos triggerRange { get; set; }
  385. /// <summary>
  386. /// 景点素材父物体坐标 旋转 尺寸 如果没有数据的话默认为NULL
  387. /// </summary>
  388. public ObjectTransform spoitTf { get; set; }
  389. /// <summary>
  390. /// 更新时间
  391. /// </summary>
  392. public int updateTime { get; set; }
  393. /// <summary>
  394. /// 素材
  395. /// </summary>
  396. public List<MaterialObl> material { get; set; }
  397. public int triggerImageId { get; set; }
  398. }
  399. /// <summary>
  400. /// 整个场景属性
  401. /// </summary>
  402. public class SceneValue
  403. {
  404. public int id { get; set; }
  405. /// <summary>
  406. /// 场景名称
  407. /// </summary>
  408. public string name { get; set; }
  409. /// <summary>
  410. /// 场景照片
  411. /// </summary>
  412. public string image { get; set; }
  413. /// <summary>
  414. /// 更新时间
  415. /// </summary>
  416. public long updateTime { get; set; }
  417. /// <summary>
  418. /// 景点信息
  419. /// </summary>
  420. public List<SpoitValue> listSpoit { get; set; }
  421. /// <summary>
  422. /// 场景-地图
  423. /// url
  424. /// </summary>
  425. public string map { get; set; }
  426. /// <summary>
  427. /// 场景-沙盘
  428. /// url
  429. /// </summary>
  430. public string sandTable { get; set; }
  431. /// <summary>
  432. /// 线路
  433. /// </summary>
  434. public List<NavLinesItem> navLines { get; set; }
  435. public List<BdImage> backgroundImages;
  436. /// <summary>
  437. /// 场景真实长宽
  438. /// </summary>
  439. public float length { get; set; }
  440. public float width { get; set; }
  441. /// <summary>
  442. /// 锚点Vuforia 数据
  443. /// </summary>
  444. public string vuforiaXML { get; set; }
  445. public string vuforiaDat { get; set; }
  446. /// <summary>
  447. /// 锚点列表
  448. /// </summary>
  449. public List<Anchor> listPicture { get; set; }
  450. }
  451. public class BdImage
  452. {
  453. public string base64;
  454. }
  455. #region 路线
  456. public class NavLinesItem
  457. {
  458. /// <summary>
  459. /// 更新时间
  460. /// </summary>
  461. public long updateTime { get; set; }
  462. /// <summary>
  463. /// 图片高度
  464. /// </summary>
  465. public double realityHeight { get; set; }
  466. /// <summary>
  467. /// 图片宽度
  468. /// </summary>
  469. public double realityWidth { get; set; }
  470. /// <summary>
  471. /// 路线的虚拟导游信息 : 1 导游A, 2 导游B, 3 不使用虚拟导游
  472. /// </summary>
  473. public int guideMod { get; set; }
  474. /// <summary>
  475. /// 路线样式风格 : 1 样式1, 2 样式2, 3 样式3
  476. /// </summary>
  477. public int routerMod { get; set; }
  478. /// <summary>
  479. /// 路线名称
  480. /// </summary>
  481. public string name { get; set; }
  482. /// <summary>
  483. /// 起点(x1,y1)
  484. /// </summary>
  485. public double x1 { get; set; }
  486. /// <summary>
  487. /// 起点(x1,y1)
  488. /// </summary>
  489. public double y1 { get; set; }
  490. /// <summary>
  491. /// 终点(x2, y2)
  492. /// </summary>
  493. public double x2 { get; set; }
  494. /// <summary>
  495. ///终点(x2, y2)
  496. /// </summary>
  497. public double y2 { get; set; }
  498. /// <summary>
  499. /// 路径线段
  500. /// </summary>
  501. public List<line> lines { get; set; }
  502. }
  503. public class line
  504. {
  505. /// <summary>
  506. /// 起点(x1,y1)
  507. /// </summary>
  508. public double x1 { get; set; }
  509. /// <summary>
  510. /// 起点(x1,y1)
  511. /// </summary>
  512. public double y1 { get; set; }
  513. /// <summary>
  514. /// 终点(x2, y2)
  515. /// </summary>
  516. public double x2 { get; set; }
  517. /// <summary>
  518. ///终点(x2, y2)
  519. /// </summary>
  520. public double y2 { get; set; }
  521. // 以下为路线段的私有信息
  522. public string _groups { get; set; }
  523. public string _id { get; set; }
  524. public int _index { get; set; }
  525. public string _name { get; set; }
  526. public string _type { get; set; }
  527. }
  528. #endregion