|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectartofillusion.texture.TextureMapping
artofillusion.texture.UniformMapping
public class UniformMapping
UniformMapping is the TextureMapping for UniformTextures.
| Field Summary |
|---|
| Fields inherited from class artofillusion.texture.TextureMapping |
|---|
BACK_ONLY, FRONT_AND_BACK, FRONT_ONLY |
| Constructor Summary | |
|---|---|
UniformMapping(java.io.DataInputStream in,
Object3D theObject,
Texture theTexture)
|
|
UniformMapping(Object3D theObject,
Texture theTexture)
|
|
| Method Summary | |
|---|---|
void |
copy(TextureMapping map)
Make this mapping identical to another one. |
TextureMapping |
duplicate()
Create a new TextureMapping which is identical to this one. |
TextureMapping |
duplicate(Object3D obj,
Texture tex)
Create a new TextureMapping which is identical to this one, but for a different object and texture. |
double |
getDisplacement(Vec3 pos,
double size,
double t,
double[] param)
Given a point on the surface, evaluate the displacement function. |
buoy.widget.Widget |
getEditingPanel(Object3D obj,
MaterialPreviewer preview)
This method should return a Widget in which the user can edit the mapping. |
Object3D |
getObject()
Get the object this mapping is applied to. |
Texture |
getTexture()
Get the Texture associated with this TextureMapping. |
void |
getTextureSpec(Vec3 pos,
TextureSpec spec,
double angle,
double size,
double t,
double[] param)
Given a point on the surface for which this mapping is being used, find the corresponding surface properties. |
void |
getTransparency(Vec3 pos,
RGBColor trans,
double angle,
double size,
double t,
double[] param)
Same as above, except only return the transparent color. |
static boolean |
legalMapping(Object3D obj,
Texture tex)
|
RenderingTriangle |
mapTriangle(int v1,
int v2,
int v3,
int n1,
int n2,
int n3,
Vec3[] vert)
Given the vertices to be mapped and their normal vectors, generate a RenderingTriangle. |
void |
writeToFile(java.io.DataOutputStream out)
Every subclass of TextureMapping must define a constructor which takes a Texture and an Object3D as its arguments: public MappingSubclass(Object3D obj, Texture texture) In addition, every subclass must include a method of the form public static boolean legalMapping(Object3D obj, Texture texture) which returns true if the mapping can be used with the specified object and Texture. |
| Methods inherited from class artofillusion.texture.TextureMapping |
|---|
appliesTo, appliesToFace, getName, getParameters, setAppliesTo, setParameters |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UniformMapping(Object3D theObject,
Texture theTexture)
public UniformMapping(java.io.DataInputStream in,
Object3D theObject,
Texture theTexture)
throws java.io.IOException,
java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException| Method Detail |
|---|
public Texture getTexture()
TextureMapping
getTexture in class TextureMappingpublic Object3D getObject()
TextureMapping
getObject in class TextureMapping
public RenderingTriangle mapTriangle(int v1,
int v2,
int v3,
int n1,
int n2,
int n3,
Vec3[] vert)
TextureMapping
mapTriangle in class TextureMapping
public void getTextureSpec(Vec3 pos,
TextureSpec spec,
double angle,
double size,
double t,
double[] param)
TextureMapping
getTextureSpec in class TextureMappingpos - the point at which to evaluate the texturespec - the surface properties will be stored in thisangle - the dot product of the view direction with the surface normalsize - the width of the region over which to average the surface propertiest - the time at which to evaluate the surface propertiesparam - the texture parameter values at the point
public void getTransparency(Vec3 pos,
RGBColor trans,
double angle,
double size,
double t,
double[] param)
TextureMapping
getTransparency in class TextureMapping
public double getDisplacement(Vec3 pos,
double size,
double t,
double[] param)
TextureMapping
getDisplacement in class TextureMapping
public static boolean legalMapping(Object3D obj,
Texture tex)
public TextureMapping duplicate()
TextureMapping
duplicate in class TextureMapping
public TextureMapping duplicate(Object3D obj,
Texture tex)
TextureMapping
duplicate in class TextureMappingpublic void copy(TextureMapping map)
TextureMapping
copy in class TextureMapping
public buoy.widget.Widget getEditingPanel(Object3D obj,
MaterialPreviewer preview)
TextureMapping
getEditingPanel in class TextureMapping
public void writeToFile(java.io.DataOutputStream out)
throws java.io.IOException
TextureMappingpublic MappingSubclass(Object3D obj, Texture texture)
In addition, every subclass must include a method of the form
public static boolean legalMapping(Object3D obj, Texture texture)
which returns true if the mapping can be used with the specified object and Texture. Finally, every subclass must include a constructor with the signature
public MappingSubclass(DataInputStream in, Object3D obj, Texture texture) 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 TextureMappingjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||