Hi,

has anybody ever tested a universe with sound and more than one Canvas3D?

I created an own Universe class which allowes it to display the same scene
from different viewing points. That works well untill I add some
Sound-Nodes to the scene. When they should start playing sounds, the
J3D-Thread crashes with a NullPointerException. Actually I'm not sure if
this is a bug in J3D or if there is something wrong in my method to create
this special universe:

Within the constructor I create an array for the Viewers

public MultiUniverse(int numTransforms)
   {
   viewer = new Viewer[numTransforms];
   locale=new Locale(this);
   }

Afterwards the following method is called several times which attaches a
Canvas3D and a View to this universe:

public View createView(Canvas3D canvas)
   {
   ViewingPlatform vwp=new ViewingPlatform();
   viewer[canvasCnt]=new Viewer(canvas);
   viewer[canvasCnt].setViewingPlatform(vwp);
   locale.addBranchGraph(vwp);
   canvasCnt++;
   return viewer[canvasCnt-1].getView();
   }

This is more or less identically to the SimpleUniverse because audio is
initialized using getViewer(n).createAudioDevice().

The full source code can be found at
http://www.3dchat.org/MultiUniverse.java

Michael

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to