scene.proto 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. //版本
  2. syntax = "proto3";
  3. package scene;
  4. option java_multiple_files = true;
  5. // grpc插件生成的类的报名,随便写
  6. option java_package = "com.fdkk.fdkkmeta.grpc";
  7. // grpc的方法
  8. service SceneGrpcService {
  9. rpc getRoute (RouteRequest) returns (RouteReply){}
  10. rpc init (InitRequest) returns (NormalReply){}
  11. rpc rotate (RotateRequest) returns (NormalReply){}
  12. // rpc moveStart (StartMoveRequest) returns (MoveReply){}
  13. // rpc moveProcess (MoveNextNeighborRequest) returns (MoveReply){}
  14. rpc echo (EchoRequest) returns (EchoReply){}
  15. rpc usersState (GetNewUserStateRequest) returns (GetNewUserStateReply){}
  16. rpc getBreakPoint (BreakPointRequest) returns (BreakPointReply){}
  17. rpc joystick (JoystickRequest) returns (NormalReply){} //操作杆
  18. }
  19. // 全局对象
  20. message Point {
  21. string x=1;
  22. string y=2;
  23. string z=3;
  24. }
  25. // 全局对象
  26. message AngleUe4 {
  27. int32 pitch=1;
  28. int32 yaw=2;
  29. int32 roll=3;
  30. }
  31. // 全局对象
  32. message RouteArray{
  33. int32 id=1;
  34. Point location=2;
  35. }
  36. // getRoute入参对象
  37. message RouteRequest {
  38. Point s_location=1;
  39. Point e_location=2;
  40. string sceneCode=3;
  41. }
  42. // getRoute出参对象
  43. message RouteReply{
  44. repeated RouteArray in=1;
  45. }
  46. // 入参对象
  47. message SceneRequest {
  48. string id=1;
  49. string name=2;
  50. }
  51. // 出参对象
  52. message SceneReply {
  53. string res=1;
  54. }
  55. /**********************************************************/
  56. // 正常出参对象
  57. message NormalReply {
  58. string code=1; //0/1 0表示没收到,1表示收到
  59. }
  60. /**********************************************************/
  61. /***********************************************************/
  62. message Space {
  63. Point position=1;
  64. AngleUe4 angle=2;
  65. }
  66. message State {
  67. string roomTypeId=1;
  68. int32 person=2;
  69. string avatarId=3;
  70. string skinId=4;
  71. string roomId=5;
  72. bool isHost=6;
  73. bool isFollowHost=7;
  74. string skinDataVersion=8;
  75. string avatarComponents=9;
  76. string nickName=10;
  77. int32 movingMode=11;
  78. string attitude=12;
  79. string areaName=13;
  80. string pathName=14;
  81. string pathId=15;
  82. int32 avatarSize=16;
  83. string extra=17;
  84. bool prioritySync=18;
  85. Space player=19;
  86. Space camera=20;
  87. Point cameraCenter=21;
  88. }
  89. message RenderInfo{
  90. int32 renderType=1;
  91. string videoFrame=2;
  92. int32 cameraStateType=3;
  93. int32 isMoving=4;
  94. int32 needIfr=5;
  95. int32 isVideo=6;
  96. int32 stillFrame=7;
  97. int32 isRotating=8;
  98. int32 isFollowing=9;
  99. repeated string clientPanoTitlesBitmap=10;
  100. string clientPanoTreceId=11;
  101. string prefetchVideoId=12;
  102. bool noMedia=13;
  103. }
  104. message Event{
  105. string id=1;
  106. int32 type =2;
  107. repeated Point points=3;
  108. string rotateEvent=4;
  109. string removeVisitorEvent=5;
  110. }
  111. message UserState{
  112. string userId=1;
  113. State playerState=2;
  114. RenderInfo renderInfo=3;
  115. Event event=4;
  116. int32 relation=5;
  117. }
  118. /***********************************************************/
  119. // init入参对象
  120. message InitRequest {
  121. string user_id=1;
  122. string nick_name=2;
  123. string skin_id=3;
  124. string avatar_id=4;
  125. string room_id=5;
  126. string app_id=6;
  127. }
  128. /**********************************************************/
  129. message echoMsg{
  130. string echoMsg=1;
  131. }
  132. message EchoRequest{
  133. int32 action_type=1; //1009
  134. echoMsg echo_msg=2;
  135. string trace_id=3;
  136. string user_id=4;
  137. }
  138. message EchoReply{
  139. int32 actionType=1; //1009
  140. int32 pointType=2;
  141. string extra=3;
  142. string traceId=4;
  143. string packetId=5;
  144. repeated Point nps=6;
  145. int32 peopleNum=7;
  146. string zoneId=8;
  147. string echoMsg=9;
  148. string reserveDetail=10;
  149. repeated string userWithAvatarList=11;
  150. repeated UserState newUserStates=12;
  151. int32 code=13;
  152. string msg=14;
  153. }
  154. /*********************************************/
  155. message getNewUserStateAction{
  156. int32 userType=1;
  157. }
  158. message GetNewUserStateRequest{
  159. int32 action_type=1; //1024
  160. getNewUserStateAction getNewUserStateAction=2;
  161. string trace_id=3;
  162. string user_id=4;
  163. }
  164. message GetNewUserStateReply{
  165. int32 actionType=1; //1024
  166. int32 pointType=2;
  167. string extra=3;
  168. string traceId=4;
  169. string packetId=5;
  170. repeated Point nps=6;
  171. int32 peopleNum=7;
  172. string zoneId=8;
  173. string echoMsg=9;
  174. string reserveDetail=10;
  175. repeated string userWithAvatarList=11;
  176. repeated UserState newUserStates=12;
  177. int32 code=13;
  178. string msg=14;
  179. }
  180. /*********************************************/
  181. //全局对象,旋转的参数
  182. message RotationAction{
  183. int32 vertical_move=1;
  184. double horizontal_move=2;
  185. }
  186. // rotate入参对象
  187. message RotateRequest {
  188. int32 action_type=1; //1014
  189. RotationAction rotation_action=2;
  190. string trace_id=3;
  191. string user_id=4;
  192. }
  193. /**********************************************************/
  194. //正常的反馈
  195. //message NormalReply {
  196. // repeated string traceIds=1;
  197. // string vehicle=2;
  198. // repeated UserState newUserStates=3;
  199. // repeated int32 actionResponses=4;
  200. // int32 getStateType=5;
  201. // int32 code=6;
  202. // string msg=7;
  203. // string frameSrc=8; //视频路径
  204. //}
  205. /**********************************************************/
  206. //
  207. message ClickingAction {
  208. Point clicking_point=1;
  209. int32 clicking_type=2;
  210. string extra=3;
  211. string attitude=4;
  212. }
  213. message MoveRequest {
  214. int32 action_type=1; //1
  215. ClickingAction clicking_action=2;
  216. State clicking_state=3;
  217. string trace_id=4;
  218. string user_id=5;
  219. }
  220. //// 开始请求漫游
  221. //message StartMoveRequest {
  222. // int32 action_type=1;
  223. // ClickingAction clicking_action=2;
  224. // State clicking_state=3;
  225. // string trace_id=4;
  226. // string user_id=5;
  227. //}
  228. //
  229. //// 请求移动下一段
  230. //message MoveNextNeighborRequest {
  231. // string user_id=1;
  232. // string trace_id=2;
  233. // bool next=3; //true表示继续拿下一个,false表示结束(一般是有新的请求)
  234. //}
  235. // move出参对象
  236. // 这需要自定义
  237. //message MoveReply {
  238. // repeated string traceIds=1;
  239. // string vehicle=2;
  240. // repeated UserState newUserStates=3; //自己的话,不要有player,camera和cameraCenter。自己对应的这三个属性在8,9,10上,到webrtc服务器上组装
  241. // repeated int32 actionResponses=4;
  242. // int32 getStateType=5;
  243. // int32 code=6;
  244. // string msg=7;
  245. // //每一段的人物和相机坐标,第一段可能还有初始旋转
  246. // repeated Space player=8;
  247. // repeated Space camera=9;
  248. // repeated Point cameraCenter=10;
  249. // repeated string frameSrc=11;
  250. // bool isEnd=12; //false表示可以继续移动,true表示这次移动已经结束
  251. //}
  252. /**********************************************************/
  253. /**********************************************************/
  254. message DirAction{
  255. int32 move_angle=1;
  256. int32 speed_level=2;
  257. }
  258. //控制杆移动
  259. message JoystickRequest {
  260. int32 action_type=1;
  261. DirAction dir_action=2;
  262. string trace_id=3;
  263. string user_id=4;
  264. string packet_id=5;
  265. }
  266. /**********************************************************/
  267. /**********************************************************/
  268. message NeighborPointsAction{
  269. Point point=1;
  270. int32 level=2;
  271. bool containSelf=3;
  272. int32 searchRange=4;
  273. }
  274. // move入参对象
  275. message BreakPointRequest{
  276. int32 action_type=1; //1004
  277. NeighborPointsAction get_neighbor_points_action=2;
  278. string trace_id=3;
  279. string user_id=4;
  280. }
  281. // move出参对象
  282. message BreakPointReply {
  283. int32 actionType=1; //1004
  284. int32 pointType=2;
  285. string extra=3;
  286. string traceId=4;
  287. string packetId=5;
  288. repeated Point nps=6;
  289. int32 peopleNum=7;
  290. string zoneId=8;
  291. string echoMsg=9;
  292. string reserveDetail=10;
  293. repeated string userWithAvatarList=11;
  294. repeated UserState newUserStates=12;
  295. int32 code=13;
  296. string msg=14;
  297. }
  298. /**********************************************************/