Allan Bredahl wrote:
> HI all
>
> I'm construction a simple behavior to move and rotate an object.
>
> My problem is that I want to both rotate and translate a TransformGroup.
>
> How is it possible to make one Transform3D do both rotation and translation,
> or is it possible to add more than one Transform3D to a TransformGroup
>
> thanks in advance
>
> Allan Bredahl
>
> ===========================================================================
> 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".
Hi Allan,
you can do the both (translation and rotation) in one Transform3D with this
method :
public Transform3D(Matrix3f m1,
Vector3f t1,
float s)
Constructs and initializes a transform from the rotation matrix,
translation, and scale values. The scale is applied only to the rotational
components of the
matrix (upper 3x3) and not to the translational components of the matrix.
Parameters:
m1 - the rotation matrix representing the rotational component
t1 - the translational component of the matrix
s - the scale value applied to the rotational components
The scale could probably be set to 1 in your case.
Regards
Cédric Brunner
===========================================================================
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".