Main Page   Modules   Class Hierarchy   Compound List   Compound Members  

GAUGE3D::GSurface::SurfaceMap Struct Reference

Describes a map of one or two aspects of a surface. More...

#include </gauge3d/graphics/surface.h>

List of all members.

Public Attributes

pGImage mImage
 The image to use for this map.

tMapType mRGBType
 How to interpret the RGB (or grayscale) channel(s) of the image.

tMapType mAlphaType
 How to interpret the alpha channel of the image.

GCoordinate mOffset [2]
 Offset to apply to texture coordinates.

GCoordinate mScale [2]
 Scale to apply to texture coordinates.

GCoordinate mAngle
 Angle by which to rotate texture coordinates. (radians).

GCoordinate mThresholdNear [2]
 The distance at which to start showing this map. (see above).

GCoordinate mThresholdFar [2]
 The distance at which to stop showing this map. (see above).


Detailed Description

Describes a map of one or two aspects of a surface.

Each surface map can map two aspects of a surface. For example, an often-used surface map is one which maps colors and opacity values across the surface (this is your typical RGBA texture). Other ideas for surface maps include:

Each SurfaceMap in a GSurface is referenced by the same texture coordinates, but the texture coordinates are transformed differently for each map. This allows you to apply maps offset from each other to prevent ugly patters from being visible. The incoming texture coordinates are first rotated by mAngle, then scaled by mScale, then offset by mOffset.

The more surface maps you have, the more rendering passes will be used to render the polygons that use this map.

mThresholdNear and mThresholdFar allow you to control level-of-detail. If the object to which this surface is being applied is further away than mThresholdFar[1] or closer than mThresholdNear[0], the map will not be used. If the object is between mThresholdNear[1] and mThresholdFar[0], the map will be applied as normal. In the area between mThresholdNear[0] and mThresholdNear[1], and in the area between mThresholdFar[0] and mThresholdFar[1], the map will be smoothly blended in and out to eliminate popup. (Note that some renderers may not do anything about popup, or may use other methods to avoid it.)


The documentation for this struct was generated from the following file:
Generated at Tue Jan 30 17:07:34 2001 for gauge3d by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000