|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.j3d.loaders.LoaderBase
org.j3d.renderer.java3d.loaders.STLLoader
Class to load objects from a STL (Stereolithography) file into Java3D.
In case that the file uses the binary STL format, no check can be done to assure that the file is in STL format. A wrong format will only be recognized if an invalid amount of data is contained in the file.
| Field Summary |
| Fields inherited from class com.sun.j3d.loaders.LoaderBase |
basePath, baseUrl, loadFlags |
| Fields inherited from interface com.sun.j3d.loaders.Loader |
LOAD_ALL, LOAD_BACKGROUND_NODES, LOAD_BEHAVIOR_NODES, LOAD_FOG_NODES, LOAD_LIGHT_NODES, LOAD_SOUND_NODES, LOAD_VIEW_GROUPS |
| Constructor Summary | |
STLLoader()
Creates a STLLoader object. |
|
STLLoader(java.awt.Component parentComponent)
Creates a STLLoader object which shows the progress of reading. |
|
| Method Summary | |
static com.sun.j3d.loaders.Scene |
createScene(STLFileReader reader)
Creates a Scene object with the contents of the STL file. |
com.sun.j3d.loaders.Scene |
load(java.io.Reader reader)
Loading from a Reader object not supported. |
com.sun.j3d.loaders.Scene |
load(java.lang.String fileName)
Loads a STL file from a file. |
com.sun.j3d.loaders.Scene |
load(java.net.URL url)
Loads a STL file from an URL. |
| Methods inherited from class com.sun.j3d.loaders.LoaderBase |
getBasePath, getBaseUrl, getFlags, setBasePath, setBaseUrl, setFlags |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public STLLoader()
public STLLoader(java.awt.Component parentComponent)
load( URL ) and load( String ).
parentComponent - Parent Component of progress monitor.
Use null if there is no parent.| Method Detail |
public com.sun.j3d.loaders.Scene load(java.lang.String fileName)
throws java.io.FileNotFoundException,
com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
The getNamedObjects method of the Scene object
will return Shape3D objects with no Appearance
set.
Scene object of the content of fileName
or null if user cancelled loading (only possible if
progress monitoring is enabled).
java.io.FileNotFoundException
com.sun.j3d.loaders.IncorrectFormatException
com.sun.j3d.loaders.ParsingErrorException
public com.sun.j3d.loaders.Scene load(java.net.URL url)
throws java.io.FileNotFoundException,
com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
The getNamedObjects method of the Scene object
will return Shape3D objects with no Appearance
set.
Scene object of the content of url or
null if user cancelled loading (only possible if
progress monitoring is enabled).
java.io.FileNotFoundException
com.sun.j3d.loaders.IncorrectFormatException
com.sun.j3d.loaders.ParsingErrorException
public com.sun.j3d.loaders.Scene load(java.io.Reader reader)
throws java.io.FileNotFoundException,
com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
Reader object not supported.
null
java.io.FileNotFoundException
com.sun.j3d.loaders.IncorrectFormatException
com.sun.j3d.loaders.ParsingErrorException
public static com.sun.j3d.loaders.Scene createScene(STLFileReader reader)
throws com.sun.j3d.loaders.IncorrectFormatException,
com.sun.j3d.loaders.ParsingErrorException
Scene object with the contents of the STL file.
Closes the reader after finishing reading.
reader - STLFileReader object for reading the STL file.
com.sun.j3d.loaders.IncorrectFormatException
com.sun.j3d.loaders.ParsingErrorException
|
j3d.org Code | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||