2
0

jolt_project_settings.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**************************************************************************/
  2. /* jolt_project_settings.h */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #pragma once
  31. #include <cstdint>
  32. enum JoltJointWorldNode : int {
  33. JOLT_JOINT_WORLD_NODE_A,
  34. JOLT_JOINT_WORLD_NODE_B,
  35. };
  36. class JoltProjectSettings {
  37. public:
  38. inline static int simulation_velocity_steps;
  39. inline static int simulation_position_steps;
  40. inline static bool use_enhanced_internal_edge_removal_for_bodies;
  41. inline static bool areas_detect_static_bodies;
  42. inline static bool generate_all_kinematic_contacts;
  43. inline static float penetration_slop;
  44. inline static float speculative_contact_distance;
  45. inline static float baumgarte_stabilization_factor;
  46. inline static float soft_body_point_radius;
  47. inline static float bounce_velocity_threshold;
  48. inline static bool sleep_allowed;
  49. inline static float sleep_velocity_threshold;
  50. inline static float sleep_time_threshold;
  51. inline static float ccd_movement_threshold;
  52. inline static float ccd_max_penetration;
  53. inline static bool body_pair_contact_cache_enabled;
  54. inline static float body_pair_cache_distance_sq;
  55. inline static float body_pair_cache_angle_cos_div2;
  56. inline static bool use_enhanced_internal_edge_removal_for_queries;
  57. inline static bool enable_ray_cast_face_index;
  58. inline static bool use_enhanced_internal_edge_removal_for_motion_queries;
  59. inline static int motion_query_recovery_iterations;
  60. inline static float motion_query_recovery_amount;
  61. inline static float collision_margin_fraction;
  62. inline static float active_edge_threshold_cos;
  63. inline static JoltJointWorldNode joint_world_node;
  64. inline static int temp_memory_mib;
  65. inline static int64_t temp_memory_b;
  66. inline static float world_boundary_shape_size;
  67. inline static float max_linear_velocity;
  68. inline static float max_angular_velocity;
  69. inline static int max_bodies;
  70. inline static int max_body_pairs;
  71. inline static int max_contact_constraints;
  72. static void register_settings();
  73. static void read_settings();
  74. };