The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by inteplan]

...
I read a lot of examples about adding mouse behaviors (rotate,translate and
scale) on 3D model.

TranformGroup subtg = new TransformGroup()

subtg.setCapabilities(TranformGroup.ALLOW_TRANSFORM_WRITE);
subtg.addChild(new ColorCube(10.0));
MouseRotate mouseRot = new MouseRotate(subtg);

subtg.addChild(mouseRot);

DOESN'T WORK

because addChild on a transform group accept only BranchGroup !!!

This is very strange because the example given by sun in the header of the
class MouseRotate is exaclty what I was trying to do by using addChild...


Is a turn around exist?

Thanks.