sdr 0.7

net.cscott.sdr
Class DanceFloor

java.lang.Object
  extended by net.cscott.sdr.DanceFloor

public class DanceFloor
extends Object

The DanceFloor path contains the current computed locations for all dancers; it is synchronized so that it can be asynchronously queried and updated from various threads.

Author:
C. Scott Ananian

Constructor Summary
DanceFloor()
           
 
Method Summary
 void addPath(Dancer d, DancerBezierPath dbp)
          Add a path for the given dancer.
 void clearPaths(Dancer d)
          Remove the given dancer from the floor.
 DancerBezierPath location(Dancer d, Fraction beatTime)
          Current (interpolated) path for the given dancer.
 void notifyBeat(Fraction beat)
          Notify the choreography engine that the given beat is now occurring.
 Fraction waitForBeat(Fraction beat)
          Block waiting until notifyBeat() is called with a beat greater than or equal to that specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DanceFloor

public DanceFloor()
Method Detail

location

public DancerBezierPath location(Dancer d,
                                 Fraction beatTime)
Current (interpolated) path for the given dancer. Will return null if the dancer is not currently on the floor.


addPath

public void addPath(Dancer d,
                    DancerBezierPath dbp)
Add a path for the given dancer.


clearPaths

public void clearPaths(Dancer d)
Remove the given dancer from the floor.


notifyBeat

public void notifyBeat(Fraction beat)
Notify the choreography engine that the given beat is now occurring. Thread-safe.


waitForBeat

public Fraction waitForBeat(Fraction beat)
Block waiting until notifyBeat() is called with a beat greater than or equal to that specified. Thread-safe.


sdr 0.7

Copyright © 2006-2009 C. Scott Ananian