com.jmex.physics.callback
Class FrictionCallback

java.lang.Object
  extended by com.jmex.physics.callback.FrictionCallback
All Implemented Interfaces:
PhysicsUpdateCallback

public class FrictionCallback
extends java.lang.Object
implements PhysicsUpdateCallback

FrictionCallback provides features to apply friction per step for a DynamicPhysicsNode. This class is thread-safe.

Author:
Matthew D. Hicks

Constructor Summary
FrictionCallback()
           
 
Method Summary
 boolean add(DynamicPhysicsNode node, float forceFriction, float angularFriction)
           
 void afterStep(PhysicsSpace space, float time)
          Define logic that you want to be executed after the PhysicsSpace does it's calculations.
 void beforeStep(PhysicsSpace space, float time)
          Define logic that you want to be executed before the PhysicsSpace does it's calculations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrictionCallback

public FrictionCallback()
Method Detail

add

public boolean add(DynamicPhysicsNode node,
                   float forceFriction,
                   float angularFriction)

afterStep

public void afterStep(PhysicsSpace space,
                      float time)
Description copied from interface: PhysicsUpdateCallback
Define logic that you want to be executed after the PhysicsSpace does it's calculations.

Specified by:
afterStep in interface PhysicsUpdateCallback
Parameters:
space - space that stepps
time - amount of time the step simulated

beforeStep

public void beforeStep(PhysicsSpace space,
                       float time)
Description copied from interface: PhysicsUpdateCallback
Define logic that you want to be executed before the PhysicsSpace does it's calculations.

Specified by:
beforeStep in interface PhysicsUpdateCallback
Parameters:
space - space that stepps
time - amount of time the step simulates