Top Description Fields Constructors Methods
com.jogamp.opengl.util.texture

public Class TextureCoords

extends Object
Class Inheritance

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.

Field Summary

Modifier and TypeField and Description
private final float
private final float
private final float
private final float

Constructor Summary

AccessConstructor and Description
public
TextureCoords(final float left, final float bottom, final float right, final float top)

Method Summary

Modifier and TypeMethod and Description
public float
bottom()

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

public float[]
getST_LB_RB_LT_RT(final float[] d, final int d_off, final float ss, final float ts)

Transfers {s * ss, t * ts} from this object into the given float[8+d_off] in the following order:

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

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

public float
right()

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

public float
top()

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

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bottomback to summary
private final float bottom
leftback to summary
private final float left
topback to summary
private final float top

Constructor Detail

TextureCoordsback to summary
public TextureCoords(final float left, final float bottom, final float right, final float top)

Method Detail

bottomback to summary
public float bottom()

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

getST_LB_RB_LT_RTback to summary
public float[] getST_LB_RB_LT_RT(final float[] d, final int d_off, final float ss, final float ts)

Transfers {s * ss, t * ts} from this object into the given float[8+d_off] in the following order:

  left,  bottom
  right, bottom
  left,  top
  right  top
leftback to summary
public float left()

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

rightback to summary
public float right()

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

topback to summary
public float top()

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

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override