artofillusion.texture
Class UniformTexture

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

public class UniformTexture
extends Texture

UniformMaterial represents a material whose properties do not vary with position.


Field Summary
 double cloudiness
           
 RGBColor diffuseColor
           
 RGBColor emissiveColor
           
 double roughness
           
 float shininess
           
 RGBColor specularColor
           
 float specularity
           
 float transparency
           
 RGBColor transparentColor
           
 
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
UniformTexture()
           
UniformTexture(java.io.DataInputStream in, Scene theScene)
          The following two methods are used for reading and writing files.
 
Method Summary
 Texture duplicate()
          Create a duplicate of the texture.
 void edit(BFrame fr, Scene sc)
          Allow the user to interactively edit the material.
 void getAverageSpec(TextureSpec spec, double time, double[] param)
          Get a TextureSpec which represents the average surface properties of this texture.
 TextureMapping getDefaultMapping(Object3D object)
          The only TextureMapping which can be used for a UniformTexture is a UniformMapping.
 void getTextureSpec(TextureSpec spec)
           
 void getTransparency(RGBColor trans)
           
static java.lang.String getTypeName()
           
 boolean hasComponent(int component)
          Determine whether this texture has a non-zero value anywhere for a particular component.
static UniformTexture invisibleTexture()
          Create a texture which is completely invisible.
 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, setID, setName, usesImage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

diffuseColor

public RGBColor diffuseColor

specularColor

public RGBColor specularColor

transparentColor

public RGBColor transparentColor

emissiveColor

public RGBColor emissiveColor

roughness

public double roughness

cloudiness

public double cloudiness

transparency

public float transparency

specularity

public float specularity

shininess

public float shininess
Constructor Detail

UniformTexture

public UniformTexture()

UniformTexture

public UniformTexture(java.io.DataInputStream in,
                      Scene theScene)
               throws java.io.IOException,
                      java.io.InvalidObjectException
The following two methods are used for reading and writing files. The first is a constructor which reads the necessary data from an input stream. The other writes the object's representation to an output stream.

Throws:
java.io.IOException
java.io.InvalidObjectException
Method Detail

invisibleTexture

public static UniformTexture invisibleTexture()
Create a texture which is completely invisible.


getTypeName

public static java.lang.String getTypeName()

getTextureSpec

public void getTextureSpec(TextureSpec spec)

getTransparency

public void getTransparency(RGBColor trans)

getAverageSpec

public void getAverageSpec(TextureSpec spec,
                           double time,
                           double[] param)
Description copied from class: Texture
Get a TextureSpec which represents the average surface properties of this texture. It will be used by Renderers and Translators which do not support the given texture type. This need not be an exact mathematical average, but should give a reasonable representation of the overall surface properties.

Specified by:
getAverageSpec in class Texture

getDefaultMapping

public TextureMapping getDefaultMapping(Object3D object)
The only TextureMapping which can be used for a UniformTexture is a UniformMapping.

Specified by:
getDefaultMapping in class Texture

duplicate

public Texture duplicate()
Create a duplicate of the texture.

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)
Allow the user to interactively edit the material.

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.