> How would one create a cube with a repeated
> wallpaper paper texture on it? I though it'd be as simple
> as (the following VRML fragment):
>
> Texture2 { filename "wallpaper.gif" }
> Cube { }
The texture coordinates at the vertices of a cube range from 0.0 to 1.0
(e.g. lower-left-front vertex of front-face has tex coords (0,0),
upper-right-front vertex of front face has tex coords (1,1)).
Texture2Transform can be used to scale these texture coordinate. You'll
only get repeated textures if the texture coordinate are greater than 1
(or less than zero). So:
Texture2 { filename "wallpaper.gif" }
Texture2Transform { scaleFactor 3 3 }
Cube { }
should give you these by these (9) copies of wallpaper across each face of
the cube.
That's equivalent to giving texture coordinates of (0,0) to (3,3) over a
cube-shaped IndexedFaceSet.
-- --gavin ([email protected], (415)933-1024) My home page:http://reality.sgi.com/employees/gavin_engr/ Inventor Info:http://www.sgi.com/Technology/Inventor.html WebSpace Info:http://www.sgi.com/Products/WebFORCE/WebSpace