How do I scale a Shape3D loaded from an ASE?

Hi,

I’m new to Xith. I’m just trying to scale an object loaded from an ASE file. How do I do this?

My current (not working) code:

// load code
AseObjects objects = new AseObjects(“data/scene/tireAndRim.ASE”);
TransformGroup tg_rim = new TransformGroup();
Shape3D wheelShape = (Shape3D) aseObjects.getObject(“Rim”);
tg_rim.addChild(wheelShape);

// scale code
Transform3D trans = tg_rim.getTransform();
trans.setScale(0.5f);
tg_rim.setTransform(trans);

Cheers,
James

Hmm … how does it not work? Does it throw a NullpointerException, or does it simply not scale?

I think you should use for your scale code this:


 // scale code
Transform3D trans = new Transform3D(); //tg_rim.getTransform() may return null
trans.setScale(0.5f);
tg_rim.setTransform(trans); 

Arne