render
Class Texture
java.lang.Object
render.Texture
- public class Texture
- extends java.lang.Object
Texture handling
|
Constructor Summary |
Texture(java.nio.ByteBuffer buff,
int h,
int w,
java.lang.String name)
|
Texture(java.awt.Image src,
java.lang.String name,
java.awt.Component component,
boolean mip)
Constructor using an image object |
Texture(int[] pix,
int h,
int w,
java.lang.String name,
boolean mip)
Constructor using an array of pixels |
Texture(java.lang.String file,
java.lang.String name)
|
Texture(java.net.URL fileURL,
java.lang.String name)
|
|
Method Summary |
int |
getTexel(double u,
double v,
int dx,
int dy,
int mult)
Returns the integer value from the texture at [u, v ]. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
texels
public int[] texels
height
public int height
width
public int width
useMIP
public static boolean useMIP
textname
public int textname
bytebuff
public java.nio.ByteBuffer bytebuff
uclamp
public double uclamp
vclamp
public double vclamp
animated
public boolean animated
Texture
public Texture(java.lang.String file,
java.lang.String name)
throws java.io.IOException
Texture
public Texture(java.net.URL fileURL,
java.lang.String name)
throws java.io.IOException
Texture
public Texture(java.nio.ByteBuffer buff,
int h,
int w,
java.lang.String name)
Texture
public Texture(int[] pix,
int h,
int w,
java.lang.String name,
boolean mip)
- Constructor using an array of pixels
- Parameters:
pix - array of pixel colors using packed intsh - height of the imagew - width of the imagename - texture namemip - flag determining whether to use the multi image pyramid (MIP).
Texture
public Texture(java.awt.Image src,
java.lang.String name,
java.awt.Component component,
boolean mip)
- Constructor using an image object
- Parameters:
src - Image objectcomponent - the component that the image is associated withname - texture namemip - flag determining whether to use the multi image pyramid (MIP).
getTexel
public final int getTexel(double u,
double v,
int dx,
int dy,
int mult)
- Returns the integer value from the texture at [u, v ].
- Parameters:
u - horizontal componentv - vertical componentdx - size of the pixel ( for use with mip )mult - the scale factor for dx and dy ( for use with mip )