DataConfig.cs 11 KB

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