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