public class Material
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Material |
BLACK |
static Material |
BLUE |
static Material |
CYAN |
static Material |
DARK_GRAY |
static Material |
GRAY |
static Material |
GREEN |
static Material |
LIGHT_GRAY |
static Material |
MAGENTA |
static Material |
ORANGE |
static Material |
PINK |
static Material |
RED |
static Material |
WHITE |
static Material |
YELLOW |
Constructor and Description |
---|
Material(java.awt.Color color) |
Material(java.awt.Color specular,
java.awt.Color diffuse,
java.awt.Color ambient,
java.awt.Color emission,
float shininess) |
Material(java.awt.Color color,
float shininess) |
Modifier and Type | Method and Description |
---|---|
void |
apply(GL2 gl,
int face) |
void |
apply(GL2 gl,
int face,
float alpha) |
boolean |
equals(java.lang.Object o) |
java.awt.Color |
getAmbient() |
java.awt.Color |
getDiffuse() |
java.awt.Color |
getEmission() |
void |
getRestorableState(RestorableSupport rs,
RestorableSupport.StateObject so) |
double |
getShininess() |
java.awt.Color |
getSpecular() |
protected void |
glMaterial(GL2 gl,
int face,
int name,
java.awt.Color color) |
protected void |
glMaterial(GL2 gl,
int face,
int name,
java.awt.Color color,
float alpha) |
int |
hashCode() |
protected java.awt.Color |
makeDarker(java.awt.Color color) |
Material |
restoreState(RestorableSupport rs,
RestorableSupport.StateObject so) |
public static final Material BLACK
public static final Material BLUE
public static final Material CYAN
public static final Material DARK_GRAY
public static final Material GRAY
public static final Material GREEN
public static final Material LIGHT_GRAY
public static final Material MAGENTA
public static final Material ORANGE
public static final Material PINK
public static final Material RED
public static final Material WHITE
public static final Material YELLOW
public Material(java.awt.Color color)
public Material(java.awt.Color specular, java.awt.Color diffuse, java.awt.Color ambient, java.awt.Color emission, float shininess)
public Material(java.awt.Color color, float shininess)
public void apply(GL2 gl, int face)
public void apply(GL2 gl, int face, float alpha)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final java.awt.Color getAmbient()
public final java.awt.Color getDiffuse()
public final java.awt.Color getEmission()
public void getRestorableState(RestorableSupport rs, RestorableSupport.StateObject so)
public final double getShininess()
public final java.awt.Color getSpecular()
protected void glMaterial(GL2 gl, int face, int name, java.awt.Color color)
protected void glMaterial(GL2 gl, int face, int name, java.awt.Color color, float alpha)
public int hashCode()
hashCode
in class java.lang.Object
protected java.awt.Color makeDarker(java.awt.Color color)
public Material restoreState(RestorableSupport rs, RestorableSupport.StateObject so)