Do you mean ; transform.setScale( scalingFactor ) and worldTrans.setTransform(transform) and then transform.rotX(RotA); worldTrans.setTransform(transform) sceneRoot.addChild(worldTrans)?
If it is so, I think I have tried alternate ways of it. But you are right at I am losing the scaling. But couldn't manage to shrink the model to fit in the window while making transformations on it.
Alessandro Borges <[EMAIL PROTECTED]> wrote:
Maybe I am telling you a stupid thing, but I thing you are losing the scaling.You have :Bg(root) -> TG (scale & Rotating) -> scene.tryBg(root) -> TG(scale) - TG(rotate) -> sceneAlessandro----- Original Message -----From: ahmet balciSent: Thursday, July 17, 2003 11:21 AMSubject: [JAVA3D] TransformationsHi,
I had been making transformations within a 3DS model.
I can display the model at the canter of the window easily.
But when I try to make transformation (rotation or translation)
model becomes very huge that I can only see a part of it at the window.
Here is the code I use;
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Transform3D transform = new Transform3D();
transform.setScale( scalingFactor );
transform.setTranslation( new Vector3f( 0,0,1));
TransformGroup worldTrans = new TransformGroup(transform);
worldTrans.setCapability(worldTrans.ALLOW_TRANSFORM_READ);
worldTrans.setCapability(worldTrans.ALLOW_TRANSFORM_WRITE);
worldTrans.setCapability(worldTrans.ENABLE_PICK_REPORTING);
sceneRoot.addChild(worldTrans);
Alpha rotA=new Alpha();
RotationInterpolator rotator=new RotationInterpolator(rotA,worldTrans,transform,0,1);
BoundingSphere b=new BoundingSphere();
rotator.setSchedulingBounds(b);/* Same thing occurs when I use rotX() or rotY() instead of RotationInterpolator
I mean model becomes very huge
*/worldTrans.addChild(rotator);/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Could someone tell me why the sizes of the model that I defined changes
when I try to make transformations? Is there anything that I should do
to preserve to predefined size of the model while I make transformations?Thanks for your help in advance............................
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.