public class Material
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
BLACK |
static int |
BLUE |
static int |
CYAN |
static float[] |
default_diffuse |
static float[] |
default_emission |
static float[] |
default_power |
static float[] |
default_specular |
static int |
GOLD |
static int |
GRAY |
static int |
GREEN |
static int |
MAGENTA |
static int |
RED |
static int |
SILVER |
static int |
WHITE |
static int |
YELLOW |
Constructor and Description |
---|
Material() |
Material(java.awt.Color diff,
java.awt.Color spec,
java.awt.Color em,
float shin) |
Material(float[] diff,
float[] spec,
float[] em,
float shin) |
Material(Material mat) |
Modifier and Type | Method and Description |
---|---|
static Material |
createDiffuse(java.awt.Color c,
float shine) |
static Material |
createDiffuse(java.awt.Color c,
float alpha,
float shine) |
static Material |
createDiffuse(float[] rgba,
float shine) |
static Material |
createDiffuse(float[] rgb,
float alpha,
float shine) |
static Material |
createDiffuse(float r,
float g,
float b,
float a,
float shine) |
static Material |
createSpecial(int code) |
boolean |
equal(Material mat)
Returns true if this material is exactly equal to another material.
|
float |
getAlpha() |
float |
getAmbientPower() |
float[] |
getDiffuse() |
void |
getDiffuse(float[] diff) |
float |
getDiffusePower() |
float[] |
getEmission() |
void |
getEmission(float[] em) |
float |
getEmissionPower() |
float[] |
getPower() |
void |
getPower(float[] p) |
float |
getShininess() |
float[] |
getSpecular() |
void |
getSpecular(float[] spec) |
float |
getSpecularPower() |
boolean |
isTransparent() |
void |
set(java.awt.Color diff,
java.awt.Color spec,
java.awt.Color em,
float shin) |
void |
set(float[] diff,
float[] spec,
float[] em,
float shin) |
void |
set(Material mat) |
void |
setAlpha(double a) |
void |
setAmbientPower(float a) |
void |
setDiffuse(java.awt.Color c) |
void |
setDiffuse(float[] diff) |
void |
setDiffuse(float r,
float g,
float b,
float a) |
void |
setDiffusePower(float d) |
void |
setEmission(java.awt.Color c) |
void |
setEmission(float[] em) |
void |
setEmission(float r,
float g,
float b) |
void |
setEmissionPower(float e) |
void |
setPower(float[] p) |
void |
setShininess(float s) |
void |
setSpecular(java.awt.Color c) |
void |
setSpecular(float[] spec) |
void |
setSpecular(float r,
float g,
float b) |
void |
setSpecularPower(float s) |
java.lang.String |
toString() |
public static final float[] default_specular
public static final float[] default_diffuse
public static final float[] default_emission
public static final float[] default_power
public static final int BLACK
public static final int WHITE
public static final int RED
public static final int BLUE
public static final int GREEN
public static final int CYAN
public static final int MAGENTA
public static final int YELLOW
public static final int GOLD
public static final int GRAY
public static final int SILVER
public Material()
public Material(Material mat)
public Material(float[] diff, float[] spec, float[] em, float shin)
public Material(java.awt.Color diff, java.awt.Color spec, java.awt.Color em, float shin)
public void set(float[] diff, float[] spec, float[] em, float shin)
public void set(java.awt.Color diff, java.awt.Color spec, java.awt.Color em, float shin)
public void set(Material mat)
public void setShininess(float s)
public float getShininess()
public void setSpecular(float r, float g, float b)
public void setSpecular(java.awt.Color c)
public void setSpecular(float[] spec)
public void getSpecular(float[] spec)
public float[] getSpecular()
public void setDiffuse(float r, float g, float b, float a)
public void setDiffuse(java.awt.Color c)
public void setDiffuse(float[] diff)
public void getDiffuse(float[] diff)
public float[] getDiffuse()
public void setEmission(float r, float g, float b)
public void setEmission(java.awt.Color c)
public void setEmission(float[] em)
public void getEmission(float[] em)
public float[] getEmission()
public void setPower(float[] p)
public void getPower(float[] p)
public float[] getPower()
public void setAmbientPower(float a)
public float getAmbientPower()
public void setDiffusePower(float d)
public float getDiffusePower()
public void setSpecularPower(float s)
public float getSpecularPower()
public void setEmissionPower(float e)
public float getEmissionPower()
public java.lang.String toString()
toString
in class java.lang.Object
public void setAlpha(double a)
public float getAlpha()
public boolean isTransparent()
public static Material createDiffuse(float r, float g, float b, float a, float shine)
public static Material createDiffuse(float[] rgba, float shine)
public static Material createDiffuse(float[] rgb, float alpha, float shine)
public static Material createDiffuse(java.awt.Color c, float shine)
public static Material createDiffuse(java.awt.Color c, float alpha, float shine)
public static Material createSpecial(int code)
public boolean equal(Material mat)
mat
- material to compare to