LiquidFun v1.0.0 Release Notes
Release Date: 2014-03-18 // over 10 years ago-
Overview
๐ The 1.0.0 release of LiquidFun introduces a number of new features to the
API described below. Some of the highlights
are:- Multiple particle systems.
- ๐ New particle behaviors: barrier, static-pressure, and repulsive.
- Particle lifetimes.
- Detection of stuck particles.
- The ability to apply forces and impulses to particles.
- ๐ Java support via SWIG.
- โ
A host of new demos: inside the existing Testbed application, and gorgeous
๐ new "EyeCandy" demo for Android.
๐ Users of 0.9.0 should carefully read through the
API Modifications section to understand what they
โ need to change to get their existing applications to work with the latest
๐ release of LiquidFun.๐ New Features
- โ Added option to substep particle simulation independently of
b2World
. - โ Added barrier particles which can be used to prevent particle tunneling
due to large particle velocities or simulation steps. - โ Added static pressure particles to reduce compression of fluids.
- โ Added repulsive particles to separate particle groups from each other.
- โ Added support for multiple independent particle systems.
- โ Added option to create particles in an existing particle group.
- โ Added option to detect stuck particles.
- โ Added option to pause particle simulations. Paused simluations don't
consume cycles in b2World::Step. - โ Added option to enable a more strict check for Particle/Body interactions
in cases where complex world geometry may cause false positive contacts. - โ Added option to call a contact listener or filter on particle / fixture
or particle / particle interactions. - โ Added the ability to apply forces and impulses to particles.
- โ Added "EyeCandy" sample to demonstrate different particle rendering methods
on Android. - โ Added "Sparky", "Sandbox" and "Soup Stirrer" tests to the Testbed example
to demonstrate particle and rigid body interaction. - โ Added "Ramp", "Pointy", and "AntiPointy" tests to the Testbed example to
illustrate the difference with strict contact checking. - โ Added "Maxwell" test to the Testbed to demonstrate the direct modification
of particle velocities. - โ Added "Fracker" test to demonstrate particle viscous fluids and particle
destruction callbacks. - โ Added "Multiple Systems" test to the Testbed to demonstrate multiple
particle systems. - โ Added Java Native Interface support via SWIG. It covers a subset of the
API. - โ Added the ability to pass a list of shapes to be passed in for
particle-group creation.
API Modifications
b2Draw::e_particleBit
flag now enables/disables
b2World::DrawDebugData()
drawing the particle system.
To render the particle system using
b2World::DrawDebugData()
, the
b2Draw::e_particleBit
flag must be set on theb2Draw
object passed
tob2World::SetDebugDraw()
. It is possible to set flags onb2Draw
objects usingb2Draw::SetFlags()
.๐ Release 0.9.0 unconditionally called
b2Draw::DrawParticles()
from
b2World::DrawDebugData()
.- ๐ง Building LiquidFun on Linux, using
cmake -G"Unix Makefiles"
, now places
๐ output files in a build type sub-directory.
โ For example, the output executable of the Testbed example is now
๐ written to Box2D/Testbed/Release/Testbed when building using the Release
๐ง configuration.- Multiple independent particle systems can now exist, each with its own
physical coefficients. Previously, only one particle system existed, and
it always existed. Use b2World::CreateParticleSystem to create particle
systems, and b2World::DestroyParticleSystem to destroy them. - b2DestructionListener::SayGoodbye, b2QueryCallback::ReportParticle, and
b2RayCastCallback::ReportParticle each now takes a b2ParticleSystem pointer
as its first parameter. This change is necessary since multiple particle
systems can now exist. - ๐ The particle system API has moved from b2World to b2ParticleSystem.
For example, b2ParticleSystem::DestroyParticlesInShape replaces
b2World::DestroyParticlesInShape. You can use
b2World::CreateParticleSystem or b2World::GetParticleSystemList() to
acquire references to b2ParticleSystem. - โ Removed "Particle" from many of the functions in the particle system API.
The word is redundant now that the API is under b2ParticleSystem. The API
now has the following naming convention: - Each function that takes a particle index or handle has a "Particle"
component (e.g. "SetParticle"). Each function that operates on the entire system has no "Particle"
component (e.g. "SetRadius").GetParticleMaxCount ==> GetMaxParticleCount SetParticleMaxCount ==> SetMaxParticleCount GetParticleDensity ==> GetDensity SetParticleDensity ==> SetDensity SetParticleGravityScale ==> SetGravityScale GetParticleGravityScale ==> GetGravityScale SetParticleDamping ==> SetDamping GetParticleDamping ==> GetDamping GetParticleStaticPressureIterations ==> GetStaticPressureIterations SetParticleStaticPressureIterations ==> SetStaticPressureIterations SetParticleRadius ==> SetRadius GetParticleRadius ==> GetRadius GetParticlePositionBuffer ==> GetPositionBuffer GetParticlePositionBuffer ==> GetPositionBuffer GetParticleVelocityBuffer ==> GetVelocityBuffer GetParticleVelocityBuffer ==> GetVelocityBuffer GetParticleColorBuffer ==> GetColorBuffer GetParticleColorBuffer ==> GetColorBuffer GetParticleGroupBuffer ==> GetGroupBuffer GetParticleGroupBuffer ==> GetGroupBuffer GetParticleUserDataBuffer ==> GetUserDataBuffer GetParticleUserDataBuffer ==> GetUserDataBuffer GetParticleFlagsBuffer ==> GetFlagsBuffer SetParticleFlagsBuffer ==> SetFlagsBuffer SetParticlePositionBuffer ==> SetPositionBuffer SetParticleVelocityBuffer ==> SetVelocityBuffer SetParticleColorBuffer ==> SetColorBuffer SetParticleUserDataBuffer ==> SetUserDataBuffer GetParticleContacts ==> GetContacts GetParticleContactCount ==> GetContactCount GetParticleBodyContacts ==> GetBodyContacts GetParticleBodyContactCount ==> GetBodyContactCount DestroyParticlesInGroup ==> DestroyParticles (moved to b2ParticleGroup)
๐ Renamed
b2ParticleFlag
b2DestructionListener
to
b2DestructionListenerParticle
to be consistent with other particle flag
names.๐ Better particle-behavior stability.
Other Changes
- โ Integrated Box2D 2.3.0 release from Box2D revision 280.
- โฌ๏ธ Reduced the size of particles in Testbed particle tests to be consistent
with the size of rigid bodies. - ๐ Improved damping force to prevent particle explosions.
- ๐ Fixed
b2Timer
bug that occurs when the usec component wraps. - โ Added
b2Stat
to calculate min/max/mean of a set of samples, and
โ integrated this functionality into Testbed to measure performance. - ๐ Fixed memory leaks of large blocks allocated by b2BlockAllocator.
- ๐ Fixed incorrect stack-capacity calculation in b2VoronoiDiagram.
- โ Added operators to
b2ParticleColor
. - ๐ Improved parameter and option selection in Testbed with the fullscreen UI.
- โ Cleaned up statistics display in Testbed.
- ๐ Fixed depth-buffer allocation when creating an empty particle group.
- โ Added build step to unit-test execution scripts.
- โ Added generation of code coverage report for unit-tests.
- โ Added a script to clean up temporary cmake files.
- โ Increased warning level and enabled conversion of warnings to errors.
- โ Added unit-test for b2IsValid().
- โ Added
b2World::QueryShapeAABB()
convenience function to query the world
for objects in the AABB which encloses a shape. - Inlined some simple b2ParticleSystem and b2ParticleGroup functions.
- ๐ Allowed particle systems to be culled from b2World::QueryAABB and
b2World::RayCast. - โ Added callbacks so an application can override b2Alloc() and b2Free()
without modifying the library. - โ Added valgrind support to unit-test runner on Linux / OSX.
- โ Added cygwin wrapper script for build.bat and build_android.bat on Windows.
- โ Added option to archive build artifacts from build scripts.
- ๐ Changed Android C++ runtime library to gnustl_static.