R. Carassou wrote:

Hi all

I have to Behavior attach to my Universe with
apparently the same wakeUp Condition
a OrbitBehavior and a other behavior (see the code
below)
sometime a Exception is throwed, and I it's difficult
to clearly define the bug context.
is it a Behavior scheduling problem ?a OrbitBehavior
bug? or i' m doing something wrong in my own behavior?

thanks in advance for yours advices
Regards

renaud

Exception occurred during Behavior execution:
javax.media.j3d.BadTransformException: non-congruent
transform above ViewPlatform
       at
javax.media.j3d.TransformGroupRetained.setTransform(TransformGroupRetained.java:138)
       at
javax.media.j3d.TransformGroup.setTransform(TransformGroup.java:111)
       at
prm3d.behavior.OrbitBehavior.integrateTransforms(OrbitBehavior.java:482)
       at
prm3d.behavior.ViewPlatformAWTBehavior.processStimulus(ViewPlatformAWTBehavior.java:249)
       at
javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
       at
javax.media.j3d.J3dThread.run(J3dThread.java:250)



The OrbitBehavior in your own prm3d package pass non-congruent transform
to J3D.
This is most likely cause by numerically imprecision that when matrix
rotate/scale/invert
operation accumulate for a while the matrix become non-congruent.

To workaround catch this Exception (or check for it use Transform3D
getType()
before setTransform() above ViewPlatform) and reset/renormalize the
Transform3D
using Transform3D

   /**
    * Normalizes the rotational components (upper 3x3) of this matrix
    * in place using a Singular Value Decomposition (SVD).
    * This operation ensures that the column vectors of this matrix
    * are orthogonal to each other.  The primary use of this method
    * is to correct for floating point errors that accumulate over
    * time when concatenating a large number of rotation matrices.
    * Note that the scale of the matrix is not altered by this method.
    */
   public final void normalize()


- 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".

Reply via email to