JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.texture.TextureCoords Class Reference

Specifies texture coordinates for a rectangular area of a texture. More...

Collaboration diagram for com.jogamp.opengl.util.texture.TextureCoords:

Public Member Functions

 TextureCoords (final float left, final float bottom, final float right, final float top)
 
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: More...
 
float left ()
 Returns the leftmost (x) texture coordinate of this rectangle. More...
 
float right ()
 Returns the rightmost (x) texture coordinate of this rectangle. More...
 
float bottom ()
 Returns the bottommost (y) texture coordinate of this rectangle. More...
 
float top ()
 Returns the topmost (y) texture coordinate of this rectangle. More...
 
String toString ()
 

Detailed Description

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.

Definition at line 49 of file TextureCoords.java.

Constructor & Destructor Documentation

◆ TextureCoords()

com.jogamp.opengl.util.texture.TextureCoords.TextureCoords ( final float  left,
final float  bottom,
final float  right,
final float  top 
)

Definition at line 57 of file TextureCoords.java.

Member Function Documentation

◆ bottom()

float com.jogamp.opengl.util.texture.TextureCoords.bottom ( )

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

Definition at line 88 of file TextureCoords.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getST_LB_RB_LT_RT()

float[] com.jogamp.opengl.util.texture.TextureCoords.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

Definition at line 73 of file TextureCoords.java.

Here is the caller graph for this function:

◆ left()

float com.jogamp.opengl.util.texture.TextureCoords.left ( )

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

Definition at line 82 of file TextureCoords.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ right()

float com.jogamp.opengl.util.texture.TextureCoords.right ( )

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

Definition at line 85 of file TextureCoords.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ top()

float com.jogamp.opengl.util.texture.TextureCoords.top ( )

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

Definition at line 91 of file TextureCoords.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

String com.jogamp.opengl.util.texture.TextureCoords.toString ( )

Definition at line 94 of file TextureCoords.java.


The documentation for this class was generated from the following file: