com.sygem.jazz3d3
Class TextureLoader

java.lang.Object
  extended bycom.sygem.jazz3d3.TextureLoader

public class TextureLoader
extends java.lang.Object

Utility class for Texture loading.

NOTE: There is no constructor - all the methods are static so you never create an instance of a Texture Loader, just call the methods directly.

Version:
3.0a

Method Summary
static int getDefaultTextureColor()
           
static Texture loadImage(java.awt.Image im)
          Loads an image for use as a background, or with the texture mappers.
static Texture loadImage(java.awt.Image im, int size)
          Loads an image for use as a background, or with the texture mappers.
static Texture loadImage(java.awt.Image im, int sizex, int sizey)
          Loads an image for use as a background, or with the texture mappers.
static Texture loadImage(java.lang.String filename)
          Loads an image for use as a background, or with the texture mappers.
static Texture loadImage(java.lang.String filename, int size)
          Loads an image for use as a background, or with the texture mappers.
static Texture loadImage(java.lang.String filename, int sizex, int sizey)
          Loads an image for use as a background, or with the texture mappers.
static void setDefaultTextureColor(int texCol)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultTextureColor

public static int getDefaultTextureColor()

loadImage

public static final Texture loadImage(java.awt.Image im)
Loads an image for use as a background, or with the texture mappers. By default, images are MEDIUM. This version of loadImage() allows you to get a handle on this image in your own way - it takes an Image as a parameter.

Parameters:
im - An Image
Returns:
A Texture object
See Also:
Texture, Texture.MEDIUM

loadImage

public static final Texture loadImage(java.awt.Image im,
                                      int size)
Loads an image for use as a background, or with the texture mappers. Using this version of the loadImage() method, you can specify the image size - although this will always result in a square image. This version of loadImage() allows you to get a handle on this image in your own way - it takes an Image as a parameter.

Parameters:
im - An Image
size - The size of the image
Returns:
A Texture object
See Also:
Texture, Texture.VLARGE, Texture.LARGE, Texture.MEDIUM, Texture.SMALL, Texture.VSMALL

loadImage

public static final Texture loadImage(java.awt.Image im,
                                      int sizex,
                                      int sizey)
Loads an image for use as a background, or with the texture mappers. Using this version of the loadImage() method, you can specify both dimensions of the image size. This version of loadImage() allows you to get a handle on this image in your own way - it takes an Image as a parameter.

Parameters:
im - An Image
sizex - The x size of the image
sizey - The y size of the image
Returns:
A Texture object
See Also:
Texture, Texture.VLARGE, Texture.LARGE, Texture.MEDIUM, Texture.SMALL, Texture.VSMALL

loadImage

public static final Texture loadImage(java.lang.String filename)
Loads an image for use as a background, or with the texture mappers. By default, images are MEDIUM.

Parameters:
filename - A string, containing the location of the image. This can be either a full URL or relative to the applet location.
Returns:
A Texture object
See Also:
Texture, Texture.MEDIUM

loadImage

public static final Texture loadImage(java.lang.String filename,
                                      int size)
Loads an image for use as a background, or with the texture mappers. Using this version of the loadImage() method, you can specify the image size - although this will always result in a square image.

Parameters:
filename - A string, containing the location of the image. This can be either a full URL or relative to the applet location.
size - The size of the image
Returns:
A Texture object
See Also:
Texture, Texture.VLARGE, Texture.LARGE, Texture.MEDIUM, Texture.SMALL, Texture.VSMALL

loadImage

public static final Texture loadImage(java.lang.String filename,
                                      int sizex,
                                      int sizey)
Loads an image for use as a background, or with the texture mappers. Using this version of the loadImage() method, you can specify both dimensions of the image size.

Parameters:
filename - A string, containing the location of the image. This can be either a full URL or relative to the applet location.
sizex - The x size of the image
sizey - The y size of the image
Returns:
A Texture object
See Also:
Texture, Texture.VLARGE, Texture.LARGE, Texture.MEDIUM, Texture.SMALL, Texture.VSMALL

setDefaultTextureColor

public static void setDefaultTextureColor(int texCol)


Copyright © 1999-2006 SyGem Software. All Rights Reserved.