|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCustomWidget
artofillusion.MaterialPreviewer
public class MaterialPreviewer
MaterialPreviewer is a component used for renderering previews of Materials. It displays a scene consisting of a Sphere with the desired Material applied to it, a ground plane, and a single light. Optionally, an Object3D may be specified which will then be used instead of a Sphere.
Field Summary | |
---|---|
static int |
HANDLE_SIZE
|
Constructor Summary | |
---|---|
MaterialPreviewer(ObjectInfo obj,
int width,
int height)
Create a MaterialPreviewer to display the specified object, with its current texture and material. |
|
MaterialPreviewer(Texture tex,
Material mat,
int width,
int height)
Create a MaterialPreviewer to display a Texture and/or Material mapped to a sphere. |
|
MaterialPreviewer(Texture tex,
Material mat,
Object3D obj,
int width,
int height)
Same as above, except you can specify a different object to use instead of a sphere. |
Method Summary | |
---|---|
void |
cancelRendering()
Cancel rendering. |
ObjectInfo |
getObject()
Get the object on which the texture and material are being displayed. |
Scene |
getScene()
Get the scene being rendererd as the preview. |
void |
imageComplete(ComplexImage image)
Called when rendering is complete. |
void |
imageUpdated(java.awt.Image image)
Called when more pixels are available for the current image. |
void |
render()
Render the preview. |
void |
renderingCanceled()
Called when rendering is cancelled. |
void |
setMaterial(Material mat,
MaterialMapping map)
|
void |
setTexture(Texture tex,
TextureMapping map)
|
void |
statusChanged(java.lang.String status)
The renderer may call this method periodically during rendering, to give the listener text descriptions of the current status of rendering. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HANDLE_SIZE
Constructor Detail |
---|
public MaterialPreviewer(Texture tex, Material mat, int width, int height)
public MaterialPreviewer(Texture tex, Material mat, Object3D obj, int width, int height)
public MaterialPreviewer(ObjectInfo obj, int width, int height)
Method Detail |
---|
public ObjectInfo getObject()
public Scene getScene()
public void setTexture(Texture tex, TextureMapping map)
public void setMaterial(Material mat, MaterialMapping map)
public void render()
public void cancelRendering()
public void imageUpdated(java.awt.Image image)
imageUpdated
in interface RenderListener
public void statusChanged(java.lang.String status)
statusChanged
in interface RenderListener
public void imageComplete(ComplexImage image)
imageComplete
in interface RenderListener
public void renderingCanceled()
renderingCanceled
in interface RenderListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |