org.sourceforge.jvb3d.Loader
Class TextureManager

java.lang.Object
  extended by org.sourceforge.jvb3d.Loader.TextureManager

public class TextureManager
extends java.lang.Object

Author:
Łukasz Krzyżak klasa zarządza teksturami - odpowiada za ich wczytywanie, tworzenie i przekazywanie dalej

Field Summary
protected static TextureManager instance
           
protected static java.util.logging.Logger logger
           
protected  java.util.Map<java.lang.String,org.sourceforge.jvb3d.Loader.TextureManager.TextureInfo> textures
           
protected static java.lang.String texturesFile
           
 
Constructor Summary
protected TextureManager()
          powoduje wczytanie konfiguracji z pliku
 
Method Summary
static TextureManager getInstance()
          singleton - zwraca obiekt managera
 javax.media.j3d.Texture getTextureById(java.lang.String textureId)
          zwraca teksturę o podanym w parametrze ID, jeśli jeszcze jej nie było - zostaje utworzona nowa
protected  void parseXmlData()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final java.util.logging.Logger logger

textures

protected java.util.Map<java.lang.String,org.sourceforge.jvb3d.Loader.TextureManager.TextureInfo> textures

texturesFile

protected static final java.lang.String texturesFile
See Also:
Constant Field Values

instance

protected static TextureManager instance
Constructor Detail

TextureManager

protected TextureManager()
powoduje wczytanie konfiguracji z pliku

Method Detail

getInstance

public static TextureManager getInstance()
singleton - zwraca obiekt managera

Returns:
obiekt managera

getTextureById

public javax.media.j3d.Texture getTextureById(java.lang.String textureId)
zwraca teksturę o podanym w parametrze ID, jeśli jeszcze jej nie było - zostaje utworzona nowa

Parameters:
textureId - ID tekstury
Returns:
tekstura
Throws:
java.util.NoSuchElementException - jeśli tekstura / plik obrazu nie istnieją

parseXmlData

protected void parseXmlData()
                     throws org.xml.sax.SAXException,
                            java.io.IOException,
                            javax.xml.parsers.ParserConfigurationException
Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException


Copyright © 2004-2005 Akademia Górniczo-Hutnicza w Krakowie. All Rights Reserved.