|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.biology.lsystems.common.TextureBuilder
public class TextureBuilder
This class serves as a factory for Texture and ImageComponent2D objects. It creates these objects from image files (GIF or JPEG). The files must be stored at the same location the as classfile for this class.
Examples: If the TextureBuilder.class is in /home/hrm/j3d/TextureBuilder.class and one calls buildTexture("test.gif"), the there must be a file /home/hrm/j3d/test.gif.
| Constructor Summary | |
|---|---|
TextureBuilder()
Creates a new TextureBuilder object. |
|
| Method Summary | |
|---|---|
javax.media.j3d.ImageComponent2D |
buildImage(java.lang.String imageName)
Loads the image file and creates an ImageComponent2D. |
javax.media.j3d.Texture |
buildTexture(java.lang.String imageName)
Loads the image file and creates an Texture. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextureBuilder()
| Method Detail |
|---|
public javax.media.j3d.ImageComponent2D buildImage(java.lang.String imageName)
java.lang.RuntimeException - if the image does not exist or is corrupted
Note: It would be better to throw an IOException, so users would be
forced to catch it. But I want to make this class as similiar to
the com.sun.j3d.utils.image.TextureLoader (which does not throw
checked Exceptions either) as possible.public javax.media.j3d.Texture buildTexture(java.lang.String imageName)
java.lang.RuntimeException - if the image does not exist or is corrupted
Note: It would be better to throw an IOException, so users would be
forced to catch it. But I want to make this class as similiar to
the com.sun.j3d.utils.image.TextureLoader (which does not throw
checked Exceptions either) as possible.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||