hmi.graphics.util
Class ColladaReader

java.lang.Object
  extended by hmi.graphics.util.ColladaReader

public final class ColladaReader
extends Object

ColladReader can read a Collada file from a resource directory, and translate it into a GScene or GLScene.

Author:
Job Zwiers

Field Summary
static String DEFAULT_COLLADA_RESOURCE_DIR
           
private static org.slf4j.Logger logger
           
private static ResourcePool pool
           
 
Constructor Summary
private ColladaReader()
           
 
Method Summary
static void addColladaDirectory(String dir)
          Adds the specified directory as one of the resource directories for Collada files
static GLScene getGLScene(String resourceName, String jointRenamingFileName, float scale)
          Tries to get a GLScene object with the specified resource name.
static GScene getGScene(String resourceName, String jointRenamingFileName, float scale)
          Tries to get a GScene object with the specified resource name.
static GLScene read(String colladaResourceDir, String colladaFileName)
           
static GLScene read(String colladaResourceDir, String colladaFileName, String jointRenamingFileName, float scale)
           
static GLScene readGLSceneFromResourceFile(Resources resources, String colladaFileName, String jointRenamingFileName, float scale)
          Reads a Collada file and compiles it into a GLScene
static GScene readGSceneFromResourceFile(Resources resources, String colladaFileName, String jointRenamingFileName, float scale)
          Reads a Collada file and compiles it into a GScene
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pool

private static ResourcePool pool

logger

private static org.slf4j.Logger logger

DEFAULT_COLLADA_RESOURCE_DIR

public static final String DEFAULT_COLLADA_RESOURCE_DIR
See Also:
Constant Field Values
Constructor Detail

ColladaReader

private ColladaReader()
Method Detail

read

public static GLScene read(String colladaResourceDir,
                           String colladaFileName)
                    throws IOException
Throws:
IOException

read

public static GLScene read(String colladaResourceDir,
                           String colladaFileName,
                           String jointRenamingFileName,
                           float scale)
                    throws IOException
Throws:
IOException

readGLSceneFromResourceFile

public static GLScene readGLSceneFromResourceFile(Resources resources,
                                                  String colladaFileName,
                                                  String jointRenamingFileName,
                                                  float scale)
                                           throws IOException
Reads a Collada file and compiles it into a GLScene

Throws:
IOException

readGSceneFromResourceFile

public static GScene readGSceneFromResourceFile(Resources resources,
                                                String colladaFileName,
                                                String jointRenamingFileName,
                                                float scale)
                                         throws IOException
Reads a Collada file and compiles it into a GScene

Throws:
IOException

addColladaDirectory

public static void addColladaDirectory(String dir)
Adds the specified directory as one of the resource directories for Collada files


getGScene

public static GScene getGScene(String resourceName,
                               String jointRenamingFileName,
                               float scale)
Tries to get a GScene object with the specified resource name. GScene objects found and loaded will be cached.


getGLScene

public static GLScene getGLScene(String resourceName,
                                 String jointRenamingFileName,
                                 float scale)
Tries to get a GLScene object with the specified resource name. The internal GScene objects found and loaded will be cached.