Hi,
 
You can use AxisAngle4f (or AxisAngle4d) to construct a rotation about an arbitrary axis. e.g. to get a rotation of 45 degrees about the axis (1,1,0) you could use the following:
 
float myAngle = Math.PI / 4;
Vector3f myAxis = new Vector3f(1, 1, 0);
 
AxisAngle4f rotation = new AxisAngle4f(myAxis, myAngle);
 
Transform3D rotTransform = new Transform3D();
rotTransform.set(rotation);
 
Hope this helps,
Ewan
 
 
----- Original Message -----
From: bh ahn
Sent: Saturday, April 06, 2002 5:10 AM
Subject: [JAVA3D] How to chage rotational axis using rotX, rotY, rotX..

hi all
 
I tried to rotate object using rotX, rotY, rotZ in Transform3D class.
 
But, the axis of rotation is fixed, so I can't rotate arbitrary axis.
 
How to chage rotational axis?
 
Please , advise for me.
 
thanks
 
bh

Reply via email to