rotate immediately

Started by Thomas., October 06, 2012, 09:33:13 PM

Previous topic - Next topic

Thomas.

I'm using desktop jPCT for serializing objects. 3Ds Max and jPCT use different coordination system, so I have to rotate object every time when I change something. I want to rotate all objects in desktop application but java doc say that I have to render scene to apply rotation. Could you please add method for rotate object immediately?

EgonOlsen


Thomas.

This method did not do anything...

private void rotateObjects(Object3D[] objects) {
Object3D dummy = Object3D.createDummyObj();
for (Object3D object : objects)
dummy.addChild(object);
dummy.rotateX((float) (-Math.PI / 2));
dummy.rotateZ((float) Math.PI);
for (Object3D object : objects)
object.rotateMesh();
}

EgonOlsen

It does. It just doesn't take the rotations of parent objects into account. Just apply the rotations directly to object instead.