2
0

APIChanges.md 5.9 KB

Breaking API Changes

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.

Changes that make some state saved through SaveBinaryState from a prior version of the library unreadable by the new version is marked as SBS. See 'Saving Shapes' in Architecture and API documentation for further information.

Changes between v1.1.0 and v2.0.0

  • 20221027 - SBS (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. (5ac751cee9)
  • 20220903 - SBS - Added overrides for number of position/velocity solver iterations. Only affects serialization. (38ec33942e)
  • 20220826 - SBS - Removed FixedConstraintSettings and SliderConstraintSettings SetPoint functions. If you were calling this function replace it by setting mAutoDetectPoint = true. (d16a0b05bf)
  • 20220614 - It is now possible to override the memory allocator, register the default using RegisterDefaultAllocator(). This means that the public API now takes STL containers that use a custom memory allocator so use Array instead of vector, UnorderedMap instead of unordered_map etc. If you're using placement new, replace new (x) y with ::new (x) y. Define JPH_DISABLE_CUSTOM_ALLOCATOR to disable this new behavior (b68097f582)
  • 20220606 - SBS - The slider constraint now has frequency and damping for its limits (09d6d9d51c)
  • 20220606 - SBS - The rack and pinion and gear constraints were added (09d6d9d51c)
  • 20220517 - Note: Superseded by d16a0b05bf. When constructing a FixedConstraint you now need to call FixedConstraintSettings::SetPoint to configure the point where the bodies attach (4f7c925c31)
  • 20220516 - Constraint::GetType was renamed to GetSubType, a new GetType function was introduced (3e2151a009)
  • 20220516 - SBS - Added possibility to save the current state of the physics world as a scene (3e2151a009)
  • 20220510 - Factory::sInstance must now be allocated by the application prior to calling RegisterTypes() and has changed to a pointer (3ca62973da)
  • 20220503 - Unused function SerializableObject::OnLoaded was removed (388d47254a)
  • 20220502 - ContactConstraintManager::CombineFunction has additional parameters: the SubShapeIDs from both bodies (6b87356373)
  • 20220415 - Removed Body::GetDebugName / SetDebugName, keep this info in a lookaside table if you need it (6db4d3beac)
  • 20220406 - Renamed CollisionDispatch::sCastShapeVsShape to sCastShapeVsShapeLocalSpace (6ba21f50dc)
  • 20220327 - Changed the default include path, #include must be replaced by #include (06e9d17d38)
  • 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 (28f363856a)
  • 20220303 - Note: Partially superseded by d16a0b05bf. When constructing a SliderConstraint you now need to call SliderConstraintSettings::SetPoint to configure the point where the bodies attach. Also replace mSliderAxis = x with SetSliderAxis(x) (5a327ec182)
  • 20220228 - PointConstraint::mCommonPoint is now mPoint1 / mPoint2. Replace mCommonPoint = x with mPoint1 = mPoint2 = x (066dfb8940)
  • 20220226 - ObjectToBroadPhaseLayer and BroadPhaseLayerToString changed to BroadPhaseLayerInterface, this makes mapping a broadphase layer to an object layer more flexible (36dd3f8c8c)
  • 20220222 - Shape and body user data changed from void * / uint32 to uint64 (14e062ac96)
  • Changes between v1.0.0 and v1.1.0

    • No breaking changes.

    Changes between v0.0.0 and v1.0.0

    • 20220107 - PhysicsSettings::mBodyPairCacheCosMaxDeltaRotation was renamed to mBodyPairCacheCosMaxDeltaRotationDiv2
    • 20211219 - SBS - Now storing 3 components for a Vec3 instead of 4 in SaveBinaryState (23c1b9d902)
    • 20211212 - Removed StatCollector (92a117e0f0)
    • 20210711 - HeightFieldShapeSettings::mBlockSize is subdivided one more time at run-time, so this is effectively 2x the block size (2aa3b443bf)
    • 20211106 - Mutex class now has its own implementation on Platform Blue, users must implement the JPH_PLATFORM_BLUEMUTEX* functions (a61dc67503)
    • 20211019 - ShapeCast::mShape no longer keeps a reference, the caller is responsible for keeping the reference now (e2bbdda911)
    • 20211004 - Removed RTTI from Shape class, use Shape::GetType / GetSubType now (6d5cafd535)
    • 20210930 - Changed RestoreMaterialState and RestoreSubShapeState to use pointers instead of vectors to allow loading shapes with fewer memory allocations (b8953791f3)
    • 20210918 - PhysicsSystem::Init takes an extra parameter to specify the amount of mutexes to use (ef371411af)
    • 20210827 - BroadPhaseLayerPairFilter was changed to ObjectVsBroadPhaseLayerFilter to avoid testing too many layers during collision queries (33883574bb)