|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object processing.core.PTriangle
public class PTriangle
Handles rendering of single (tesselated) triangles in 3D.
Originally written by sami (www.sumea.com)
Field Summary | |
---|---|
boolean |
INTERPOLATE_ALPHA
|
boolean |
INTERPOLATE_RGB
|
boolean |
INTERPOLATE_UV
|
int |
m_drawFlags
|
Constructor Summary | |
---|---|
PTriangle(PGraphics3D g)
|
Method Summary | |
---|---|
void |
render()
Renders the polygon |
void |
reset()
Resets polygon attributes |
void |
setCamVertices(float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
Pass camera-space coordinates for the triangle. |
void |
setCulling(boolean tf)
Sets backface culling on/off |
void |
setIntensities(float r0,
float g0,
float b0,
float a0,
float r1,
float g1,
float b1,
float a1,
float r2,
float g2,
float b2,
float a2)
Sets vertex intensities in 0xRRGGBBAA format |
static void |
setInterpPower(int pwr)
Set the power of two used for linear interpolation of texture coordinates. |
void |
setTexture(PImage image)
Sets texture image used for the polygon |
void |
setUV(float[] u,
float[] v)
|
void |
setUV(float u0,
float v0,
float u1,
float v1,
float u2,
float v2)
Sets the UV coordinates of the texture |
void |
setVertices(float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2)
Sets vertex coordinates for the triangle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean INTERPOLATE_UV
public boolean INTERPOLATE_RGB
public boolean INTERPOLATE_ALPHA
public int m_drawFlags
Constructor Detail |
---|
public PTriangle(PGraphics3D g)
Method Detail |
---|
public void reset()
public void setCulling(boolean tf)
public void setVertices(float x0, float y0, float z0, float x1, float y1, float z1, float x2, float y2, float z2)
public void setCamVertices(float x0, float y0, float z0, float x1, float y1, float z1, float x2, float y2, float z2)
public void setUV(float u0, float v0, float u1, float v1, float u2, float v2)
public void setIntensities(float r0, float g0, float b0, float a0, float r1, float g1, float b1, float a1, float r2, float g2, float b2, float a2)
public void setTexture(PImage image)
public void setUV(float[] u, float[] v)
public void render()
public static void setInterpPower(int pwr)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |