Hi,

I wish to limit the a rotation around the X axis to a maximum of 90 degrees (absolute 
value, can be +'ve or -'ve 90). The
following code is what I am using to do the rotation based on input from the 
navigation system:

    t3d = new Transform3D();
    if(direction == NEGATIVE) {
      t3d.rotX(-baseRate);
    } else {
      t3d.rotX(baseRate);
    }
    target.getTransform(targetsTransform);
    targetsTransform.mul(t3d);

    //I now want to check if the rotation is greater than 90 degrees (absolute) and
    //if it is then set it to 90 degrees

    target.setTransform(targetsTransform);

As stated in the comments, I need to check wether the resulting roation is greater 
than 90 d in the x-axis. If it is then I want
to set the rotation to 90d.

What is the best way of doing this?

Cheers,

Brad


----------------------------------------------------------------------------
This Email may contain confidential and/or privileged information and is
intended solely for the addressee(s) named. If you have received this
information in error, or are advised that you have been posted this Email by
accident, please notify the sender by return Email, do not redistribute it,
delete the Email and keep no copies.
----------------------------------------------------------------------------

===========================================================================
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