diff src/com/aurellem/capture/examples/Advanced.java @ 52:d799a0278cc9

advanced documentation.
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Dec 2011 13:51:28 -0600
parents 8a091a5f48fa
children afc437f637bd
line wrap: on
line diff
     1.1 --- a/src/com/aurellem/capture/examples/Advanced.java	Sat Dec 03 13:42:30 2011 -0600
     1.2 +++ b/src/com/aurellem/capture/examples/Advanced.java	Sat Dec 03 13:51:28 2011 -0600
     1.3 @@ -51,18 +51,27 @@
     1.4   * that can each hear the world from their own perspective.  
     1.5   * 
     1.6   * @author Robert McIntyre
     1.7 - *
     1.8   */
     1.9  
    1.10  public class Advanced extends SimpleApplication {
    1.11  
    1.12 -	private Geometry bell;
    1.13 -	private Geometry ear1;
    1.14 -	private Geometry ear2;
    1.15 -	private Geometry ear3;
    1.16 -	private AudioNode music;
    1.17 -	private MotionTrack motionControl;
    1.18 -		
    1.19 +	/**
    1.20 +	 * You will see three grey cubes, a blue sphere, and a path
    1.21 +	 * which circles each cube.  The blue sphere is generating a
    1.22 +	 * constant monotone sound as it moves along the track.  Each
    1.23 +	 * cube is listening for sound; when a cube hears sound whose
    1.24 +	 * intensity is greater than a certain threshold, it changes
    1.25 +	 * its color from grey to green.
    1.26 +	 * 
    1.27 +	 *  Each cube is also saving whatever it hears to a file.  The
    1.28 +	 *  scene from the perspective of the viewer is also saved to
    1.29 +	 *  a video file.  When you listen to each of the sound files
    1.30 +	 *  alongside the video, the sound will get louder when the
    1.31 +	 *  sphere approaches the cube that generated that sound file.
    1.32 +	 *  This shows that each listener is hearing the world from
    1.33 +	 *  its own perspective.
    1.34 +	 * 
    1.35 +	 */
    1.36  	public static void main(String[] args) {
    1.37  		Advanced app = new Advanced();
    1.38  		AppSettings settings = new AppSettings(true);
    1.39 @@ -81,6 +90,14 @@
    1.40  		app.start();
    1.41  	}
    1.42  
    1.43 +	
    1.44 +	private Geometry bell;
    1.45 +	private Geometry ear1;
    1.46 +	private Geometry ear2;
    1.47 +	private Geometry ear3;
    1.48 +	private AudioNode music;
    1.49 +	private MotionTrack motionControl;
    1.50 +		
    1.51  	private Geometry makeEar(Node root, Vector3f position){
    1.52  		Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    1.53  		Geometry ear = new Geometry("ear", new Box(1.0f, 1.0f, 1.0f));