public class OBJLoader extends LoaderBase implements Loader
ObjectFile
Java 3D class, expected for texture images format (supports only BMP, WBMP, GIF, JPEG and PNG format).
Compared to ObjectFile
, this class supports transparency as defined in
MTL file format
specifications, and doesn't oblige to define texture coordinate on all vertices
when only one face needs such coordinates. Material description is stored in
OBJMaterial
instances to be able to use additional OBJ information
in other circumstances.basePath, baseUrl, loadFlags
LOAD_ALL, LOAD_BACKGROUND_NODES, LOAD_BEHAVIOR_NODES, LOAD_FOG_NODES, LOAD_LIGHT_NODES, LOAD_SOUND_NODES, LOAD_VIEW_GROUPS
Constructor and Description |
---|
OBJLoader() |
Modifier and Type | Method and Description |
---|---|
Scene |
load(java.io.Reader reader)
Returns the scene described in the given OBJ file stream.
|
Scene |
load(java.lang.String file)
Returns the scene described in the given OBJ file.
|
Scene |
load(java.net.URL url)
Returns the scene described in the given OBJ file URL.
|
void |
setUseCaches(java.lang.Boolean useCaches)
Sets whether this loader should try or avoid accessing to URLs with cache.
|
getBasePath, getBaseUrl, getFlags, setBasePath, setBaseUrl, setFlags
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBasePath, getBaseUrl, getFlags, setBasePath, setBaseUrl, setFlags
public void setUseCaches(java.lang.Boolean useCaches)
useCaches
- Boolean.TRUE
, Boolean.FALSE
, or
null
then caches will be used according to the value
returned by URLConnection.getDefaultUseCaches()
.public Scene load(java.lang.String file) throws java.io.FileNotFoundException, IncorrectFormatException, ParsingErrorException
load
in interface Loader
java.io.FileNotFoundException
IncorrectFormatException
ParsingErrorException
public Scene load(java.net.URL url) throws java.io.FileNotFoundException, IncorrectFormatException, ParsingErrorException
load
in interface Loader
java.io.FileNotFoundException
IncorrectFormatException
ParsingErrorException
public Scene load(java.io.Reader reader) throws java.io.FileNotFoundException, IncorrectFormatException, ParsingErrorException
load
in interface Loader
java.io.FileNotFoundException
IncorrectFormatException
ParsingErrorException
© Copyrights 2006-2014 eTeks - All rights reserved
Distributed under GNU General Public License