Try getting the view using:
SimpleUniverse universe;
View universe.getViewer().getView();
The docs for SimpleUniverse are available at the download page:
http://java.sun.com/products/java-media/3D/download.html
click on the "ZIP file for Windows" or "Compressed TAR file (for
UNIX)" link under the "Download the Java 3D 1.1.2 Implementation
Documentation" section.
Doug
> From: "Casteel, Don" <[EMAIL PROTECTED]>
>
> I've tried this, and only get zero values. Also I get an array out of bounds
> exception from the
> long[] startTimes = new long[10];
> view.getFrameStartTimes(startTimes);
> part of the code. I've commented out this part of the code for now.
>
> I've created a new View object, and added to it the Canvas3D that I'm adding
> to my SimpleUniverse, thinking this is the correct way to implement it. But
> I'm not seeing any values.
>
> I also looked through the api to see if I could do a getView from
> SimpleUniverse...... the api doesn't even address the SimpleUniverse object.
> Why isn't it included?
>
>
> > -----Original Message-----
> > From: Doug Gehringer [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 11, 1999 4:19 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [JAVA3D] FrameRate ?
> >
> > > From: "Casteel, Don" <[EMAIL PROTECTED]>
> > >
> > > I can't seem to find a method anywhere for getting the current frame
> > rate.
> > > Any Clues?
> >
> > There are some methods on the View:
> >
> > getFrameNumber();
> > getLastFrameDuration()
> > getFrameStartTimes()
> >
> > You can use these like this:
> >
> > long[] startTimes = new long[10];
> > view.getFrameStartTimes(startTimes);
> > long lastFrameDuration = view.getLastFrameDuration();
> > long numFrames = view.getFrameNumber();
> >
> > if (numFrames > 10) numFrames = 10;
> > double elapsed = (now - startTimes[numFrames-1]) / 1000.0;
> > System.out.println("Last " + numFrames + " frames rendered in " +
> > elapsed + " seconds, " +
> > (numFrames / elapsed) + " frames/sec");
> > System.out.println("Last frame rendered in " +
> > (lastFrameDuration / 1000.0) + " seconds ");
> >
> >
> > Doug Gehringer
> > Sun Microsystems
> >
> > ==========================================================================
> > =
> > 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".
===========================================================================
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".