Hi:
Okay, I feel like an idiot ... but I can't seem to get the
object to rotate about its center using the MouseRotate() class.
Note: my object is not centered at the origin but rather at
the Point3d location named centroid. What is wrong or missing
in the following code:
Transform3D to_center = new Transform3D();
to_center.setTranslation ( new Vector3d ( -centroid.x,
-centroid.y,
-centroid.z ) );
...
objectsTG = new TransformGroup ();
objectsTG.setCapability ( TransformGroup.ALLOW_TRANSFORM_WRITE );
objectsTG.setCapability ( TransformGroup.ALLOW_TRANSFORM_READ );
objectsTG.addChild ( jdendshape.getShapes() );
objectsTG.setTransform ( to_center );
objRoot.addChild ( objectsTG );
MouseRotate myMouseRotate = new MouseRotate ();
myMouseRotate.setTransformGroup ( objectsTG );
myMouseRotate.setSchedulingBounds ( boundingsphere );
objRoot.addChild ( myMouseRotate );
...
All help is appreciated!
Sincerely,
Mona
==================================================================
Mona Wong
National Center for Microscopy and Imaging Research
University of California, San Diego
http://ncmir.ucsd.edu/
"The truth shall set you free, but first it will piss you off"
A Landmark instructor
==================================================================
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".