const_def_cPartic.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef CONST_DEF_CPARTIC_H_
  2. #define CONST_DEF_CPARTIC_H_
  3. //========================================
  4. #ifdef _MSC_VER
  5. #define _FUNC_ __FUNCTION__
  6. #elif __GNUC__
  7. #define _FUNC_ __PRETTY_FUNCTION__
  8. #endif
  9. //========================================
  10. #define IF_ERROR_SHOW_(variable, msg) if (variable < 0) { \
  11. cout << "ERROR!!!" << endl; \
  12. cout << msg << "< 0" << endl; \
  13. cout << __FILE__ << endl; \
  14. cout << _FUNC_<< " " << __LINE__ << endl; \
  15. return false; \
  16. } \
  17. else cout << endl; \
  18. return true;
  19. //========================================
  20. #define _DEBUG_ASSERT_(msg) cout << _FUNC_ << ":" << msg; assert(0);
  21. #define _ASSERT_OK_(); if (!this->Ok ()) { \
  22. this->show (); \
  23. _DEBUG_ASSERT_("Not Ok!") \
  24. }
  25. //========================================
  26. #define USE_SUPER_PUPER_GUARDS
  27. const int one_part_in_collid = -111;
  28. unsigned const int time_to_collide_passid = 999999999;
  29. //========================================
  30. struct part_param {
  31. double x;
  32. double y;
  33. double z;
  34. double mass;
  35. double radii;
  36. double px;
  37. double py;
  38. double pz;
  39. };
  40. struct rezalt_collider {
  41. int t;
  42. } ;
  43. #endif