Getting a ColorCube to rotate in z-axis/x-axis using RotationInterpolator

Hi, I've been trying to get a simple ColorCube to rotate in the z/y-axis, but to no avail. I've used a 4x4 matrix for rotation but it doesn't work. Do I have to use a Quaternion? Can anyone help?
[212 byte] By [asphodeli] at [2007-9-27 13:55:24]
# 1

I'm new to java3D but came across the same problem. I got around it by using a Transform3D object....

Alpha rotationAlpha = new Alpha(-1, 4000);

Transform3D axis = new Transform3D();

axis.rotZ(Math.PI*0.5f); // rotate the object through 90 degrees / 0.5 PI radians

RotationInterpolator rotator = new RotationInterpolator(rotationAlpha, TGSpin, axis,(float)0, (float)Math.PI*2.0f);

if you want to spin it the other way, just use Math.PI*1.5f instead.

..I'm not sure if this is the correct way to do it, but it does work.

whitehousem at 2007-7-5 21:44:35 > top of Java-index,Other Topics,Java Game Development...
# 2
try asking in the Java3D forum :/
Abuse at 2007-7-5 21:44:36 > top of Java-index,Other Topics,Java Game Development...