|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.material.MaterialMapping
artofillusion.material.LinearMaterialMapping
public class LinearMaterialMapping
LinearMaterialMapping is a MaterialMapping which represents a linear mapping (this includes rotations, translations, and scalings) of between material coordinates and world coordinates.
Constructor Summary | |
---|---|
LinearMaterialMapping(java.io.DataInputStream in,
Object3D theObject,
Material theMaterial)
|
|
LinearMaterialMapping(Object3D theObject,
Material3D theMaterial)
|
Method Summary | |
---|---|
void |
copy(MaterialMapping mapping)
Make this mapping identical to another one. |
MaterialMapping |
duplicate()
Create a new MaterialMapping which is identical to this one. |
MaterialMapping |
duplicate(Object3D obj,
Material mat)
Create a new MaterialMapping which is identical to this one, but for a different object and Material. |
Vec3 |
getCenter()
Get a vector whose components contain the center position for the mapping. |
Widget |
getEditingPanel(Object3D obj,
MaterialPreviewer preview)
This method should return a Widget in which the user can edit the mapping. |
void |
getMaterialSpec(Vec3 pos,
MaterialSpec spec,
double size,
double time)
Given a point inside the object for which this mapping is being used, find the corresponding material properties. |
static java.lang.String |
getName()
|
Vec3 |
getRotations()
Get a vector whose components contain the rotation angles for the mapping. |
Vec3 |
getScale()
Get a vector whose components contain the scale factors for the mapping. |
double |
getStepSize()
Get the step size to use for integrating the material. |
boolean |
isScaledToObject()
Get whether the material is scaled based on the size of the object. |
static boolean |
legalMapping(Object3D obj,
Material mat)
|
void |
setCenter(Vec3 center)
Set the center position for the mapping. |
void |
setRotations(Vec3 angles)
Set the rotation angles for the mapping. |
void |
setScale(Vec3 scale)
Set the scale factors for the mapping. |
void |
setScaledToObject(boolean scaled)
Set whether the material is scaled based on the size of the object. |
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 artofillusion.material.MaterialMapping |
---|
castsShadows, getMaterial, getObject, indexOfRefraction, isScattering |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinearMaterialMapping(Object3D theObject, Material3D theMaterial)
public LinearMaterialMapping(java.io.DataInputStream in, Object3D theObject, Material theMaterial) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
Method Detail |
---|
public static java.lang.String getName()
public static boolean legalMapping(Object3D obj, Material mat)
public Vec3 getCenter()
public void setCenter(Vec3 center)
public Vec3 getScale()
public void setScale(Vec3 scale)
public boolean isScaledToObject()
public void setScaledToObject(boolean scaled)
public Vec3 getRotations()
public void setRotations(Vec3 angles)
public double getStepSize()
getStepSize
in class MaterialMapping
public void getMaterialSpec(Vec3 pos, MaterialSpec spec, double size, double time)
MaterialMapping
getMaterialSpec
in class MaterialMapping
public MaterialMapping duplicate()
MaterialMapping
duplicate
in class MaterialMapping
public MaterialMapping duplicate(Object3D obj, Material mat)
MaterialMapping
duplicate
in class MaterialMapping
public void copy(MaterialMapping mapping)
MaterialMapping
copy
in class MaterialMapping
public Widget getEditingPanel(Object3D obj, MaterialPreviewer preview)
MaterialMapping
getEditingPanel
in class MaterialMapping
public void writeToFile(java.io.DataOutputStream out) throws java.io.IOException
MaterialMapping
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.
writeToFile
in class MaterialMapping
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |