DIRECTORY Atom USING [PropList], ScanConvert USING [Spot], ThreeDScenes USING [Context, ShapeInstance], Vector2 USING [VEC], Rope USING [ROPE]; TextureMaps: CEDAR DEFINITIONS ~ BEGIN TextureMapsError: SIGNAL [reason: ATOM]; Pair: TYPE ~ Vector2.VEC; -- [ x, y: REAL]; TextureMap: TYPE ~ RECORD[type: ATOM, pixels: REF ANY, props: Atom.PropList]; IntSequence: TYPE ~ RECORD[SEQUENCE length: NAT OF INT]; ScanSequence: TYPE ~ RECORD[SEQUENCE length: NAT OF REF IntSequence]; SummedTexture: TYPE ~ RECORD[SEQUENCE length: NAT OF REF ScanSequence]; MakeTxtrCoordsFromVtxNos: PROC[ shape: REF ThreeDScenes.ShapeInstance, vtcesInRow, numberOfRows: NAT, row0col0, rowNcol0, rowNcolM, row0ColM: Pair ]; MakeTxtrCoordsFromNormals: PROC[ shape: REF ThreeDScenes.ShapeInstance, botLeft: Pair _ [0.0, 0.0], topLeft: Pair _ [0.0, 1.0], topRight: Pair _ [1.0, 1.0], botRight: Pair _ [1.0, 0.0], sw: Pair _ [180.0, -90.0], nw: Pair _ [180.0, 90.0], ne: Pair _ [-180.0, 90.0], se: Pair _ [-180.0, -90.0] ]; TextureFromAIS: PROC[context: REF ThreeDScenes.Context, fileName: Rope.ROPE, type: ATOM _ $Intensity] RETURNS[texture: REF TextureMap]; SetTexture: PROC[shape: REF ThreeDScenes.ShapeInstance, texture: REF TextureMap]; SumTexture: PROC[shape: REF ThreeDScenes.ShapeInstance]; GetTxtrAt: PROC[smpl: ScanConvert.Spot] RETURNS[ScanConvert.Spot]; END. BTextureMaps.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Last Edited by: Crow, May 24, 1986 12:31:49 pm PDT Basic Types type: NIL, $Bump - intensity map, $Color - full color map. Summed-Area Texture storage Procedures for Computing Texture Coordinates For objects which are rectangular polygon grids pulled into a surface shape, eg. surfaces of revolution, this maps a texture onto the rectangular grid. This takes the surface normals and maps from spherical coordinates into a rectangular texture. botLeft, topLeft, etc. allow mapping multiple, or skewed, instances of the texture onto the rectangle. longMin, longMax, etc. allow the area affected to be limited to a certain range of sperical coordinates. Procedures for Reading and Preparing Texture Files Procedures for Evaluating Texture at a Spot Κ.˜Iheadšœ™šœ Οmœ1™