BipedDef.cpp
上传用户:gb3593
上传日期:2022-01-07
资源大小:3028k
文件大小:16k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. #include "BipedDef.h"
  2. int16 BipedDef::count = 0;
  3. const float32 k_scale = 3.0f;
  4. BipedDef::BipedDef()
  5. {
  6. SetMotorTorque(2.0f);
  7. SetMotorSpeed(0.0f);
  8. SetDensity(20.0f);
  9. SetRestitution(0.0f);
  10. SetLinearDamping(0.0f);
  11. SetAngularDamping(0.005f);
  12. SetGroupIndex(--count);
  13. EnableMotor();
  14. EnableLimit();
  15. DefaultVertices();
  16. DefaultPositions();
  17. DefaultJoints();
  18. LFootPoly.friction = RFootPoly.friction = 0.85f;
  19. }
  20. void BipedDef::IsFast(bool b)
  21. {
  22. B2_NOT_USED(b);
  23. /*
  24. LFootDef.isFast = b;
  25. RFootDef.isFast = b;
  26. LCalfDef.isFast = b;
  27. RCalfDef.isFast = b;
  28. LThighDef.isFast = b;
  29. RThighDef.isFast = b;
  30. PelvisDef.isFast = b;
  31. StomachDef.isFast = b;
  32. ChestDef.isFast = b;
  33. NeckDef.isFast = b;
  34. HeadDef.isFast = b;
  35. LUpperArmDef.isFast = b;
  36. RUpperArmDef.isFast = b;
  37. LForearmDef.isFast = b;
  38. RForearmDef.isFast = b;
  39. LHandDef.isFast = b;
  40. RHandDef.isFast = b;
  41. */
  42. }
  43. void BipedDef::SetGroupIndex(int16 i)
  44. {
  45. LFootPoly.filter.groupIndex = i;
  46. RFootPoly.filter.groupIndex = i;
  47. LCalfPoly.filter.groupIndex = i;
  48. RCalfPoly.filter.groupIndex = i;
  49. LThighPoly.filter.groupIndex = i;
  50. RThighPoly.filter.groupIndex = i;
  51. PelvisPoly.filter.groupIndex = i;
  52. StomachPoly.filter.groupIndex = i;
  53. ChestPoly.filter.groupIndex = i;
  54. NeckPoly.filter.groupIndex = i;
  55. HeadCirc.filter.groupIndex = i;
  56. LUpperArmPoly.filter.groupIndex = i;
  57. RUpperArmPoly.filter.groupIndex = i;
  58. LForearmPoly.filter.groupIndex = i;
  59. RForearmPoly.filter.groupIndex = i;
  60. LHandPoly.filter.groupIndex = i;
  61. RHandPoly.filter.groupIndex = i;
  62. }
  63. void BipedDef::SetLinearDamping(float f)
  64. {
  65. LFootDef.linearDamping = f;
  66. RFootDef.linearDamping = f;
  67. LCalfDef.linearDamping = f;
  68. RCalfDef.linearDamping = f;
  69. LThighDef.linearDamping = f;
  70. RThighDef.linearDamping = f;
  71. PelvisDef.linearDamping = f;
  72. StomachDef.linearDamping = f;
  73. ChestDef.linearDamping = f;
  74. NeckDef.linearDamping = f;
  75. HeadDef.linearDamping = f;
  76. LUpperArmDef.linearDamping = f;
  77. RUpperArmDef.linearDamping = f;
  78. LForearmDef.linearDamping = f;
  79. RForearmDef.linearDamping = f;
  80. LHandDef.linearDamping = f;
  81. RHandDef.linearDamping = f;
  82. }
  83. void BipedDef::SetAngularDamping(float f)
  84. {
  85. LFootDef.angularDamping = f;
  86. RFootDef.angularDamping = f;
  87. LCalfDef.angularDamping = f;
  88. RCalfDef.angularDamping = f;
  89. LThighDef.angularDamping = f;
  90. RThighDef.angularDamping = f;
  91. PelvisDef.angularDamping = f;
  92. StomachDef.angularDamping = f;
  93. ChestDef.angularDamping = f;
  94. NeckDef.angularDamping = f;
  95. HeadDef.angularDamping = f;
  96. LUpperArmDef.angularDamping = f;
  97. RUpperArmDef.angularDamping = f;
  98. LForearmDef.angularDamping = f;
  99. RForearmDef.angularDamping = f;
  100. LHandDef.angularDamping = f;
  101. RHandDef.angularDamping = f;
  102. }
  103. void BipedDef::SetMotorTorque(float f)
  104. {
  105. LAnkleDef.maxMotorTorque = f;
  106. RAnkleDef.maxMotorTorque = f;
  107. LKneeDef.maxMotorTorque = f;
  108. RKneeDef.maxMotorTorque = f;
  109. LHipDef.maxMotorTorque = f;
  110. RHipDef.maxMotorTorque = f;
  111. LowerAbsDef.maxMotorTorque = f;
  112. UpperAbsDef.maxMotorTorque = f;
  113. LowerNeckDef.maxMotorTorque = f;
  114. UpperNeckDef.maxMotorTorque = f;
  115. LShoulderDef.maxMotorTorque = f;
  116. RShoulderDef.maxMotorTorque = f;
  117. LElbowDef.maxMotorTorque = f;
  118. RElbowDef.maxMotorTorque = f;
  119. LWristDef.maxMotorTorque = f;
  120. RWristDef.maxMotorTorque = f;
  121. }
  122. void BipedDef::SetMotorSpeed(float f)
  123. {
  124. LAnkleDef.motorSpeed = f;
  125. RAnkleDef.motorSpeed = f;
  126. LKneeDef.motorSpeed = f;
  127. RKneeDef.motorSpeed = f;
  128. LHipDef.motorSpeed = f;
  129. RHipDef.motorSpeed = f;
  130. LowerAbsDef.motorSpeed = f;
  131. UpperAbsDef.motorSpeed = f;
  132. LowerNeckDef.motorSpeed = f;
  133. UpperNeckDef.motorSpeed = f;
  134. LShoulderDef.motorSpeed = f;
  135. RShoulderDef.motorSpeed = f;
  136. LElbowDef.motorSpeed = f;
  137. RElbowDef.motorSpeed = f;
  138. LWristDef.motorSpeed = f;
  139. RWristDef.motorSpeed = f;
  140. }
  141. void BipedDef::SetDensity(float f)
  142. {
  143. LFootPoly.density = f;
  144. RFootPoly.density = f;
  145. LCalfPoly.density = f;
  146. RCalfPoly.density = f;
  147. LThighPoly.density = f;
  148. RThighPoly.density = f;
  149. PelvisPoly.density = f;
  150. StomachPoly.density = f;
  151. ChestPoly.density = f;
  152. NeckPoly.density = f;
  153. HeadCirc.density = f;
  154. LUpperArmPoly.density = f;
  155. RUpperArmPoly.density = f;
  156. LForearmPoly.density = f;
  157. RForearmPoly.density = f;
  158. LHandPoly.density = f;
  159. RHandPoly.density = f;
  160. }
  161. void BipedDef::SetRestitution(float f)
  162. {
  163. LFootPoly.restitution = f;
  164. RFootPoly.restitution = f;
  165. LCalfPoly.restitution = f;
  166. RCalfPoly.restitution = f;
  167. LThighPoly.restitution = f;
  168. RThighPoly.restitution = f;
  169. PelvisPoly.restitution = f;
  170. StomachPoly.restitution = f;
  171. ChestPoly.restitution = f;
  172. NeckPoly.restitution = f;
  173. HeadCirc.restitution = f;
  174. LUpperArmPoly.restitution = f;
  175. RUpperArmPoly.restitution = f;
  176. LForearmPoly.restitution = f;
  177. RForearmPoly.restitution = f;
  178. LHandPoly.restitution = f;
  179. RHandPoly.restitution = f;
  180. }
  181. void BipedDef::EnableLimit()
  182. {
  183. SetLimit(true);
  184. }
  185. void BipedDef::DisableLimit()
  186. {
  187. SetLimit(false);
  188. }
  189. void BipedDef::SetLimit(bool b)
  190. {
  191. LAnkleDef.enableLimit = b;
  192. RAnkleDef.enableLimit = b;
  193. LKneeDef.enableLimit = b;
  194. RKneeDef.enableLimit = b;
  195. LHipDef.enableLimit = b;
  196. RHipDef.enableLimit = b;
  197. LowerAbsDef.enableLimit = b;
  198. UpperAbsDef.enableLimit = b;
  199. LowerNeckDef.enableLimit = b;
  200. UpperNeckDef.enableLimit = b;
  201. LShoulderDef.enableLimit = b;
  202. RShoulderDef.enableLimit = b;
  203. LElbowDef.enableLimit = b;
  204. RElbowDef.enableLimit = b;
  205. LWristDef.enableLimit = b;
  206. RWristDef.enableLimit = b;
  207. }
  208. void BipedDef::EnableMotor()
  209. {
  210. SetMotor(true);
  211. }
  212. void BipedDef::DisableMotor()
  213. {
  214. SetMotor(false);
  215. }
  216. void BipedDef::SetMotor(bool b)
  217. {
  218. LAnkleDef.enableMotor = b;
  219. RAnkleDef.enableMotor = b;
  220. LKneeDef.enableMotor = b;
  221. RKneeDef.enableMotor = b;
  222. LHipDef.enableMotor = b;
  223. RHipDef.enableMotor = b;
  224. LowerAbsDef.enableMotor = b;
  225. UpperAbsDef.enableMotor = b;
  226. LowerNeckDef.enableMotor = b;
  227. UpperNeckDef.enableMotor = b;
  228. LShoulderDef.enableMotor = b;
  229. RShoulderDef.enableMotor = b;
  230. LElbowDef.enableMotor = b;
  231. RElbowDef.enableMotor = b;
  232. LWristDef.enableMotor = b;
  233. RWristDef.enableMotor = b;
  234. }
  235. BipedDef::~BipedDef(void)
  236. {
  237. }
  238. void BipedDef::DefaultVertices()
  239. {
  240. { // feet
  241. LFootPoly.vertexCount = RFootPoly.vertexCount = 5;
  242. LFootPoly.vertices[0] = RFootPoly.vertices[0] = k_scale * b2Vec2(.033f,.143f);
  243. LFootPoly.vertices[1] = RFootPoly.vertices[1] = k_scale * b2Vec2(.023f,.033f);
  244. LFootPoly.vertices[2] = RFootPoly.vertices[2] = k_scale * b2Vec2(.267f,.035f);
  245. LFootPoly.vertices[3] = RFootPoly.vertices[3] = k_scale * b2Vec2(.265f,.065f);
  246. LFootPoly.vertices[4] = RFootPoly.vertices[4] = k_scale * b2Vec2(.117f,.143f);
  247. }
  248. { // calves
  249. LCalfPoly.vertexCount = RCalfPoly.vertexCount = 4;
  250. LCalfPoly.vertices[0] = RCalfPoly.vertices[0] = k_scale * b2Vec2(.089f,.016f);
  251. LCalfPoly.vertices[1] = RCalfPoly.vertices[1] = k_scale * b2Vec2(.178f,.016f);
  252. LCalfPoly.vertices[2] = RCalfPoly.vertices[2] = k_scale * b2Vec2(.205f,.417f);
  253. LCalfPoly.vertices[3] = RCalfPoly.vertices[3] = k_scale * b2Vec2(.095f,.417f);
  254. }
  255. { // thighs
  256. LThighPoly.vertexCount = RThighPoly.vertexCount = 4;
  257. LThighPoly.vertices[0] = RThighPoly.vertices[0] = k_scale * b2Vec2(.137f,.032f);
  258. LThighPoly.vertices[1] = RThighPoly.vertices[1] = k_scale * b2Vec2(.243f,.032f);
  259. LThighPoly.vertices[2] = RThighPoly.vertices[2] = k_scale * b2Vec2(.318f,.343f);
  260. LThighPoly.vertices[3] = RThighPoly.vertices[3] = k_scale * b2Vec2(.142f,.343f);
  261. }
  262. { // pelvis
  263. PelvisPoly.vertexCount = 5;
  264. PelvisPoly.vertices[0] = k_scale * b2Vec2(.105f,.051f);
  265. PelvisPoly.vertices[1] = k_scale * b2Vec2(.277f,.053f);
  266. PelvisPoly.vertices[2] = k_scale * b2Vec2(.320f,.233f);
  267. PelvisPoly.vertices[3] = k_scale * b2Vec2(.112f,.233f);
  268. PelvisPoly.vertices[4] = k_scale * b2Vec2(.067f,.152f);
  269. }
  270. { // stomach
  271. StomachPoly.vertexCount = 4;
  272. StomachPoly.vertices[0] = k_scale * b2Vec2(.088f,.043f);
  273. StomachPoly.vertices[1] = k_scale * b2Vec2(.284f,.043f);
  274. StomachPoly.vertices[2] = k_scale * b2Vec2(.295f,.231f);
  275. StomachPoly.vertices[3] = k_scale * b2Vec2(.100f,.231f);
  276. }
  277. { // chest
  278. ChestPoly.vertexCount = 4;
  279. ChestPoly.vertices[0] = k_scale * b2Vec2(.091f,.042f);
  280. ChestPoly.vertices[1] = k_scale * b2Vec2(.283f,.042f);
  281. ChestPoly.vertices[2] = k_scale * b2Vec2(.177f,.289f);
  282. ChestPoly.vertices[3] = k_scale * b2Vec2(.065f,.289f);
  283. }
  284. { // head
  285. HeadCirc.radius = k_scale * .115f;
  286. }
  287. { // neck
  288. NeckPoly.vertexCount = 4;
  289. NeckPoly.vertices[0] = k_scale * b2Vec2(.038f,.054f);
  290. NeckPoly.vertices[1] = k_scale * b2Vec2(.149f,.054f);
  291. NeckPoly.vertices[2] = k_scale * b2Vec2(.154f,.102f);
  292. NeckPoly.vertices[3] = k_scale * b2Vec2(.054f,.113f);
  293. }
  294. { // upper arms
  295. LUpperArmPoly.vertexCount = RUpperArmPoly.vertexCount = 5;
  296. LUpperArmPoly.vertices[0] = RUpperArmPoly.vertices[0] = k_scale * b2Vec2(.092f,.059f);
  297. LUpperArmPoly.vertices[1] = RUpperArmPoly.vertices[1] = k_scale * b2Vec2(.159f,.059f);
  298. LUpperArmPoly.vertices[2] = RUpperArmPoly.vertices[2] = k_scale * b2Vec2(.169f,.335f);
  299. LUpperArmPoly.vertices[3] = RUpperArmPoly.vertices[3] = k_scale * b2Vec2(.078f,.335f);
  300. LUpperArmPoly.vertices[4] = RUpperArmPoly.vertices[4] = k_scale * b2Vec2(.064f,.248f);
  301. }
  302. { // forearms
  303. LForearmPoly.vertexCount = RForearmPoly.vertexCount = 4;
  304. LForearmPoly.vertices[0] = RForearmPoly.vertices[0] = k_scale * b2Vec2(.082f,.054f);
  305. LForearmPoly.vertices[1] = RForearmPoly.vertices[1] = k_scale * b2Vec2(.138f,.054f);
  306. LForearmPoly.vertices[2] = RForearmPoly.vertices[2] = k_scale * b2Vec2(.149f,.296f);
  307. LForearmPoly.vertices[3] = RForearmPoly.vertices[3] = k_scale * b2Vec2(.088f,.296f);
  308. }
  309. { // hands
  310. LHandPoly.vertexCount = RHandPoly.vertexCount = 5;
  311. LHandPoly.vertices[0] = RHandPoly.vertices[0] = k_scale * b2Vec2(.066f,.031f);
  312. LHandPoly.vertices[1] = RHandPoly.vertices[1] = k_scale * b2Vec2(.123f,.020f);
  313. LHandPoly.vertices[2] = RHandPoly.vertices[2] = k_scale * b2Vec2(.160f,.127f);
  314. LHandPoly.vertices[3] = RHandPoly.vertices[3] = k_scale * b2Vec2(.127f,.178f);
  315. LHandPoly.vertices[4] = RHandPoly.vertices[4] = k_scale * b2Vec2(.074f,.178f);;
  316. }
  317. }
  318. void BipedDef::DefaultJoints()
  319. {
  320. //b.LAnkleDef.body1 = LFoot;
  321. //b.LAnkleDef.body2 = LCalf;
  322. //b.RAnkleDef.body1 = RFoot;
  323. //b.RAnkleDef.body2 = RCalf;
  324. { // ankles
  325. b2Vec2 anchor = k_scale * b2Vec2(-.045f,-.75f);
  326. LAnkleDef.localAnchor1 = RAnkleDef.localAnchor1 = anchor - LFootDef.position;
  327. LAnkleDef.localAnchor2 = RAnkleDef.localAnchor2 = anchor - LCalfDef.position;
  328. LAnkleDef.referenceAngle = RAnkleDef.referenceAngle = 0.0f;
  329. LAnkleDef.lowerAngle = RAnkleDef.lowerAngle = -0.523598776f;
  330. LAnkleDef.upperAngle = RAnkleDef.upperAngle = 0.523598776f;
  331. }
  332. //b.LKneeDef.body1 = LCalf;
  333. //b.LKneeDef.body2 = LThigh;
  334. //b.RKneeDef.body1 = RCalf;
  335. //b.RKneeDef.body2 = RThigh;
  336. { // knees
  337. b2Vec2 anchor = k_scale * b2Vec2(-.030f,-.355f);
  338. LKneeDef.localAnchor1 = RKneeDef.localAnchor1 = anchor - LCalfDef.position;
  339. LKneeDef.localAnchor2 = RKneeDef.localAnchor2 = anchor - LThighDef.position;
  340. LKneeDef.referenceAngle = RKneeDef.referenceAngle = 0.0f;
  341. LKneeDef.lowerAngle = RKneeDef.lowerAngle = 0;
  342. LKneeDef.upperAngle = RKneeDef.upperAngle = 2.61799388f;
  343. }
  344. //b.LHipDef.body1 = LThigh;
  345. //b.LHipDef.body2 = Pelvis;
  346. //b.RHipDef.body1 = RThigh;
  347. //b.RHipDef.body2 = Pelvis;
  348. { // hips
  349. b2Vec2 anchor = k_scale * b2Vec2(.005f,-.045f);
  350. LHipDef.localAnchor1 = RHipDef.localAnchor1 = anchor - LThighDef.position;
  351. LHipDef.localAnchor2 = RHipDef.localAnchor2 = anchor - PelvisDef.position;
  352. LHipDef.referenceAngle = RHipDef.referenceAngle = 0.0f;
  353. LHipDef.lowerAngle = RHipDef.lowerAngle = -2.26892803f;
  354. LHipDef.upperAngle = RHipDef.upperAngle = 0;
  355. }
  356. //b.LowerAbsDef.body1 = Pelvis;
  357. //b.LowerAbsDef.body2 = Stomach;
  358. { // lower abs
  359. b2Vec2 anchor = k_scale * b2Vec2(.035f,.135f);
  360. LowerAbsDef.localAnchor1 = anchor - PelvisDef.position;
  361. LowerAbsDef.localAnchor2 = anchor - StomachDef.position;
  362. LowerAbsDef.referenceAngle = 0.0f;
  363. LowerAbsDef.lowerAngle = -0.523598776f;
  364. LowerAbsDef.upperAngle = 0.523598776f;
  365. }
  366. //b.UpperAbsDef.body1 = Stomach;
  367. //b.UpperAbsDef.body2 = Chest;
  368. { // upper abs
  369. b2Vec2 anchor = k_scale * b2Vec2(.045f,.320f);
  370. UpperAbsDef.localAnchor1 = anchor - StomachDef.position;
  371. UpperAbsDef.localAnchor2 = anchor - ChestDef.position;
  372. UpperAbsDef.referenceAngle = 0.0f;
  373. UpperAbsDef.lowerAngle = -0.523598776f;
  374. UpperAbsDef.upperAngle = 0.174532925f;
  375. }
  376. //b.LowerNeckDef.body1 = Chest;
  377. //b.LowerNeckDef.body2 = Neck;
  378. { // lower neck
  379. b2Vec2 anchor = k_scale * b2Vec2(-.015f,.575f);
  380. LowerNeckDef.localAnchor1 = anchor - ChestDef.position;
  381. LowerNeckDef.localAnchor2 = anchor - NeckDef.position;
  382. LowerNeckDef.referenceAngle = 0.0f;
  383. LowerNeckDef.lowerAngle = -0.174532925f;
  384. LowerNeckDef.upperAngle = 0.174532925f;
  385. }
  386. //b.UpperNeckDef.body1 = Chest;
  387. //b.UpperNeckDef.body2 = Head;
  388. { // upper neck
  389. b2Vec2 anchor = k_scale * b2Vec2(-.005f,.630f);
  390. UpperNeckDef.localAnchor1 = anchor - ChestDef.position;
  391. UpperNeckDef.localAnchor2 = anchor - HeadDef.position;
  392. UpperNeckDef.referenceAngle = 0.0f;
  393. UpperNeckDef.lowerAngle = -0.610865238f;
  394. UpperNeckDef.upperAngle = 0.785398163f;
  395. }
  396. //b.LShoulderDef.body1 = Chest;
  397. //b.LShoulderDef.body2 = LUpperArm;
  398. //b.RShoulderDef.body1 = Chest;
  399. //b.RShoulderDef.body2 = RUpperArm;
  400. { // shoulders
  401. b2Vec2 anchor = k_scale * b2Vec2(-.015f,.545f);
  402. LShoulderDef.localAnchor1 = RShoulderDef.localAnchor1 = anchor - ChestDef.position;
  403. LShoulderDef.localAnchor2 = RShoulderDef.localAnchor2 = anchor - LUpperArmDef.position;
  404. LShoulderDef.referenceAngle = RShoulderDef.referenceAngle = 0.0f;
  405. LShoulderDef.lowerAngle = RShoulderDef.lowerAngle = -1.04719755f;
  406. LShoulderDef.upperAngle = RShoulderDef.upperAngle = 3.14159265f;
  407. }
  408. //b.LElbowDef.body1 = LForearm;
  409. //b.LElbowDef.body2 = LUpperArm;
  410. //b.RElbowDef.body1 = RForearm;
  411. //b.RElbowDef.body2 = RUpperArm;
  412. { // elbows
  413. b2Vec2 anchor = k_scale * b2Vec2(-.005f,.290f);
  414. LElbowDef.localAnchor1 = RElbowDef.localAnchor1 = anchor - LForearmDef.position;
  415. LElbowDef.localAnchor2 = RElbowDef.localAnchor2 = anchor - LUpperArmDef.position;
  416. LElbowDef.referenceAngle = RElbowDef.referenceAngle = 0.0f;
  417. LElbowDef.lowerAngle = RElbowDef.lowerAngle = -2.7925268f;
  418. LElbowDef.upperAngle = RElbowDef.upperAngle = 0;
  419. }
  420. //b.LWristDef.body1 = LHand;
  421. //b.LWristDef.body2 = LForearm;
  422. //b.RWristDef.body1 = RHand;
  423. //b.RWristDef.body2 = RForearm;
  424. { // wrists
  425. b2Vec2 anchor = k_scale * b2Vec2(-.010f,.045f);
  426. LWristDef.localAnchor1 = RWristDef.localAnchor1 = anchor - LHandDef.position;
  427. LWristDef.localAnchor2 = RWristDef.localAnchor2 = anchor - LForearmDef.position;
  428. LWristDef.referenceAngle = RWristDef.referenceAngle = 0.0f;
  429. LWristDef.lowerAngle = RWristDef.lowerAngle = -0.174532925f;
  430. LWristDef.upperAngle = RWristDef.upperAngle = 0.174532925f;
  431. }
  432. }
  433. void BipedDef::DefaultPositions()
  434. {
  435. LFootDef.position = RFootDef.position = k_scale * b2Vec2(-.122f,-.901f);
  436. LCalfDef.position = RCalfDef.position = k_scale * b2Vec2(-.177f,-.771f);
  437. LThighDef.position = RThighDef.position = k_scale * b2Vec2(-.217f,-.391f);
  438. LUpperArmDef.position = RUpperArmDef.position = k_scale * b2Vec2(-.127f,.228f);
  439. LForearmDef.position = RForearmDef.position = k_scale * b2Vec2(-.117f,-.011f);
  440. LHandDef.position = RHandDef.position = k_scale * b2Vec2(-.112f,-.136f);
  441. PelvisDef.position = k_scale * b2Vec2(-.177f,-.101f);
  442. StomachDef.position = k_scale * b2Vec2(-.142f,.088f);
  443. ChestDef.position = k_scale * b2Vec2(-.132f,.282f);
  444. NeckDef.position = k_scale * b2Vec2(-.102f,.518f);
  445. HeadDef.position = k_scale * b2Vec2(.022f,.738f);
  446. }