md__docs_2_a_p_i_changes.html 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=11"/>
  6. <meta name="generator" content="Doxygen 1.12.0"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>Jolt Physics: Breaking API Changes</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <script type="text/javascript" src="clipboard.js"></script>
  13. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript" src="resize.js"></script>
  17. <script type="text/javascript" src="cookie.js"></script>
  18. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  19. <script type="text/javascript" src="search/searchdata.js"></script>
  20. <script type="text/javascript" src="search/search.js"></script>
  21. <script type="text/x-mathjax-config">
  22. MathJax.Hub.Config({
  23. extensions: ["tex2jax.js"],
  24. jax: ["input/TeX","output/HTML-CSS"],
  25. });
  26. </script>
  27. <script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
  28. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  29. </head>
  30. <body>
  31. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  32. <div id="titlearea">
  33. <table cellspacing="0" cellpadding="0">
  34. <tbody>
  35. <tr id="projectrow">
  36. <td id="projectlogo"><img alt="Logo" src="LogoSmall.png"/></td>
  37. <td id="projectalign">
  38. <div id="projectname">Jolt Physics
  39. </div>
  40. <div id="projectbrief">A multi core friendly Game Physics Engine</div>
  41. </td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </div>
  46. <!-- end header part -->
  47. <!-- Generated by Doxygen 1.12.0 -->
  48. <script type="text/javascript">
  49. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  50. var searchBox = new SearchBox("searchBox", "search/",'.html');
  51. /* @license-end */
  52. </script>
  53. <script type="text/javascript">
  54. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  55. $(function() { codefold.init(0); });
  56. /* @license-end */
  57. </script>
  58. <script type="text/javascript" src="menudata.js"></script>
  59. <script type="text/javascript" src="menu.js"></script>
  60. <script type="text/javascript">
  61. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  62. $(function() {
  63. initMenu('',true,false,'search.php','Search',true);
  64. $(function() { init_search(); });
  65. });
  66. /* @license-end */
  67. </script>
  68. <div id="main-nav"></div>
  69. </div><!-- top -->
  70. <div id="side-nav" class="ui-resizable side-nav-resizable">
  71. <div id="nav-tree">
  72. <div id="nav-tree-contents">
  73. <div id="nav-sync" class="sync"></div>
  74. </div>
  75. </div>
  76. <div id="splitbar" style="-moz-user-select:none;"
  77. class="ui-resizable-handle">
  78. </div>
  79. </div>
  80. <script type="text/javascript">
  81. /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
  82. $(function(){initNavTree('md__docs_2_a_p_i_changes.html',''); initResizable(true); });
  83. /* @license-end */
  84. </script>
  85. <div id="doc-content">
  86. <!-- window showing the filter options -->
  87. <div id="MSearchSelectWindow"
  88. onmouseover="return searchBox.OnSearchSelectShow()"
  89. onmouseout="return searchBox.OnSearchSelectHide()"
  90. onkeydown="return searchBox.OnSearchSelectKey(event)">
  91. </div>
  92. <!-- iframe showing the search results (closed by default) -->
  93. <div id="MSearchResultsWindow">
  94. <div id="MSearchResults">
  95. <div class="SRPage">
  96. <div id="SRIndex">
  97. <div id="SRResults"></div>
  98. <div class="SRStatus" id="Loading">Loading...</div>
  99. <div class="SRStatus" id="Searching">Searching...</div>
  100. <div class="SRStatus" id="NoMatches">No Matches</div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. <div><div class="header">
  106. <div class="headertitle"><div class="title">Breaking API Changes</div></div>
  107. </div><!--header-->
  108. <div class="contents">
  109. <div class="textblock"><p><a class="anchor" id="autotoc_md6"></a></p>
  110. <p>This document lists all breaking API changes by date and by release tag. Note that not all API changes are listed here, trivial changes (that cause a compile error and require an obvious fix) are not listed.</p>
  111. <p>Changes that make some state saved through SaveBinaryState from a prior version of the library unreadable by the new version is marked as <em>SBS</em>. See <a href="https://jrouwe.github.io/JoltPhysics/#saving-shapes">Saving Shapes</a> for further information.</p>
  112. <h1><a class="anchor" id="autotoc_md33"></a>
  113. Changes between v5.4.0 and latest</h1>
  114. <ul>
  115. <li>20251206 - Renamed <code>JPH_CPU_ADDRESS_BITS</code> to <code>JPH_CPU_ARCH_BITS</code> because the size of a pointer can be different from the number of bits used by the architecture. (db654de2a6098fd1ad78cb9a3e70f6a8a61c00b5)</li>
  116. </ul>
  117. <h1><a class="anchor" id="autotoc_md34"></a>
  118. Changes between v5.3.0 and v5.4.0</h1>
  119. <ul>
  120. <li>20240529 - <em>SBS</em> - Added <code><a class="el" href="class_soft_body_creation_settings.html#a284bce9885936d4b57243e57e00c8747" title="If the faces in this soft body should be treated as double sided for the purpose of collision detecti...">SoftBodyCreationSettings::mFacesDoubleSided</a></code> which treats the faces of the soft body as double sided. This changes the binary serialization format. (3ad037b9262ba81bf7ceda10687f2a07da38f091)</li>
  121. <li>20240529 - <em>SBS</em> - <a class="el" href="class_wheel_settings_t_v.html" title="WheelSettings object specifically for TrackedVehicleController.">WheelSettingsTV</a> and <a class="el" href="class_wheel_settings_w_v.html" title="WheelSettings object specifically for WheeledVehicleController.">WheelSettingsWV</a> were not serializing their base class members. This changes the binary serialization format. (cfefdc669291bd25dd168af95fb32515cc05a78b)</li>
  122. <li>20250523 - <em>SBS</em> - <code>SoftBodySharedSettings::mVertexRadius</code> was moved to <code><a class="el" href="class_soft_body_creation_settings.html#ab2076669e8376fdef3526623a99fb85a" title="How big the particles are, can be used to push the vertices a little bit away from the surface of oth...">SoftBodyCreationSettings::mVertexRadius</a></code>, this also changes the serialization format of soft bodies. (f3d906f8c0a07a6993ecb2ff962c892a04843daa)</li>
  123. <li>20250505 - The remap tables in <code><a class="el" href="class_soft_body_shared_settings_1_1_optimization_results.html" title="Information about the optimization of the soft body, the indices of certain elements may have changed...">SoftBodySharedSettings::OptimizationResults</a></code> mapped from new to old index instead of from old to new as was documented. The maps now behave as documented. (1ee6eb2f059dab839b0bde02b3c455a7bd24e533)</li>
  124. <li>20250505 - <em>SBS</em> - The <code><a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a></code> binary serialization format changed. (1ee6eb2f059dab839b0bde02b3c455a7bd24e533)</li>
  125. </ul>
  126. <h1><a class="anchor" id="autotoc_md35"></a>
  127. Changes between v5.2.0 and v5.3.0</h1>
  128. <ul>
  129. <li>20250131 - <code>PhysicsSettings::mManifoldToleranceSq</code> is no longer squared and now called <code>mManifoldTolerance</code>. <code>ManifoldBetweenTwoFaces</code> now takes <code>inMaxContactDistance</code> instead of <code>inMaxContactDistanceSq</code>. (7611a4cb33b15fcb9108794ecb6fc5090470a438)</li>
  130. <li>20250108 - <code><a class="el" href="struct_character_virtual_1_1_contact.html#a90d33cabd5e7e175186d781efa42031f" title="If the character actually collided with the contact (can be false if a predictive contact never becom...">CharacterVirtual::Contact::mHadCollision</a></code> is now true for sensor contacts (<code>mIsSensorB</code>). Make sure you ignore all discarded contacts (<code>mWasDiscarded</code>) when using <code><a class="el" href="class_character_virtual.html#a2fcecdf5b3e0f584f2bb7ec5a128dbe6">CharacterVirtual::GetActiveContacts</a></code>. (0ce60932501cdadcb8b209b3e03c143fac4cbcd6)</li>
  131. <li>20250108 - <code><a class="el" href="class_character_contact_listener.html">CharacterContactListener</a></code> now has <code>OnContactPersisted</code>, <code>OnContactRemoved</code>, <code>OnCharacterContactPersisted</code> and <code>OnCharacterContactRemoved</code> functions. If you relied on <code>OnContactAdded</code>/<code>OnCharacterContactAdded</code> callbacks, you may want to call those functions from <code>OnContactPersisted</code>/<code>OnCharacterContactPersisted</code> to keep the behavior the same. (0ce60932501cdadcb8b209b3e03c143fac4cbcd6)</li>
  132. <li>20241221 - <code><a class="el" href="class_body_interface.html#a9ecde691e54928413bc001db60830488">BodyInterface::AddForce</a></code> applied a force per soft body vertex rather than to the whole body, this resulted in a soft body accelerating much more compared to a rigid body of the same mass. If you are applying forces to soft bodies, you need to multiply the force by the number of vertices of the soft body to get the same effect as before. (7850b05a97d2079fc52e538507c843026a555ef3)</li>
  133. <li>20241125 - <em>SBS</em> - Changed the binary serialization format of <code><a class="el" href="class_mesh_shape.html">MeshShape</a></code> to allow for bigger meshes of up to 110M triangles. (c738b3490c72cf868bdd704db7d0191b41541751)</li>
  134. <li>20241119 - Removed the use of <code>std::unordered_map</code> and <code>std::unordered_set</code> and replaced them with our own implementation: <code><a class="el" href="class_unordered_map.html">UnorderedMap</a></code> and <code><a class="el" href="class_unordered_set.html">UnorderedSet</a></code>. The public facing interface includes some instances of these, e.g. <code><a class="el" href="class_shape.html#a5944ae14aeacc70bb42a38d7c3a31220">Shape::ShapeToIDMap</a></code>. Since these are typedeffed and the interface remained the same, applications should not notice the change. (f1420822d39c440492602b670eac8ae2f5821401)</li>
  135. </ul>
  136. <h1><a class="anchor" id="autotoc_md36"></a>
  137. Changes between v5.1.0 and v5.2.0</h1>
  138. <ul>
  139. <li>20240927 - <a class="el" href="class_physics_step_listener.html#ab4de6bf7f8150c3e4b3d4667c61674ea">PhysicsStepListener::OnStep</a> now takes a single <a class="el" href="class_physics_step_listener_context.html" title="Context information for the step listener.">PhysicsStepListenerContext</a> parameter. The old parameters 'delta time' and 'physics system' are part of this context. The <a class="el" href="class_vehicle_constraint.html">VehicleConstraint</a> step callbacks use the same context. (8153cd854ce0547b2def425118e1e2f68a9e365c)</li>
  140. <li>20240922 - <a class="el" href="class_soft_body_manifold.html" title="An interface to query which vertices of a soft body are colliding with other bodies.">SoftBodyManifold</a> now has a separate interface to return collisions with sensors (GetNumSensorContacts/GetSensorContactBodyID), this means they can no longer be retrieved through GetContactBodyID. (4058e6a72edc6e11630b3ec6b67d97e2b9324473)</li>
  141. <li>20240922 - The interface of <a class="el" href="class_shape.html#aa0b3c774b4ac685b7c97c02d20fc8627">Shape::CollideSoftBodyVertices</a> changed. It no longer takes a list of <a class="el" href="class_soft_body_vertex.html">SoftBodyVertex</a> but instead uses <a class="el" href="class_collide_soft_body_vertex_iterator.html">CollideSoftBodyVertexIterator</a>. Also the delta time and displacement due to gravity parameters have been removed. If you have custom shapes, you need to update the signature. (4058e6a72edc6e11630b3ec6b67d97e2b9324473)</li>
  142. <li>20240825 - RayCastSettings::mBackFaceMode was split into mBackFaceModeTriangles and mBackFaceModeConvex. Replace <code>mBackFaceMode = ...</code> with <code>SetBackFaceMode(...)</code> (b3cd9f4846c52a84064b7e5e9a9a9fcbfdf286de)</li>
  143. <li>20240823 - Added virtual function <a class="el" href="class_shape.html#a11453c55f44f37cf405eee79afdbfe00">Shape::GetLeafShape</a>. If you have custom shapes, you may need to override this function and provide an implementation. (d7f08b83670ea6d0842e231f50ad2a175f56f949)</li>
  144. </ul>
  145. <h1><a class="anchor" id="autotoc_md37"></a>
  146. Changes between v5.0.0 and v5.1.0</h1>
  147. <ul>
  148. <li>20240811 - Added cmake options to toggle exception-handling and <a class="el" href="class_r_t_t_i.html">RTTI</a>. CPP_EXCEPTIONS_ENABLED enables exceptions, CPP_RTTI_ENABLED enables <a class="el" href="class_r_t_t_i.html">RTTI</a>. Before this change <a class="el" href="class_r_t_t_i.html">RTTI</a> was off for MSVC and on for other compilers. Exceptions were on for all builds. You may need to set these options if your build relies on these C++ features. (760974d733ed24ea268a3bb9a8ef391b8ac503c7)</li>
  149. <li>20240803 - <em>SBS</em> - Removed the use of size_t when saving to binary. This means that the 32 and 64 bit versions of the lib can now read each others streams and that the 64 bit version has been adjusted to match the 32 bit version. (b54a0849e01f9f793fef3a219dfabdc7559f71ed)</li>
  150. <li>20240714 - The Reallocate function now takes an additional parameter 'old size' (6a7251d095f4c7e7c1c351d00829a20fa770246e)</li>
  151. <li>20240517 - <em>SBS</em> - Combined a number of allocations into 1 for <a class="el" href="class_height_field_shape.html">HeightFieldShape</a>. This changes the binary serialization format for this class. (bd32df12bb8ab77b37eeedc226f368268c32ae17)</li>
  152. <li>20240514 - Added macro JPH_OBJECT_STREAM that controls if <a class="el" href="class_object_stream.html" title="Base class for object stream input and output streams.">ObjectStream</a> is compiled or not. By default this is turned on, so you should not see a change, but if you compile without cmake you may need to define JPH_OBJECT_STREAM. (dc3ea787223d45855987e32b8bef7f9a59f6fcd2)</li>
  153. <li>20240504 - Replaced std::vector with a custom <a class="el" href="class_array.html">Array</a> class. It can be turned off by enabling the JPH_USE_STD_VECTOR define (or the USE_STD_VECTOR cmake option). (bdc1695a643457db86b72119b1393ae69b9a182e)</li>
  154. <li>20240504 - Added a Reallocate function that needs to be implemented when you override the memory allocators and a reallocate function that you need to implement if you have a custom array allocator. The behavior is the same as the C realloc function. It is used to reallocate a block of memory for simple types instead of always going through a alloc, copy, free cycle. (bdc1695a643457db86b72119b1393ae69b9a182e)</li>
  155. <li>20240413 - <em>SBS</em> - Skinned constraints are now processed in parallel, this means that they are reordered when Optimize() is called (see <a class="el" href="class_soft_body_shared_settings_1_1_optimization_results.html#a9a71a19af3ff2567b4902e08657e6f5c" title="Maps old skinned constraint index to new skinned constraint index.">SoftBodySharedSettings::OptimizationResults::mSkinnedRemap</a>). This also caused a change to the binary serialization format of <a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a>. (744900a4becb4dc69ee2bd70d6b26ee46da3e64a)</li>
  156. <li>20240407 - <em>SBS</em> - The binary format of <a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a> changed due to an optimization pass. Also the results of the Optimize() call are no longer serialized when using an <a class="el" href="class_object_stream.html" title="Base class for object stream input and output streams.">ObjectStream</a>. Finally the Optimize() call will reorder the constraints (see <a class="el" href="class_soft_body_shared_settings_1_1_optimization_results.html" title="Information about the optimization of the soft body, the indices of certain elements may have changed...">SoftBodySharedSettings::OptimizationResults</a>). (22739d900b4d92905ecccf2d81f18dece4a42595)</li>
  157. </ul>
  158. <h1><a class="anchor" id="autotoc_md38"></a>
  159. Changes between v4.0.2 and v5.0.0</h1>
  160. <ul>
  161. <li>20240327 - <em>SBS</em> - SoftBodySharedSettings::CreateEdges was renamed to CreateConstraints and can now also create shear and bend constraints. This also breaks the serialization format for <a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a>. (8e4bf3fa03f59cff6af7394d69cdf62abaf7a1d2)</li>
  162. <li>20240310 - <em>SBS</em> - Soft body skinned constraints now use a sphere as backstop instead of an infinite plane. This also breaks the serialization format for <a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a>. (17db6d3f245d2198319c3787f62498fe5935b7c8)</li>
  163. <li>20240225 - <em>SBS</em> - Changes were made to <a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a> that break the binary serialization format of that class. (277b818ffefed4f15477ff1e6d0cc07065899903)</li>
  164. <li>20240223 - Added <a class="el" href="class_convex_shape.html#a4cd6e2f87f30d108faf1f119dd73a06ba7a1920d61156abc05a60135aefe8bc67" title="Use both Support::GetSupport add Support::GetConvexRadius to get a support point that matches the ori...">ConvexShape::ESupportMode::Default</a>. If you have custom convex shapes you need to handle this in <a class="el" href="class_convex_shape.html#ae043918f1de4d0049c6cb2a92b545e06">ConvexShape::GetSupportFunction</a>. (0f67cc2915c5e34a4a38480580dad73888a1952e)</li>
  165. <li>20240216 - Restriction angular motion using EAllowedDOFs now works in world space rather than in local space. This change was made to be more in line with other physics engines and to fix some issues with constraints. If you need the old behavior then copy <a href="https://github.com/jrouwe/JoltPhysics/blob/9631e217e54b8492ac36471f2aa966df40d6c2ad/Jolt/Physics/Body/MotionProperties.cpp#L33-L118">this</a> code into your own code base and call MotionProperties::SetInverseInertia(diagonal, rotation) where diagonal is called mInvInertiaDiagonal and rotation is called mInertiaRotation in the code snippet. (191536d51d71ee29147205aa09d1acab52789e5f)</li>
  166. <li>20240210 - Fixed spelling error EPathRotationConstraintType::ConstaintToPath to <a class="el" href="_path_constraint_8h.html#ad9f01f2f5231cdacf562f04aefbba51ba073f41f446822810e8d12d203367a61f" title="Fully constrain the rotation of body 2 to the path (following the tangent and normal of the path)">EPathRotationConstraintType::ConstrainToPath</a> (6c095bbf7906b01f427b52d43212f5ebf760fc81)</li>
  167. <li>20240210 - Added extra parameter fraction hint to <a class="el" href="class_path_constraint_path.html#aa84329614fd89561c555e2af0d4381a2">PathConstraintPath::GetClosestPoint</a>. This can be used to speed up the search along the curve and to disambiguate fractions in case a path reaches the same point multiple times (i.e. a figure-8) (b91e729e6e2c34df16cc03f5ac3b3f6d3fa8b762)</li>
  168. <li>20240203 - Longitudinal friction impulse for wheeled/tracked vehicles could become much higher than the calculated max because each iteration it was clamped to the max friction impulse which meant the total friction impulse could be <a class="el" href="struct_physics_settings.html#a66af679ba7f202b402bb23d0a0e117ad">PhysicsSettings::mNumVelocitySteps</a> times too high. In case this breaks your vehicle, the new max tire impulse callback can be used to restore the old behavior, see <a href="https://github.com/jrouwe/JoltPhysics/blob/a456b244aa2ad2ce0a8124d27823377ed0b1c4b4/Samples/Tests/Vehicle/VehicleConstraintTest.cpp#L156-L164">the vehicle constraint test</a>. (a456b244aa2ad2ce0a8124d27823377ed0b1c4b4)</li>
  169. <li>20240120 - <em>SBS</em> - Implemented enhanced internal edge removal algorithm. This breaks the binary serialization format for <a class="el" href="class_body_creation_settings.html" title="Settings for constructing a rigid body.">BodyCreationSettings</a>. (94c1ad811b95c72f4d3bb6841c73c1c3461caa91)</li>
  170. <li>20240113 - <a class="el" href="class_vehicle_constraint.html#a98e6b9822af90bf4d3a513d04acd5bc8">VehicleConstraint::CombineFunction</a> now calculates both longitudinal and lateral friction in 1 call so there can be dependencies between the two. (d6ed5b3e7b22904af555088b6ae4770f8fb0e00f)</li>
  171. <li>20240105 - <a class="el" href="class_character_virtual.html">CharacterVirtual</a> will now receive an OnContactAdded callback when it collides with a sensor (but will have no further interaction). You may need to update the logic in your <a class="el" href="class_character_contact_listener.html">CharacterContactListener</a> to ignore those contacts. (fb778c568d3ba14556559324671ffec172957f5c)</li>
  172. <li>20240101 - Renamed SensorDetectsStatic to CollideKinematicVsNonDynamic and made it work for non-sensors. This means that kinematic bodies can now get collision callbacks when they collide with other static / kinematic objects. It can also affect the order in which bodies are passed in the <a class="el" href="class_contact_listener.html#abb704483e4e1f2eba7109b504afdf482">ContactListener::OnContactValidate</a> callback. (2d607c4161a65201d66558a2cc76d1265aea527e)</li>
  173. <li>20231220 - <em>SBS</em> - Added ability to enable gyroscopic forces on <a class="el" href="class_body_creation_settings.html" title="Settings for constructing a rigid body.">BodyCreationSettings</a>. This breaks the binary serialization format for this class. (9d7748eaa91341adc17554f32bf991bfed04e47e)</li>
  174. <li>20231219 - <em>SBS</em> - Added a 'swing type' attribute to <a class="el" href="class_six_d_o_f_constraint.html" title="6 Degree Of Freedom Constraint. Allows control over each of the 6 degrees of freedom.">SixDOFConstraint</a> and <a class="el" href="class_swing_twist_constraint.html">SwingTwistConstraint</a>. This breaks the binary serialization format. (41016256e2cf1262ec05cff3cfa7645668ee0bf0)</li>
  175. <li>20231208 - Changed the meaning of Constraint::mNumVelocity/PositionStepsOverride. Before the number of steps would be the maximum of all constraints and the default value, now an overridden value of 0 means that the constraint uses the default value, otherwise it will use the value as specified. This means that if all constraints in an island have a lower value than the default, we will now use the lower value instead of the default. (0771808a03b850d16f1c64156f0aee827ca3706b)</li>
  176. <li>20231208 - <em>SBS</em> - Bodies can now also override the default number of solver iterations. This breaks the binary serialization format. (0771808a03b850d16f1c64156f0aee827ca3706b)</li>
  177. <li>20231203 - <a class="el" href="class_vehicle_constraint.html#a98e6b9822af90bf4d3a513d04acd5bc8">VehicleConstraint::CombineFunction</a> got two additional parameters to identify which wheel is requesting friction. (8d80155f93d0d0c3ffe3dd46550650b9c830d304)</li>
  178. </ul>
  179. <h1><a class="anchor" id="autotoc_md39"></a>
  180. Changes between v4.0.0 and v4.0.2</h1>
  181. <ul>
  182. <li>No breaking changes.</li>
  183. </ul>
  184. <h1><a class="anchor" id="autotoc_md40"></a>
  185. Changes between v3.0.1 and v4.0.0</h1>
  186. <ul>
  187. <li>20231003 - <em>SBS</em> - Bug fix in serialization of <a class="el" href="class_soft_body_shared_settings.html">SoftBodySharedSettings</a> breaks binary serialization format. (ccb250747eee4dedebfa02d950775478fb52f786)</li>
  188. <li>20230914 - Removed GetProcessorTicksPerSecond as it was not correctly implemented for all platforms. (d44f4bad0872075d5cef2779742c89203d4f4488)</li>
  189. <li>20230819 - <em>SBS</em> - <a class="el" href="class_ragdoll_settings.html" title="Contains the structure of a ragdoll.">RagdollSettings</a> got the ability to have constraints that do not follow the skeleton. This changes the binary serialization format for this class. (08fc49d2d7abfa1a69e21971785d37724c748bb6)</li>
  190. <li>20230807 - Renamed ContactSettings::mRelativeSurfaceVelocity to mRelativeLinearSurfaceVelocity. (76b809ddb1abf96641acc587fffa70101323d323)</li>
  191. <li>20230807 - <em>SBS</em> - <a class="el" href="class_physics_scene.html" title="Contains the creation settings of a set of bodies.">PhysicsScene</a> is now able to load/save soft bodies. This changes the binary serialization format. (779ba3673beebdc4021842516f4ff6aa7c1e09b4)</li>
  192. <li>20230805 - <a class="el" href="class_body.html#a64202a0bd7babbef34094157036bda8c" title="Saving state for replay.">Body::SaveState</a> and <a class="el" href="class_motion_properties.html#a9e308e4fb4cbb6c7dad8fe6b65d71aca" title="Saving state for replay.">MotionProperties::SaveState</a> now only save the state that can be changed by the simulation. Configuration properties like friction, restitution etc. must be saved by the user if desired. (7ff50429abd53f1914fd25a9e80ff47f22bc9f0e)</li>
  193. <li>20230801 - <em>SBS</em> - <a class="el" href="class_constraint.html" title="Base class for all physics constraints. A constraint removes one or more degrees of freedom for a rig...">Constraint</a> priority was added to all constraints which changes the binary serialization format. (e341bb3e959460fbe196032095c1ab0346d7e746)</li>
  194. <li>20230704 - <em>SBS</em> - A new flag was added to <a class="el" href="class_body_creation_settings.html" title="Settings for constructing a rigid body.">BodyCreationSettings</a> that changes the binary serialization format. (2dd3a033a41e422eb470484029324cc9bbaf0825)</li>
  195. <li>20230629 - Fix for engine RPM being much higher than wheel RPM when measured at clutch. Before we were ignoring bake and wheel torques in engine RPM calculation. Now they're much closer but this unfortunately means that the simulation of the vehicle has changed and mainly the engine torque and clutch strength need to be re-tweaked. (b40090766c545a68dccfac76cde8c6345ca626a6)</li>
  196. <li>20230623 - The parameter inIntegrationSubSteps was removed from <a class="el" href="class_physics_system.html#a4cdc76b2486dfaecfc9319d040e5e5f3">PhysicsSystem::Update</a> because more and more features didn't support it. If you were using it multiply inCollisionSteps with the value of inIntegrationSubSteps to get roughly the same behavior. (8fcc7a78ec051b215bf13b037b9f975baa803b6f)</li>
  197. <li>20230618 - <em>SBS</em> - A new flag was added to <a class="el" href="class_body_creation_settings.html" title="Settings for constructing a rigid body.">BodyCreationSettings</a> that changes the binary serialization format. (107b70c7585909f0757a62c318261a18d670ff97)</li>
  198. <li>20230610 - A bug was fixed that causes the vehicle suspension to be weaker when driving over low mass objects. This also changes suspension behavior a bit when driving over static objects. (44b82e395697ea553574df3cd806ffe264bfa5c4)</li>
  199. <li>20230609 - <em>SBS</em> - The <a class="el" href="class_motorcycle_controller.html" title="Runtime controller class.">MotorcycleController</a> lean controller is now a full PID controller. This changes binary serialization format. (70e7bb3e5808dabc17ee38fb823fbfa7e9140a91)</li>
  200. <li>20230609 - <em>SBS</em> - <a class="el" href="class_vehicle_constraint.html">VehicleConstraint</a> uses the new <a class="el" href="class_spring_settings.html" title="Settings for a linear or angular spring.">SpringSettings</a> class as a member which contains the mFrequency and mDamping members. This requires minor code changes. (0da97d8f3345f14c5b4b0ee3571c05832c556f98)</li>
  201. <li>20230609 - <em>SBS</em> - <a class="el" href="class_distance_constraint_settings.html" title="Distance constraint settings, used to create a distance constraint.">DistanceConstraintSettings</a>, <a class="el" href="class_slider_constraint_settings.html" title="Slider constraint settings, used to create a slider constraint.">SliderConstraintSettings</a> and <a class="el" href="class_motor_settings.html">MotorSettings</a> now use the new <a class="el" href="class_spring_settings.html" title="Settings for a linear or angular spring.">SpringSettings</a> class as a member which contains the mFrequency and mDamping members. This requires minor code changes. (3cabc057c1267fde288c1ab2a23076702c71eb79)</li>
  202. <li>20230520 - A bug was fixed in <a class="el" href="class_character_virtual.html">CharacterVirtual</a> that makes mPenetrationRecoverySpeed behave according to the documentation (1 = fully resolve collision in 1 update). With the bug the recovery was too little. If you want the penetration recovery to work as before with the bug multiply it by 1 / delta_time. (8dd93317d66a9a72d3afeff4ecb17c257a7e9d91)</li>
  203. <li>20230420 - To support compiling Jolt as a shared library, the <a class="el" href="class_r_t_t_i.html">RTTI</a> macros were changed to be able to specify if a symbol should be exported or not. If you're using Jolt's <a class="el" href="class_r_t_t_i.html">RTTI</a> system in your own project you need to change e.g. <a class="el" href="_r_t_t_i_8h.html#a13d46ae1d3df8685d4f6d2f02d44f076">JPH_DECLARE_RTTI_VIRTUAL(XXX)</a> to <a class="el" href="_r_t_t_i_8h.html#a13d46ae1d3df8685d4f6d2f02d44f076">JPH_DECLARE_RTTI_VIRTUAL(JPH_NO_EXPORT, XXX)</a>. (d2f1d97004d036c6f759203c42e264e401472037)</li>
  204. </ul>
  205. <h1><a class="anchor" id="autotoc_md41"></a>
  206. Changes between v2.0.1 and v3.0.0</h1>
  207. <ul>
  208. <li>20230331 - <em>SBS</em> - Vehicle wheels now support specifying the steering axis and wheel forward and up axis separately. This breaks the serialization format and requires setting extra properties on the wheels. (4269d8bbc77b889552a842c2e8476ba7ffc6b9a1)</li>
  209. <li>20230328 - Vehicle now supports suspension under an angle. The behavior of the suspension, even if it is under 90 degrees with the vehicle body, changed so this may require tweaking the spring constants. (172a99c718bded5faa169ac440517286684fa2f0)</li>
  210. <li>20230316 - The signature of <a class="el" href="class_shape_filter.html" title="Filter class.">ShapeFilter</a> changed and the ShouldCollide function is no longer called for triangles inside a mesh/heightfield shape (you can use <a class="el" href="class_collision_collector.html#a762c35402676662897e50dd8224e496e" title="This function will be called for every hit found, it&#39;s up to the application to decide how to store t...">CollisionCollector::AddHit</a> to filter per triangle). The previous implementation didn't pass in enough context for the application to fully determine which sub shapes were colliding. See <a href="https://github.com/jrouwe/JoltPhysics/discussions/473">#473</a> for more information. (bc4fa997f15f2953dc87ee5c1ba51ecf2077c287)</li>
  211. <li>20230313 - <a class="el" href="class_vehicle_collision_tester.html#a2af9d0d5ab81d3321133ec0b408752b7">VehicleCollisionTester::Collide</a> parameter outSuspensionLength was returning suspension length + wheel radius, now it returns the suspension length. If you have your own implementation of <a class="el" href="class_vehicle_collision_tester.html" title="Class that does collision detection between wheels and ground.">VehicleCollisionTester</a> you need to update your code. (fcd9cb0f1677709e30951f2748aefd5f72ffdae1)</li>
  212. <li>20230212 - Sensors are now able to detect other Sensors, make sure you put sensors in an ObjectLayer that doesn't collide with other sensors if you want to preserve the old behavior. (a76f5891ee429ae4fcde659c19f1eb769f9d8a21)</li>
  213. <li>20230205 - <em>SBS</em> - Added 'IsSensor' and 'UseManifoldReduction' to <a class="el" href="class_body_creation_settings.html#aabf81d68f5c180341800d69b401dddee" title="Saves the state of this object in binary form to inStream. Doesn&#39;t store the shape nor the group filt...">BodyCreationSettings::SaveBinaryState</a>. (8f6f210f53fc71e43760e20aeb2eae28ea168f4b)</li>
  214. <li>20221231 - <a class="el" href="class_object_layer_pair_filter.html" title="Filter class to test if two objects can collide based on their object layer. Used while finding colli...">ObjectLayerPairFilter</a> and <a class="el" href="class_object_vs_broad_phase_layer_filter.html" title="Class to test if an object can collide with a broadphase layer. Used while finding collision pairs.">ObjectVsBroadPhaseLayerFilter</a> are now objects instead of function pointers. (4315ad53e354f094f753664fcf7a52870f6915e4)</li>
  215. <li>20221208 - <a class="el" href="class_contact_listener.html#abb704483e4e1f2eba7109b504afdf482">ContactListener::OnContactValidate</a> is reporting collisions relative to inBaseOffset. Add this to the contact point if you want world space positions. (428611482825e369e60e0a5daf17c69a4d0f2a6f)</li>
  216. <li>20221204 - Changes related to double precision support for positions (a2c1c22059fa031faf0208258e654bcff79a63e4)<ul>
  217. <li>In many places in the public API <a class="el" href="class_vec3.html">Vec3</a> has been replaced by RVec3 (a <a class="el" href="class_vec3.html">Vec3</a> of Real values which can either be double or float depending on if JPH_DOUBLE_PRECISION is defined). In the same way RMat44 replaces <a class="el" href="class_mat44.html" title="Holds a 4x4 matrix of floats, but supports also operations on the 3x3 upper left part of the matrix.">Mat44</a>. When compiling in single precision mode (the default) you should not notice a change.</li>
  218. <li><a class="el" href="class_shape.html#a99f077aa0ffef0d518ced9b69ca21d18">Shape::GetSubmergedVolume</a> now takes a plane that's relative to inCenterOfMassTransform instead of one in world space</li>
  219. <li>Many of the <a class="el" href="class_narrow_phase_query.html">NarrowPhaseQuery</a> and <a class="el" href="class_transformed_shape.html">TransformedShape</a> collision queries now have a 'base offset' that you need to specify. Go to <a href="https://jrouwe.github.io/JoltPhysics/#big-worlds">Big Worlds</a> for more info.</li>
  220. <li>The NarrowPhaseQuery/TransformedShape CastRay / CastShape functions now take a <a class="el" href="struct_r_ray_cast.html">RRayCast</a> / <a class="el" href="struct_r_shape_cast.html">RShapeCast</a> struct as input. When compiling in single precision mode this is the same as a <a class="el" href="struct_ray_cast.html">RayCast</a> or <a class="el" href="struct_shape_cast.html">ShapeCast</a> so only the type name needs to be updated.</li>
  221. <li>If you implement your own <a class="el" href="class_temp_allocator.html">TempAllocator</a> and want to compile in double precision, make sure you align to JPH_RVECTOR_ALIGNMENT bytes (instead of 16)</li>
  222. <li>The <a class="el" href="class_skeleton_pose.html" title="Instance of a skeleton, contains the pose the current skeleton is in.">SkeletonPose</a> got a 'root offset' member, this means that the ragdoll will now make the joint transform of the first body zero and put that offset in the 'root offset'.</li>
  223. <li><a class="el" href="class_contact_manifold.html" title="Manifold class, describes the contact surface between two bodies.">ContactManifold</a> now stores the contacts relative to mBaseOffset, the arrays containing the contact points have been renamed from mWorldSpaceContactPointsOn1/2 to mRelativeContactPointsOn1/2 to reflect this.</li>
  224. <li>The <a class="el" href="class_debug_renderer.html#acea9470f13a1d50b677e2aaaeb9eeaed" title="Draw line.">DebugRenderer::DrawLine</a> function now takes RVec3Arg parameters instead of <a class="el" href="class_float3.html" title="Class that holds 3 floats. Used as a storage class. Convert to Vec3 for calculations.">Float3</a> parameters.</li>
  225. <li>The format of a recording recorded with <a class="el" href="class_debug_renderer_recorder.html" title="Implementation of DebugRenderer that records the API invocations to be played back later.">DebugRendererRecorder</a> has changed, this invalidates any prior recordings.</li>
  226. </ul>
  227. </li>
  228. <li>20221128 - MotionProperties::SetMotionQuality has been removed because changing it for an active body could cause crashes. Use <a class="el" href="class_body_interface.html#a38ce02df9d2363eec48af42ba61741bf" title="How well it detects collisions when it has a high velocity.">BodyInterface::SetMotionQuality</a> instead. (64802d163a7336e60916365ad9bce764cec4ca70)</li>
  229. </ul>
  230. <h1><a class="anchor" id="autotoc_md42"></a>
  231. Changes between v1.1.0 and v2.0.0</h1>
  232. <ul>
  233. <li>20221027 - <em>SBS</em> (vehicles only) - Rewrote engine model for wheeled vehicle. Before engine inertia was only used when the clutch was pressed, now it is always used, so you may want to use a lower value. The way torque is distributed over the wheels has also changed and may require tweaking the vehicle parameters. (5ac751cee9afcc097fd4f884308f5e4dc9fdaeaf)</li>
  234. <li>20220903 - <em>SBS</em> - Added overrides for number of position/velocity solver iterations. Only affects serialization. (38ec33942ead4968a83409bd13d868f60e6397c4)</li>
  235. <li>20220826 - <em>SBS</em> - Removed <a class="el" href="class_fixed_constraint_settings.html" title="Fixed constraint settings, used to create a fixed constraint.">FixedConstraintSettings</a> and <a class="el" href="class_slider_constraint_settings.html" title="Slider constraint settings, used to create a slider constraint.">SliderConstraintSettings</a> SetPoint functions. If you were calling this function replace it by setting mAutoDetectPoint = true. (d16a0b05bfeed42b1618e3774a9c953e6922d22b)</li>
  236. <li>20220614 - It is now possible to override the memory allocator, register the default using <a class="el" href="_memory_8cpp.html#a833946335de93bfe993d882d5e882458" title="Register platform default allocation / free functions.">RegisterDefaultAllocator()</a>. This means that the public API now takes STL containers that use a custom memory allocator so use <a class="el" href="class_array.html">Array</a> instead of vector, <a class="el" href="class_unordered_map.html">UnorderedMap</a> instead of unordered_map etc. If you're using placement new, add <code>::</code> in front of new. Define JPH_DISABLE_CUSTOM_ALLOCATOR to disable this new behavior (b68097f582148d6f66c18a6ff95c5ca9b40b48cc)</li>
  237. <li>20220606 - <em>SBS</em> - The slider constraint now has frequency and damping for its limits (09d6d9d51c46fbd159bf98abfd43cc639f6c0403)</li>
  238. <li>20220606 - <em>SBS</em> - The rack and pinion and gear constraints were added (09d6d9d51c46fbd159bf98abfd43cc639f6c0403)</li>
  239. <li>20220517 - Note: Superseded by d16a0b05bfeed42b1618e3774a9c953e6922d22b. When constructing a <a class="el" href="class_fixed_constraint.html">FixedConstraint</a> you now need to call FixedConstraintSettings::SetPoint to configure the point where the bodies attach (4f7c925c31f39eda1d8d68e4e72456b5def93d9b)</li>
  240. <li>20220516 - <a class="el" href="class_constraint.html#a6e290088c6049b1f1d1fb26df96dce3a" title="Get the type of a constraint.">Constraint::GetType</a> was renamed to GetSubType, a new GetType function was introduced (3e2151a009e8f11ca724754b2bd25e14d2654fb6)</li>
  241. <li>20220516 - <em>SBS</em> - Added possibility to save the current state of the physics world as a scene (3e2151a009e8f11ca724754b2bd25e14d2654fb6)</li>
  242. <li>20220510 - <a class="el" href="class_factory.html#afdbac3e3e59f7981d7dec696e914e69f" title="Singleton factory instance.">Factory::sInstance</a> must now be allocated by the application prior to calling <a class="el" href="_register_types_8h.html#a033e662bc8b7d5a8acd9adcc692b7cb4">RegisterTypes()</a> and has changed to a pointer (3ca62973dae7cda7a9ceece698438a45b9ad1433)</li>
  243. <li>20220503 - Unused function SerializableObject::OnLoaded was removed (388d47254a236c053a472e54c10b264765badc09)</li>
  244. <li>20220502 - <a class="el" href="class_contact_constraint_manager.html#ad0b40a0f57d994f32b069744541fce56">ContactConstraintManager::CombineFunction</a> has additional parameters: the SubShapeIDs from both bodies (6b873563739dfd3d77263c2c50af2f3f418ec15b)</li>
  245. <li>20220415 - Removed Body::GetDebugName / SetDebugName, keep this info in a lookaside table if you need it (6db4d3beac6760e55f65102db00f93dfbc56ac26)</li>
  246. <li>20220406 - Renamed CollisionDispatch::sCastShapeVsShape to sCastShapeVsShapeLocalSpace (6ba21f50dcf17bd506080ec30759724a7f3097d8)</li>
  247. <li>20220327 - Changed the default include path, <code>#include &lt;xxx&gt;</code> must be replaced by <code>#include &lt;Jolt/xxx&gt;</code> (06e9d17d385814cd24d3b77d689c0a29d854e194)</li>
  248. <li>20220318 - Added support for SSE2. If you want to use later versions of SSE make sure you have JPH_USE_SSE4_1 and JPH_USE_SSE4_2 defined (28f363856a007d03f657e46e8f6d90ccd7c6487a)</li>
  249. <li>20220303 - Note: Partially superseded by d16a0b05bfeed42b1618e3774a9c953e6922d22b. When constructing a <a class="el" href="class_slider_constraint.html" title="A slider constraint allows movement in only 1 axis (and no rotation). Also known as a prismatic const...">SliderConstraint</a> you now need to call SliderConstraintSettings::SetPoint to configure the point where the bodies attach. Also replace mSliderAxis = x with SetSliderAxis(x) (5a327ec182d0436d435c62d0bccb4e76c6324659)</li>
  250. <li>20220228 - PointConstraint::mCommonPoint is now mPoint1 / mPoint2. Replace mCommonPoint = x with mPoint1 = mPoint2 = x (066dfb8940ba3e7dbf8ed47e9a1eeb194730e04b)</li>
  251. <li>20220226 - ObjectToBroadPhaseLayer and BroadPhaseLayerToString changed to <a class="el" href="class_broad_phase_layer_interface.html" title="Interface that the application should implement to allow mapping object layers to broadphase layers.">BroadPhaseLayerInterface</a>, this makes mapping a broadphase layer to an object layer more flexible (36dd3f8c8c31ef1aeb7585b2b615c23bc8b76f13)</li>
  252. <li>20220222 - <a class="el" href="class_shape.html" title="Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...">Shape</a> and body user data changed from void * / uint32 to uint64 (14e062ac96abd571c6eff5e40b1df4d8b2333f55)</li>
  253. </ul>
  254. <h1><a class="anchor" id="autotoc_md43"></a>
  255. Changes between v1.0.0 and v1.1.0</h1>
  256. <ul>
  257. <li>No breaking changes.</li>
  258. </ul>
  259. <h1><a class="anchor" id="autotoc_md44"></a>
  260. Changes between v0.0.0 and v1.0.0</h1>
  261. <ul>
  262. <li>20220107 - PhysicsSettings::mBodyPairCacheCosMaxDeltaRotation was renamed to mBodyPairCacheCosMaxDeltaRotationDiv2</li>
  263. <li>20211219 - <em>SBS</em> - Now storing 3 components for a <a class="el" href="class_vec3.html">Vec3</a> instead of 4 in SaveBinaryState (23c1b9d9029d74076c0549c8779b3b5ac2179ea3)</li>
  264. <li>20211212 - Removed StatCollector (92a117e0f05a08de154e86d3cd0b354783aa5593)</li>
  265. <li>20210711 - <a class="el" href="class_height_field_shape_settings.html#a8e99fb8a4d1444569a307ac2b9712e31">HeightFieldShapeSettings::mBlockSize</a> is subdivided one more time at run-time, so this is effectively 2x the block size (2aa3b443bf71785616f3140c32e6a04c49516535)</li>
  266. <li>20211106 - <a class="el" href="class_mutex.html">Mutex</a> class now has its own implementation on Platform Blue, users must implement the JPH_PLATFORM_BLUE_MUTEX_* functions (a61dc67503a87ef0e190f7fb31d495ac51aa43de)</li>
  267. <li>20211019 - <a class="el" href="struct_shape_cast_t.html#a68df269e004434dd4c2dec18e29b1f8d">ShapeCast::mShape</a> no longer keeps a reference, the caller is responsible for keeping the reference now (e2bbdda9110b083b49ba323f8fd0d88c19847c2e)</li>
  268. <li>20211004 - Removed <a class="el" href="class_r_t_t_i.html">RTTI</a> from <a class="el" href="class_shape.html" title="Base class for all shapes (collision volume of a body). Defines a virtual interface for collision det...">Shape</a> class, use <a class="el" href="class_shape.html#a35b8f1a8a02f90d3edc02db22f03932a" title="Get type.">Shape::GetType</a> / GetSubType now (6d5cafd53501c2c1e313f1b1f29d5161db074fd5)</li>
  269. <li>20210930 - Changed RestoreMaterialState and RestoreSubShapeState to use pointers instead of vectors to allow loading shapes with fewer memory allocations (b8953791f35a91fcd12568c7dc4cc2f68f40fb3f)</li>
  270. <li>20210918 - <a class="el" href="class_physics_system.html#ae578fcd0c58f678156b7cd8b44f811a6">PhysicsSystem::Init</a> takes an extra parameter to specify the amount of mutexes to use (ef371411af878023f062b9930db09f17411f01ba)</li>
  271. <li>20210827 - BroadPhaseLayerPairFilter was changed to <a class="el" href="class_object_vs_broad_phase_layer_filter.html" title="Class to test if an object can collide with a broadphase layer. Used while finding collision pairs.">ObjectVsBroadPhaseLayerFilter</a> to avoid testing too many layers during collision queries (33883574bbc6fe208a4b62054d00b582872da6f4) </li>
  272. </ul>
  273. </div></div><!-- contents -->
  274. </div><!-- PageDoc -->
  275. </div><!-- doc-content -->
  276. <!-- start footer part -->
  277. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  278. <ul>
  279. <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0 </li>
  280. </ul>
  281. </div>
  282. </body>
  283. </html>