com.sun.opengl.util.texture

Class TextureCoords


public class TextureCoords
extends Object

Specifies texture coordinates for a rectangular area of a texture. Note that some textures are inherently flipped vertically from OpenGL's standard coordinate system. This class takes care of this vertical flip so that the "bottom" and "top" coordinates may sometimes be reversed. From the point of view of code rendering textured polygons, it can always map the bottom and left texture coordinates from the TextureCoords to the lower left point of the textured polygon and achieve correct results.

Constructor Summary

TextureCoords(float left, float bottom, float right, float top)

Method Summary

float
bottom()
Returns the bottommost (y) texture coordinate of this rectangle.
float
left()
Returns the leftmost (x) texture coordinate of this rectangle.
float
right()
Returns the rightmost (x) texture coordinate of this rectangle.
float
top()
Returns the topmost (y) texture coordinate of this rectangle.

Constructor Details

TextureCoords

public TextureCoords(float left,
                     float bottom,
                     float right,
                     float top)

Method Details

bottom

public float bottom()
Returns the bottommost (y) texture coordinate of this rectangle.

left

public float left()
Returns the leftmost (x) texture coordinate of this rectangle.

right

public float right()
Returns the rightmost (x) texture coordinate of this rectangle.

top

public float top()
Returns the topmost (y) texture coordinate of this rectangle.

Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.