List of usage examples for javax.media.j3d WakeupOnCollisionEntry WakeupOnCollisionEntry
public WakeupOnCollisionEntry(Bounds armingBounds)
From source file:TickTockCollision.java
public void initialize() { wEnter = new WakeupOnCollisionEntry(shape); wExit = new WakeupOnCollisionExit(shape); wakeupOn(wEnter); }
From source file:SimpleCollision.java
/** * This creates an entry, exit and movement collision criteria. These are * then OR'ed together, and the wake up condition set to the result. *//* ww w .j av a 2 s. co m*/ public void initialize() { theCriteria = new WakeupCriterion[3]; theCriteria[0] = new WakeupOnCollisionEntry(collidingShape); theCriteria[1] = new WakeupOnCollisionExit(collidingShape); theCriteria[2] = new WakeupOnCollisionMovement(collidingShape); oredCriteria = new WakeupOr(theCriteria); wakeupOn(oredCriteria); }
From source file:SimpleCollision2.java
/** * This sets up the criteria for triggering the behaviour. It creates an * entry, exit and movement trigger, OR's these together and then sets the * OR'ed criterion as the wake up condition. */// w w w . j a v a 2s.c o m public void initialize() { theCriteria = new WakeupCriterion[3]; WakeupOnCollisionEntry startsCollision = new WakeupOnCollisionEntry(collidingShape); WakeupOnCollisionExit endsCollision = new WakeupOnCollisionExit(collidingShape); WakeupOnCollisionMovement moveCollision = new WakeupOnCollisionMovement(collidingShape); theCriteria[0] = startsCollision; theCriteria[1] = endsCollision; theCriteria[2] = moveCollision; oredCriteria = new WakeupOr(theCriteria); wakeupOn(oredCriteria); }
From source file:SimpleGame.java
/** * This sets up the criteria for triggering the behaviour. It creates an * collision crtiterion and a time elapsed criterion, OR's these together * and then sets the OR'ed criterion as the wake up condition. *//* www . j av a 2 s. c o m*/ public void initialize() { theCriteria = new WakeupCriterion[2]; theCriteria[0] = new WakeupOnCollisionEntry(collidingShape); theCriteria[1] = new WakeupOnElapsedTime(1); oredCriteria = new WakeupOr(theCriteria); wakeupOn(oredCriteria); }