At 11:32 24/08/99 +0400, you wrote:
>And now another problem i ran into after resolving that one. Currently i
>program a kind of simulator and when i added Behavior class to my
>program from time to time i receive the following Exception during
>runtime:
>
>javax.vecmath.SingularMatrixException: cannot invert matrix
> at javax.media.j3d.Transform3D.invertGeneral(Transform3D.java:2818)
> at javax.media.j3d.Transform3D.invert(Transform3D.java:2636)
> at
>javax.media.j3d.CanvasViewCache.computeFrustumPlanes(CanvasViewCache.java:1
210)
> at
>javax.media.j3d.CanvasViewCache.computeView(CanvasViewCache.java:952)
> at
>javax.media.j3d.CanvasViewCache.computeDerivedData(CanvasViewCache.java:261)
> at javax.media.j3d.Canvas3D.updateViewCache(Canvas3D.java:1048)
> at javax.media.j3d.Renderer.run(Renderer.java:253)
>
>It is thrown out only when i gradually move in some direction for a long
>time. Much more often it is thrown out in OpenGL version. And once or
>twice only in DirectX implementation. I hadn't had it prior to using
>Collision Detector and it's almost for sure that event queue is being
>overfilled, since it can be easily seen that motion is not smooth in
>OpenGL implementation and VM just doesn't have enough time to render the
>view.
>
>How this could be helped? Can i somehow control event queue and delete
>events if there are already too many of them there?
>
But why a singular matrix? It seems odd that an event queue could stop
matrix handling.
If you move in one direction for a long time, do you still need the
collision detection working? If not, you could reduce the scheduling
bounds so that it becomes inoperative. I don't think that disabling the
behaviour would work, that just seems to pile up events for later.
One trick I pulled was to generate behaviour only if some flag in the
collision detector was set true. When false, the behaviour node was
called, but simply exited after resetting the wakeup conditions. This gave
fast processing when I didn't want/ need the results.
Tony
===========================================================================
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".