A behavior for calculating an agent's acceleration from a force acting on it. It can limit the resulting acceleration by clamping its linear and angular components.
The AccelerationBehavior has been explained as part of the Hello World 1: Moving Agents code example.
mass (1-dim)
velocity (n-dim)
force (n-dim)
acceleration (n-dim)
BEHAVIOR_NAME_maxLinearAcceleration (n-dim) default = 0.5
BEHAVIOR_NAME_maxAngularAcceleration (n-dim) default = 0.5
BEHAVIOR_NAME_active (1-dim) default = 1.0
swarm.addBehavior( "accel", AccelerationBehavior( "mass velocity force", "acceleration") ); swarm.set("accel_maxAngularAcceleration", math::Vector<float>( 3, 0.1, 0.1, 0.1 ) ); swarm.set("accel_maxAngularAcceleration", math::Vector<float>( 3, 1.0, 1.0, 1.0 ) );