[ Contact ] [ Links ] [ Previous : 14 / 25 : Transforming texture coordinates ] [ Up ] [ Next : 16 / 25 : Texture Generation Format ]

Texture rotation example code

Create TextureAttributes

TextureAttributes myTA = new TextureAttributes( );

Create a rotation transform (Z sticks out of the ST plane)

Transform3D myTrans = new Transform3D( );
myTrans.rotZ( Math.PI/4.0 ); // 45 degrees
myTA.setTextureTransform( myTrans );

Set the texture attributes on an Appearance

Appearance myAppear = new Appearance( );
myAppear.setTextureAttributes( myTA );

Assemble the shape

Shape3D myShape = new Shape3D( myText, myAppear );

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>