CFTTPPrimitive.cpp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #include "CFTTPPrimitive.h"
  2. #include "sub.h"
  3. //-------------------------------------------------------------------------------------------------
  4. //0016D9D4
  5. CFTTPPrimitive::CFTTPPrimitive(fpoint3<PointType_18> fpoint3_r1, fpointQ<PointType_18> fpointQ_r2)
  6. : fpoint3_8(fpoint3_r1)
  7. , fpointQ_14(fpointQ_r2)
  8. {
  9. this->fpoint3_24.x_0=0; //0016DA14 24
  10. this->fpoint3_24.y_4 = 0;
  11. this->fpoint3_24.z_8 = 0;
  12. this->fpointQQ_30.list_0[0] = 0;
  13. this->fpointQQ_30.list_0[1] = 0; //0016DA0C 34
  14. this->fpointQQ_30.list_0[2] = 0;
  15. this->fpointQQ_30.list_0[3] = 0;
  16. this->fpointQQ_30.list_0[4] = 0;
  17. this->fpointQQ_30.list_0[5] = 0; //0016DA04 44
  18. this->fpointQQ_30.list_0[6] = 0;
  19. this->fpointQQ_30.list_0[7] = 0;
  20. this->fpointQQ_30.list_0[8] = 0; //0016D9FA 50
  21. /*
  22. this->filed_30.field_24 = 0;
  23. this->filed_30.field_28 = 0;
  24. this->filed_30.field_2C = 0;
  25. this->filed_30.field_30 = 0x40000; //0016DA24
  26. */
  27. this->fpointQQ_30.fpointQ_24.field_C=0x40000;
  28. this->field_64 = 0;
  29. }
  30. //-------------------------------------------------------------------------------------------------
  31. //0016D96A 0016DA30
  32. CFTTPPrimitive::~CFTTPPrimitive() {
  33. }
  34. //-------------------------------------------------------------------------------------------------
  35. //0016BE78
  36. fpoint3<PointType_26> CFTTPPrimitive::Diff(CFTTPPrimitive const* a1 , CFTTPPrimitive const* a2) {
  37. fpoint3<PointType_18> d;
  38. // d.y_4 = a1->filed_24[1]-a2->filed_24[1];
  39. // d.x_0 = a1->filed_24[0]-a2->filed_24[0];
  40. // d.z_8 = a1->filed_24[2]-a2->filed_24[2];
  41. return fpoint3<PointType_26>(d);
  42. }
  43. //-------------------------------------------------------------------------------------------------
  44. //0016C240
  45. void CFTTPPrimitive::Support(fpoint3<PointType_26>) {
  46. }
  47. //-------------------------------------------------------------------------------------------------
  48. //0016C378 ^_-
  49. //单元测试等级: 游戏运行正常
  50. //单元测试内容: 1-5关
  51. //单元测试结果: 正常
  52. void CFTTPPrimitive::Cache(fpoint<PointType_18> a) {
  53. LOGE("CFTTPPrimitive::Cache");
  54. fpointQ<PointType_18> fpointQ_sp20;
  55. fpointQ<PointType_18> fpointQ_sp10;
  56. sub_16C3E2(fpointQ_sp10,filed_4->fpointQQ_54.fpointQ_24,fpointQ_14);
  57. sub_16A88C(fpointQ_sp20,fpointQ_sp10);
  58. fpointQQ_30.fpointQ_24=fpointQ_sp20;
  59. fpointQQ_30.Cache();
  60. fpoint3<PointType_18> fpoint3_sp4;
  61. fpoint3_sp4.x_0=fpoint3_8.x_0;
  62. fpoint3_sp4.y_4=fpoint3_8.y_4;
  63. fpoint3_sp4.z_8=fpoint3_8.z_8;
  64. fpoint3<PointType_18> fpoint3_sp20 = filed_4->fpointQQ_54.Multiply(fpoint3_sp4);
  65. fpoint3_24.x_0 = fpoint3_sp20.x_0+filed_4->fpoint3_48.x_0;
  66. fpoint3_24.y_4 = fpoint3_sp20.y_4+filed_4->fpoint3_48.y_4;
  67. fpoint3_24.z_8 = fpoint3_sp20.z_8+filed_4->fpoint3_48.z_8;
  68. return ;
  69. }
  70. //-------------------------------------------------------------------------------------------------
  71. //0016C55E
  72. CFTTPCapsule CFTTPPrimitive::GenerateSweptSphere() {
  73. CFTTPCapsule ret;
  74. ret.field_0=rand();
  75. ret.field_14=rand();
  76. ret.field_c=rand();
  77. LOGE("CFTTPPrimitive::GenerateSweptSphere=%x",this);
  78. return ret;
  79. }
  80. //-------------------------------------------------------------------------------------------------