|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.material.MaterialMapping
public abstract class MaterialMapping
A MaterialMapping describes the mapping of a Material's coordinates to the local coordinate system of an object. This is an abstract class. Its subclasses describe various types of mappings which are appropriate for various types of objects and materials.
Method Summary | |
---|---|
boolean |
castsShadows()
Return true if this mapping's Material casts shadows. |
abstract void |
copy(MaterialMapping map)
Make this mapping identical to another one. |
abstract MaterialMapping |
duplicate()
Create a new MaterialMapping which is identical to this one. |
abstract MaterialMapping |
duplicate(Object3D obj,
Material mat)
Create a new MaterialMapping which is identical to this one, but for a different object and Material. |
abstract Widget |
getEditingPanel(Object3D obj,
MaterialPreviewer preview)
This method should return a Widget in which the user can edit the mapping. |
Material |
getMaterial()
Get the Material which is being mapped. |
abstract void |
getMaterialSpec(Vec3 pos,
MaterialSpec spec,
double size,
double t)
Given a point inside the object for which this mapping is being used, find the corresponding material properties. |
static java.lang.String |
getName()
Get the name of this type of mapping. |
Object3D |
getObject()
Get the object to which the material is applied. |
abstract double |
getStepSize()
Get the step size to use for integrating the material. |
double |
indexOfRefraction()
Get the index of refraction for this mapping's Material. |
boolean |
isScattering()
Return true if this mapping's Material has internal scattering. |
abstract void |
writeToFile(java.io.DataOutputStream out)
Every subclass of MaterialMapping must define a constructor which takes a Material and an Object3D as its arguments: |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract void writeToFile(java.io.DataOutputStream out) throws java.io.IOException
public MappingSubclass(Object3D theObject, Material theMaterial)
In addition, every subclass must include a constructor with the signature
public MappingSubclass(DataInputStream in, Object3D theObject, Material theMaterial) throws IOException, InvalidObjectException
which reconstructs the mapping by reading its data from an input stream. The following method writes the object's data to an output stream.
java.io.IOException
public static java.lang.String getName()
public double indexOfRefraction()
public abstract double getStepSize()
public boolean isScattering()
public boolean castsShadows()
public Material getMaterial()
public Object3D getObject()
public abstract void getMaterialSpec(Vec3 pos, MaterialSpec spec, double size, double t)
public abstract MaterialMapping duplicate()
public abstract MaterialMapping duplicate(Object3D obj, Material mat)
public abstract void copy(MaterialMapping map)
public abstract Widget getEditingPanel(Object3D obj, MaterialPreviewer preview)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |