render
Class Texture

java.lang.Object
  extended byrender.Texture

public class Texture
extends java.lang.Object

Texture handling


Field Summary
 boolean animated
           
 java.nio.ByteBuffer bytebuff
           
 int height
           
 int[] texels
           
 int textname
           
 double uclamp
           
static boolean useMIP
           
 double vclamp
           
 int width
           
 
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
 

Field Detail

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
Constructor Detail

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 ints
h - height of the image
w - width of the image
name - texture name
mip - 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 object
component - the component that the image is associated with
name - texture name
mip - flag determining whether to use the multi image pyramid (MIP).
Method Detail

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 component
v - vertical component
dx - size of the pixel ( for use with mip )
mult - the scale factor for dx and dy ( for use with mip )