render
Class Texture
java.lang.Object
|
+--render.Texture
- public final class Texture
- extends java.lang.Object
Texture handling
Field Summary |
static boolean |
useMIP
|
Constructor Summary |
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 |
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 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useMIP
public static boolean useMIP
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 )