Work so good it should be in the demos (HelloUniverse, SphereMotion, etc...)
u = new SimpleUniverse(c);
...
View view= (u.getViewer()).getView();
view.setMinimumFrameCycleTime(10);
// max FPS is 1000/10 = 100 FPS
Alessandro Borges
----- Original Message -----
From: "Kelvin Chung" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 16, 2002 4:24 PM
Subject: Re: [JAVA3D] Reopen bug 4774349
> Nikolai V. Chr. wrote:
>
> > Somebody please help me convince the Java3D team that 4774349 IS a bug.
> > You can go read the comment below the bug I just wrote.
> >
> > There is no workaround. (except accept the native interpolators are
> > useless and make complete new library ourselves)
> >
> > This bug is often the bottleneck in our application.
> >
> > I feel its a very important bug.
> >
> > Please help me convince them...and please go vote for it also.
> >
> > Regards
> > Nikolai
>
> This is expected since
>
> RotationInterpolator use
>
> /**
> * Constructs a WakeupOnElapsedFrames criterion.
> *
> * @param frameCount the number of frames that Java 3D should draw
> * before awakening this behavior object; a value of N means
> * wakeup at the end of frame N, where the current frame is zero,
> * a value of zero means wakeup at the end of the current frame.
> *
> * @param passive flag indicating whether this behavior is
> * passive; a non-passive behavior will cause the rendering system
> * to run continuously, while a passive behavior will only run
> * when some other event causes a frame to be run.
> *
> * @exception IllegalArgumentException if frameCount is less than zero
> *
> * @since Java 3D 1.2
> */
> public WakeupOnElapsedFrames(int frameCount, boolean passive)
> with passive = false
>
> This is default behavior.
> To avoid 100% cpu usage use wakeupOnElapsedFrame with passive = true.
>
> Another way is to set the maximum frame rate by using
>
> View
>
> /**
> * Sets the minimum frame cycle time, in milliseconds, for this
> * view. The Java 3D renderer will ensure that the time between
> * the start of each successive frame is at least the specified
> * number of milliseconds. The default value is 0.
> *
> * @param minimumTime the minimum number of milliseconds between
> * successive frames
> *
> * @exception IllegalArgumentException if <code>minimumTime < 0</code>
> *
> * @see #getFrameStartTimes
> *
> * @since Java 3D 1.2
> */
> public void setMinimumFrameCycleTime(long minimumTime)
>
>
> - Kelvin
> ----------------
> Java 3D Team
> Sun Microsystems Inc.
>
>
===========================================================================
> 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".
_______________________________________________________________________
Busca Yahoo!
O melhor lugar para encontrar tudo o que voc� procura na Internet
http://br.busca.yahoo.com/
===========================================================================
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".