Skip to content

Latest commit

 

History

History
83 lines (76 loc) · 5.39 KB

Changes.md

File metadata and controls

83 lines (76 loc) · 5.39 KB

Changes

Here's a run-down of some of the changes in going from Box2D 2.3.2 to PlayRho, categorized as API (Application Programming Interface) changes, Testbed changes, and other changes.

API Changes

  • Stripped the b2 prefix off of names.
  • Moved exported symbols into the namespace of playrho.
  • Moved exported symbols related to 2-dimensional space into the nested namespace of playrho::d2.
  • Eliminated all mutable global variables.
  • Replaced pre-processor defines, except those used for include guards, with C++ solutions.
  • Unified dynamic body support so all shapes can now be used with dynamic bodies. Support for point selection and associated mass data information has been added for chain and edge shapes.
  • Completed collision support for all shapes. All shapes can collide with any other shape now (chains can collide with other chains or edges or any other kind of shape).
  • All shapes support vertex-radius based corner rounding now. This enables capsule shapes and other visibly rounded shapes.
  • Rounded and modified corner collisions. This supports the physical behaviors expected of rounded corners, like increased roll-ability, while preventing dragged shapes from getting stuck on composite surfaces.
  • Vertex-radius respecting RayCast functionality for all shapes now (RayCast functionality had been only respecting the vertex-radius for circle shapes).
  • Refactored polygon shapes to support up to 254-vertices.
  • More stable polygon stacking.
  • Shared shape ownership, with friction, density, and restitution moved into them (from Fixture class) for reduced memory usage.
  • Renamed circle shapes as "disk" shapes to distinguish them as solid and never hollow.
  • Switched from reference-semantics to value-semantics. Pointers are gone from the interface. References to bodies, fixtures, joints, and contacts have been replaced with identifiers and function interfaces.
  • Converted public "virtual" interfaces to value-semantic polymorphic value types.
  • Added support for C++11 range-based loops and constant expressions.
  • Added compile-time support for "zero-runtime-overhead" strongly-typed physical units (using an interface to constexpr enhanced boost units). For details on how to enable this, see Documentation/PhysicalUnits.md.
  • Added compile-time support for double and long double floating-point types (in addition to float), and 32-bit and 64-bit fixed-point types.
  • Fully per-step run-time configurable (via StepConf).
  • In-depth per-step return value statistics (via StepStats).
  • Increased construction-time configurability of world instances (via World::Def).
  • Refactored numerous methods to be non-member non-friend functions.
  • Refactored various functions and procedures to be "pure functions".
  • Replaced world locked related asserts with throws of World::LockedError instances.
  • Removed the gravity concept from World instances in favor of increasing performance of steps by consolidating acceleration entirely within bodies.
  • Added many per-step run-time configuration capabilities.
  • Increased per-step statistics.
  • Added online API Documentation.

Testbed changes

  • Updated UI to provide full access to the per-step configurability, per-step statistics.
  • Added the ability to manipulate bodies while paused.
  • Added additional paths to find font and a font-less mode (instead of aborting).
  • Added more demonstrations/tests: Half Pipe, iforce2d's Topdown Car, Orbiter, Newton's Cradle, Spinning Circles, and Solar System.
  • Numerous other changes.

Other Changes

  • Unit tested via Google Test and over 400 tests.
  • Added continuous integration (CI) building and unit testing of repository updates for the Linux and Windows platforms.
  • Configured use of COVERALLS for CI unit test code coverage analysis.
  • Accepted the C++ Core Guidelines as the standard guidance for new and modified source code.
  • Replaced all tab spacing with four space-character spacing.
  • Replaced custom memory allocators with standard library allocation methods.
  • Separated most structures and classes out into their own separate files.
  • The library now uses exceptions and if built with exception support enabled can allow users to intercept otherwise fatal situations such as invoking a method that's only allowed to be called while the world is not locked.