|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLoaderBase
com.microcrowd.loader.java3d.max3ds.Loader3DS
public class Loader3DS
Used to load a 3ds studio max file. This will sequentially read a 3ds file,
load or skip chunks and subchunks and initialize the data for the chunks.
A ChunkChopper is a singleton flyweight factory responsible for
chopping the data up and sending it to the corresponding chunks(which are
flyweights ala the flyweight pattern) for processing.
Features not supported; unknown chunks are skipped.
| Constructor Summary | |
|---|---|
Loader3DS()
|
|
| Method Summary | |
|---|---|
static void |
addDefaultLights(Group group)
Adds defaultlights to the group provided similar to the ones 3ds max adds when there are none in the scene. |
boolean |
fromUrl()
Returns true if this loader is loading files from a url. |
java.awt.Image |
getTextureImage(java.lang.String imageName)
gets an image with the specified name. |
Scene |
load(java.io.Reader reader)
This is not supported |
Scene |
load(java.lang.String modelPath)
Loads the model by parsing the file, modelPath and creating a 3D Scene. |
Scene |
load(java.net.URL url)
throws UnsupportedOperationException |
protected Scene |
parseChunks(java.io.InputStream inputStream,
int modelSize)
Gets a chunk chopper to do all the dirty work. |
void |
setBasePath(java.lang.String pathName)
Set the path where files associated with this .obj file are located. |
void |
setTextureImageLoader(TextureImageLoader loader)
Sets the TextureImageLoader to be used when texture images are needed. |
void |
turnOnDebug()
Turn on debug mode for all 3ds xml. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Loader3DS()
| Method Detail |
|---|
public Scene load(java.io.Reader reader)
throws java.io.FileNotFoundException
reader - loads a model from a reader
java.io.FileNotFoundException
java.lang.UnsupportedOperationException
public Scene load(java.lang.String modelPath)
throws java.io.FileNotFoundException
modelPath - the path of the 3ds file.
java.io.FileNotFoundException - if the file can't be located.public void setBasePath(java.lang.String pathName)
public boolean fromUrl()
public java.awt.Image getTextureImage(java.lang.String imageName)
imageName - name of image to load.
public void setTextureImageLoader(TextureImageLoader loader)
loader - the TextureImageLoader that will be used to load images.
protected Scene parseChunks(java.io.InputStream inputStream,
int modelSize)
inputStream - the stream containing the model.modelSize - size of the model file.
public static void addDefaultLights(Group group)
group - to add the lighting to.
public Scene load(java.net.URL url)
throws java.io.FileNotFoundException
url - url of model to be loaded.
java.io.FileNotFoundException - if file couldn't be found.public void turnOnDebug()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||