Michael got it right:  the 100% CPU utilization happens because Java3D is 
animating the scene with continuous updates.  Using a WakeOnElapsedFrame(0) 
makes Java3D continously update, since it expects the scene graph to change 
after each frame, so it wants to display the changes as soon as possible.

Doug Gehringer
Sun Microsystems

> From: "Michael Lorenz" <[EMAIL PROTECTED]>
>
> I think the 100% utilization occur because all of the behaviors (including
> the utility behaviors from sun) are using the WakeupOnElapsedFrame(0) wakeup
> criterion which calls the processStimulus() method every single frame.
>
> Vasilios Darlagiannis wrote:
> 
> > Hi everyone,
> >     I have tried all the examples about collision detection
> > that have been send in the mailing list, but all of them have
> > the same problem. They are making 100% utilization of the
> > processor and in some more abvance cases this becomes
> > a problem. Is it natural that the utilization is 100%?  Or
> > those examples are missing something?
> >     I tried to solve the problem by setEnable(b) where b is
> > true when the mouseBehavior detects a motion and false
> > otherwise, but it didn't work. Does anybody have another idea?
> >
> >     Cheers,
> >
> >     Vasilis
> >
> >
> > =====================================================================
> > To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> > Java 3D Home Page: http://java.sun.com/products/java-media/3D/
> >
> 
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 3D Home Page: http://java.sun.com/products/java-media/3D/

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to