----- Original Message -----
Sent: Thursday, July 17, 2003 11:21
AM
Subject: [JAVA3D] Transformations
Hi,
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.