|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.RenderingTriangle
public abstract class RenderingTriangle
A RenderingTriangle represents a triangle which is to be rendered to the screen. This is an abstract class, whose subclasses provide details about how the triangle should be displayed. Every RenderingTriangle is associated with a RenderingMesh. The vertices of the triangle are specified as indices into the RenderingMesh's array of vertices. Similarly, the normals are specified as indices into the array of normals.
Field Summary | |
---|---|
int |
index
|
int |
n1
|
int |
n2
|
int |
n3
|
RenderingMesh |
theMesh
|
int |
v1
|
int |
v2
|
int |
v3
|
Constructor Summary | |
---|---|
RenderingTriangle(int v1,
int v2,
int v3,
int n1,
int n2,
int n3)
|
Method Summary | |
---|---|
RenderingTriangle |
clone()
|
abstract double |
getDisplacement(double u,
double v,
double w,
double size,
double t)
Get the displacement for a point on the triangle. |
double[] |
getParameters(double u,
double v,
double w)
Given the barycentric coordinates for a point in the triangle, calculate the values of the texture parameters at that point. |
TextureMapping |
getTextureMapping()
Get the TextureMapping for this triangle. |
abstract void |
getTextureSpec(TextureSpec spec,
double angle,
double u,
double v,
double w,
double size,
double t)
Given the barycentric coordinates for a point in the triangle, build a TextureSpec describing the properties of the triangle at that point. |
abstract void |
getTransparency(RGBColor trans,
double angle,
double u,
double v,
double w,
double size,
double t)
Same as above, except only return the transparent color. |
void |
setMesh(RenderingMesh mesh,
TextureMapping map,
int index)
Set the mesh that this triangle is part of. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int index
public int v1
public int v2
public int v3
public int n1
public int n2
public int n3
public RenderingMesh theMesh
Constructor Detail |
---|
public RenderingTriangle(int v1, int v2, int v3, int n1, int n2, int n3)
Method Detail |
---|
public TextureMapping getTextureMapping()
public abstract void getTextureSpec(TextureSpec spec, double angle, double u, double v, double w, double size, double t)
public abstract void getTransparency(RGBColor trans, double angle, double u, double v, double w, double size, double t)
public abstract double getDisplacement(double u, double v, double w, double size, double t)
public void setMesh(RenderingMesh mesh, TextureMapping map, int index)
mesh
- the RenderingMesh this triangle belongs tomap
- the TextureMapping for this triangleindex
- the index of this triangle within the meshpublic double[] getParameters(double u, double v, double w)
public RenderingTriangle clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |