Aviatrix3D
2.1.0

org.j3d.renderer.aviatrix3d.texture
Class AbstractTextureCache

java.lang.Object
  extended by org.j3d.renderer.aviatrix3d.texture.AbstractTextureCache
All Implemented Interfaces:
AVTextureCache, org.j3d.texture.TextureCache

public abstract class AbstractTextureCache
extends java.lang.Object
implements AVTextureCache

An abstract implementation of the cache with a collection of useful utility methods for any cache implementation.

This class does not provide the storage structures for caching as each implementation will have different requirements. It just provides utility methods that most implementations will find useful.

Version:
$Revision: 1.4 $
Author:
Alan Hudson

Constructor Summary
protected AbstractTextureCache()
          Construct a new instance of the empty cache.
 
Method Summary
protected  TextureComponent2D load2DImage(java.lang.String filename)
          Load the image component from the given filename.
protected  TextureComponent2D load2DImage(java.net.URL url)
          Load the image component from the given url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.j3d.renderer.aviatrix3d.texture.AVTextureCache
checkTextureComponent, fetchTexture, fetchTexture, fetchTextureComponent, fetchTextureComponent, registerTexture, registerTextureComponent
 
Methods inherited from interface org.j3d.texture.TextureCache
checkTexture, clearAll, releaseTexture, releaseTexture
 

Constructor Detail

AbstractTextureCache

protected AbstractTextureCache()
Construct a new instance of the empty cache. Empty implementation, does nothing.

Method Detail

load2DImage

protected TextureComponent2D load2DImage(java.lang.String filename)
                                  throws java.io.IOException
Load the image component from the given filename. All images are loaded by-reference. This does not automatically register the component with the internal datastructures. That is the responsibility of the caller.

Parameters:
filename - The name of the file to be loaded
Returns:
An TextureComponent instance with byRef true and yUp false
Throws:
java.io.IOException - Some error reading the file

load2DImage

protected TextureComponent2D load2DImage(java.net.URL url)
                                  throws java.io.IOException
Load the image component from the given url. All images are loaded by-reference. This does not automatically register the component with the internal datastructures. That is the responsibility of the caller.

Parameters:
url - The URL of the file to be loaded
Returns:
An TextureComponent instance with byRef true and yUp false
Throws:
java.io.IOException - Some error reading the URL

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org