227

Using texture coordinates
Texture translation example code

  • Create TextureAttributes
    TextureAttributes myTA = new TextureAttributes( );

  • Create a translation transform
    Transform3D myTrans = new Transform3D( );
    myTrans.set( new Vector3f( 0.25f, 0.0f, 0.0f ) );
    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 );