[ Contact ] [ Links ] [ Previous : 27 / 28 : Transforming Vectors and Points ] [ Up ] [ Next : 10 / 15 : From 6 to 7 ]

TransformGroup Example Code


Shape3D shape = new Shape3D( geom, app );
. . .
Transform3D transLeft = new Transform3D( );
transLeft.set( new Vector3d( -1.0, 0.0, 0.0 ) );
. . .
TransformGroup group = new TransformGroup( );
group.setTransform( transLeft );
group.addChild( shape );

 

rotateAngle = Math.PI/10.0;
rotateXPlus = new Transform3D();
rotateXPlus.rotX(rotateAngle);

tmpT = new Transform3D(rotateXPlus);
viewTransform.mul(tmp, viewTransform)
System.out.println("Rotation Plus X ");
System.out.println(viewTransform);
viewTransformGroup.setTransform(viewTransform);


See the "Links" link above to find out the sources of the proposed informations
Pascal Vuylsteker / eScience / Computer Science / ANU
Last modified: 20/4/2004
TOC - Print
Send your comments at :
<Hugh.Fisher@anu.edu.au>