|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brackeen.javagamebook.graphics3D.texture.Texture
The Texture class is an sabstract class that represents a 16-bit color texture.
Constructor Summary | |
Texture(int width,
int height)
Creates a new Texture with the specified width and height. |
Method Summary | |
static int |
countbits(int n)
Counts the number of "on" bits in an integer. |
static Texture |
createTexture(java.awt.image.BufferedImage image)
Creates an unshaded Texture from the specified image. |
static Texture |
createTexture(java.awt.image.BufferedImage image,
boolean shaded)
Creates an Texture from the specified image. |
static Texture |
createTexture(java.lang.String filename)
Creates an unshaded Texture from the specified image file. |
static Texture |
createTexture(java.lang.String filename,
boolean shaded)
Creates an Texture from the specified image file. |
abstract short |
getColor(int x,
int y)
Gets the 16-bit color of this Texture at the specified (x,y) location. |
int |
getHeight()
Gets the height of this Texture. |
int |
getWidth()
Gets the width of this Texture. |
static boolean |
isPowerOfTwo(int n)
Returns true if the specified number is a power of 2. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Texture(int width, int height)
Method Detail |
public int getWidth()
public int getHeight()
public abstract short getColor(int x, int y)
public static Texture createTexture(java.lang.String filename)
public static Texture createTexture(java.lang.String filename, boolean shaded)
public static Texture createTexture(java.awt.image.BufferedImage image)
public static Texture createTexture(java.awt.image.BufferedImage image, boolean shaded)
public static boolean isPowerOfTwo(int n)
public static int countbits(int n)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |