artofillusion.texture
Class LayeredTexture

java.lang.Object
  extended by artofillusion.texture.Texture
      extended by artofillusion.texture.LayeredTexture

public class LayeredTexture
extends Texture

LayeredTexture represents a texture which is composed of other textures layered on top of each other. This class serves mainly as a placeholder - most of the real work is done by LayeredMapping.


Field Summary
 
Fields inherited from class artofillusion.texture.Texture
BUMP_COMPONENT, DIFFUSE_COLOR_COMPONENT, DISPLACEMENT_COMPONENT, EMISSIVE_COLOR_COMPONENT, HILIGHT_COLOR_COMPONENT, SPECULAR_COLOR_COMPONENT, TRANSPARENT_COLOR_COMPONENT
 
Constructor Summary
LayeredTexture(java.io.DataInputStream in, Scene theScene)
           
LayeredTexture(LayeredMapping map)
           
LayeredTexture(Object3D obj)
           
 
Method Summary
 Texture duplicate()
          There shouldn't ever be a reason to call this.
 void edit(BFrame fr, Scene sc)
          LayeredTexture does not provide its own editor, since this is done directly through the ObjectTextureDialog.
 void getAverageSpec(TextureSpec spec, double time, double[] param)
          For the average properties, use the average properties of the bottom layer.
 TextureMapping getDefaultMapping(Object3D object)
          Every LayeredTexture has a unique LayeredMapping object associated with it.
 boolean hasComponent(int component)
          Determine whether this texture has a non-zero value anywhere for a particular component.
 void setMapping(LayeredMapping map)
          Set the mapping for this texture.
 boolean usesImage(ImageMap image)
          Determine whether this Texture uses the specified image.
 void writeToFile(java.io.DataOutputStream out, Scene theScene)
          The following method writes the texture's data to an output stream.
 
Methods inherited from class artofillusion.texture.Texture
assignNewID, getID, getName, getParameters, getTypeName, setID, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayeredTexture

public LayeredTexture(Object3D obj)

LayeredTexture

public LayeredTexture(LayeredMapping map)

LayeredTexture

public LayeredTexture(java.io.DataInputStream in,
                      Scene theScene)
               throws java.io.IOException,
                      java.io.InvalidObjectException
Throws:
java.io.IOException
java.io.InvalidObjectException
Method Detail

usesImage

public boolean usesImage(ImageMap image)
Determine whether this Texture uses the specified image.

Overrides:
usesImage in class Texture

getAverageSpec

public void getAverageSpec(TextureSpec spec,
                           double time,
                           double[] param)
For the average properties, use the average properties of the bottom layer.

Specified by:
getAverageSpec in class Texture

getDefaultMapping

public TextureMapping getDefaultMapping(Object3D object)
Every LayeredTexture has a unique LayeredMapping object associated with it.

Specified by:
getDefaultMapping in class Texture

setMapping

public void setMapping(LayeredMapping map)
Set the mapping for this texture.


duplicate

public Texture duplicate()
There shouldn't ever be a reason to call this.

Specified by:
duplicate in class Texture

hasComponent

public boolean hasComponent(int component)
Determine whether this texture has a non-zero value anywhere for a particular component.

Specified by:
hasComponent in class Texture
Parameters:
component - the texture component to check for (one of the *_COMPONENT constants)

edit

public void edit(BFrame fr,
                 Scene sc)
LayeredTexture does not provide its own editor, since this is done directly through the ObjectTextureDialog.

Specified by:
edit in class Texture

writeToFile

public void writeToFile(java.io.DataOutputStream out,
                        Scene theScene)
                 throws java.io.IOException
Description copied from class: Texture
The following method writes the texture's data to an output stream. In addition to this method, every Texture must include a constructor with the signature public Classname(DataInputStream in, Scene theScene) throws IOException, InvalidObjectException which reconstructs the texture by reading its data from an input stream.

Specified by:
writeToFile in class Texture
Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.