The SEDRIS Data Representation Model
APPENDIX A - Classes Texture Coordinate |
---|
An instance of this DRM class specifies an {s, t} tuple in image space (also known as texture space) used to specify the location of an individual texel within an image.
Each MIP level of a 2D <Image> instance defines an image that has a width and height specified in texels. Regardless of the actual size of the image, the image space is defined by treating the 2D image as a square, defined by the lower left coordinate of (0.0, 0.0) and the upper right coordinate of (1.0, 1.0). A <Texture Coordinate> instance is a coordinate within this image space.
A <Texture Coordinate> instance specifies an exact location within a given image space, and this location is mapped to the object space location associated with the <Vertex> instance, <Point> instance, or <Tack Point> instance of which the <Texture Coordinate> instance is a component. A textured geometric DRM object generally has a <Texture Coordinate> instance for each vertex of the object. The image is mapped to the DRM object by interpolating between the various texture coordinates specified at the vertices.
Whether a specified <Texture Coordinate> instance corresponds to exactly one texel in the texture definition or to a blending of many texel values from the definition is a decision made by the texture interpolation algorithm used to display the texture. The methods for calculating the interpolated texture values and for blending the texture onto the object are determined by an <Image Mapping Function> instance.
NOTE According to <<Image Mapping Functions and Texture Coordinates>>, <Texture Coordinate> instances only appear within the scope of some <Image Mapping Function> instance.
Consider a rectangular <Polygon> instance P representing the location of a logo on the side of an airplane. P has an <Image Mapping Function> component that describes how the logo represented by an <Image> instance is to be mapped. Each vertex of P has a <Texture Coordinate> component that specifies the position in the image that corresponds to that vertex.
Consider a complicated <Polygon> instance representing the continent of North America. A <Texture Coordinate> instance specifies a lower left corner of a satellite image that corresponds to the position on the <Polygon> instance specified by a <Tack Point> instance so that the satellite image is properly displayed on top of the polygon.
The interpretation of the s value of T depends on the value of the image_wrap_s field of the relevant <Image Mapping Function> instance.
If image_wrap_s specifies that the <Image> instance is to be clamped, any s values less than 0.0 are clamped to 0.0, and any s values greater than 1.0 are clamped to 1.0. That is, s values less than 0.0 are treated as though they had been 0.0, and those greater than 1.0 are treated as though they had been 1.0
If image_wrap_s specifies that the <Image> instance is to be repeated, any s values less than 0.0 or greater than 1.0 are treated as though the <Image> instance tiles the image space out to infinity.
In practical terms, during repeating, the integer portion of T is ignored, and copies of the texture map tile the surface.
Reference: [OPENGL] for more information on clamping and repeating textures.
The interpretation of the t value of T depends on the value of the image_wrap_t field of the relevant <Image Mapping Function> instance.
If image_wrap_t specifies that the <Image> instance is to be clamped, any t values less than 0.0 are clamped to 0.0, and any t values greater than 1.0 are clamped to 1.0. That is, t values less than 0.0 are treated as though they had been 0.0, and those greater than 1.0 are treated as though they had been 1.0
If image_wrap_t specifies that the <Image> instance is to be repeated, any t values less than 0.0 or greater than 1.0 are treated as though the <Image> instance tiles the image space out to infinity.
In practical terms, during repeating, the integer portion of T is ignored, and copies of the texture map tile the surface.
Reference: [OPENGL] for more information on clamping and repeating textures.
SE_Long_Float | s; | 1 |
---|---|---|
SE_Long_Float | t; | 2 |
The s field specifies the s value of the {s,t} texture coordinate. For a <Texture Coordinate> instance with a <Texture Coordinate Control Link> component X, where the s_expression_index field of X is non-zero, the value of the s field is obtained from X.
The t field specifies the t value of the {s,t} texture coordinate. For a <Texture Coordinate> instance with a <Texture Coordinate Control Link> component X, where the t_expression_index field of X is non-zero, the value of the t field is obtained from X.
|