Package com.jogamp.opengl.util.texture
Class TextureCoords
java.lang.Object
com.jogamp.opengl.util.texture.TextureCoords
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
bottom()
Returns the bottommost (y) texture coordinate of this rectangle.float[]
getST_LB_RB_LT_RT
(float[] d, int d_off, float ss, float ts) Transfers{s * ss, t * ts}
from this object into the givenfloat[8+d_off]
in the following order: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.toString()
-
Constructor Details
-
TextureCoords
public TextureCoords(float left, float bottom, float right, float top)
-
-
Method Details
-
getST_LB_RB_LT_RT
public float[] getST_LB_RB_LT_RT(float[] d, int d_off, float ss, float ts) Transfers{s * ss, t * ts}
from this object into the givenfloat[8+d_off]
in the following order:left, bottom right, bottom left, top right top
-
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. -
bottom
public float bottom()Returns the bottommost (y) texture coordinate of this rectangle. -
top
public float top()Returns the topmost (y) texture coordinate of this rectangle. -
toString
-