Pj3d
Pj3dShader

Shader methods that can be applied to the world, Pj3d primitives and objects.

Usage:
object.shader.method

Returns:
Nothing

Example:
Pj3dBox box = new Pj3dBox(p, 20);
box.shader.setAlpha(80);

Download: Pj3dShader.pde

Methods:
setAmbient(int r, int g, int b);
Set the Ambient color to the given values.

getAmbient();
Get the Ambient color
returns: color

getAmbientR();
Get the Ambient Red color as int
returns: int

getAmbientG();
Get the Ambient Green color as int
returns: int

getAmbientB();
Get the Ambient Blue color as int
returns: int

setDiffuse(int r, int g, int b);
Set the Diffues color to the given values.

getDiffuse();
Get the Diffuse color
returns: color

getDiffuseR();
Get the Diffuse Red color as int
returns: int

getDiffuseG();
Get the Diffuse Green color as int
returns: int

getDiffuseB();
Get the Diffuse Blue color as int
returns: int

setEmissive(int r, int g, int b);
Set the Emissive color to the given values.

getEmissive();
Get the Emissive color
returns: color

getEmissiveR();
Get the Emissive Red color as int
returns: int

getEmissiveG();
Get the Emissive Green color as int
returns: int

getEmissiveB();
Get the Emissive Blue color as int
returns: int

setSpecular(int r, int g, int b);
Set the Specular color to the given values.

getSpecular();
Get the Specular color
returns: color

getSpecularR();
Get the Specular Red color as int
returns: int

getSpecularG();
Get the Specular Green color as int
returns: int

getSpecularB();
Get the Specular Blue color as int
returns: int

setColor(int r, int g, int b);
Set the Color to the given values.

setShininess(int s);
Set the Shininess to the given values.

getShininess();
Get the Shininess as int
returns: int

setAlpha(int s);
Set the Alpha to the given values.

getAlpha();
Get the Alpha as int
returns: int

setTexture(String fileLocation);
Set a Texture to the object. Needs a absolute path to the Texture.

setRenderstyle(String renderstyle);
Set the Renderstyle of the object. There are three Renderstyles: "FILL", "LINE", "POINT".

setCulling(String renderstyle);
Set the Culling mode of the object. There are three Cullings: "BACK", "FRONT", "NONE".


<- back
Pj3dShader