Example usage for javax.media.j3d WakeupOnCollisionExit WakeupOnCollisionExit

List of usage examples for javax.media.j3d WakeupOnCollisionExit WakeupOnCollisionExit

Introduction

In this page you can find the example usage for javax.media.j3d WakeupOnCollisionExit WakeupOnCollisionExit.

Prototype

public WakeupOnCollisionExit(Bounds armingBounds) 

Source Link

Document

Constructs a new WakeupOnCollisionExit criterion.

Usage

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.
 */// w  w  w  .  j  ava  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  av a 2  s  .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);
}