Class OGLMaterial
java.lang.Object
com.blackrook.gloop.opengl.gl1.OGLMaterial
Material attribute for drawing geometry that interacts with light.
- Author:
- Matthew Tropiano
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterialstatic final OGLMaterial -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new material.OGLMaterial(Color ambient, Color diffuse, Color specular, Color emissive, float shine) Creates a new material. -
Method Summary
Modifier and TypeMethodDescriptionfloatvoidsetAmbientColor(float red, float green, float blue, float alpha) Set up this material's ambient color.voidsetAmbientColor(Color ambient) Set up this material's ambient color.voidsetDiffuseColor(float red, float green, float blue, float alpha) Set up this material's diffuse color.voidsetDiffuseColor(Color diffuse) Set up this material's diffuse color.voidsetEmissionColor(float red, float green, float blue, float alpha) Set up this material's emission color.voidsetEmissionColor(Color emission) Set up this material's emission color.voidsetShininess(float shine) Set this material's shininess.voidsetSpecularColor(float red, float green, float blue, float alpha) Set up this material's specular color.voidsetSpecularColor(Color specular) Set up this material's specular color.
-
Field Details
-
DEFAULT
-
BRASS
-
BRONZE
-
POLISHED_BRONZE
-
CHROME
-
COPPER
-
POLISHED_COPPER
-
GOLD
-
POLISHED_GOLD
-
PEWTER
-
SILVER
-
POLISHED_SILVER
-
EMERALD
-
JADE
-
OBSIDIAN
-
PEARL
-
RUBY
-
TURQUOISE
-
BLACK_PLASTIC
-
BLACK_RUBBER
-
-
Constructor Details
-
OGLMaterial
public OGLMaterial()Creates a new material. -
OGLMaterial
Creates a new material.- Parameters:
ambient- the material's ambient color.diffuse- the material's diffuse color.specular- the material's specular color.emissive- the material's emissive color.shine- the shininess factor.
-
-
Method Details
-
setAmbientColor
Set up this material's ambient color.- Parameters:
ambient- the material's ambient color.
-
setAmbientColor
public void setAmbientColor(float red, float green, float blue, float alpha) Set up this material's ambient color.- Parameters:
red- the material's ambient color, red component.green- the material's ambient color, green component.blue- the material's ambient color, blue component.alpha- the material's ambient color, alpha component.
-
setDiffuseColor
Set up this material's diffuse color.- Parameters:
diffuse- the material's diffuse color.
-
setDiffuseColor
public void setDiffuseColor(float red, float green, float blue, float alpha) Set up this material's diffuse color.- Parameters:
red- the material's ambient color, red component.green- the material's ambient color, green component.blue- the material's ambient color, blue component.alpha- the material's ambient color, alpha component.
-
setSpecularColor
Set up this material's specular color.- Parameters:
specular- the material's specular color.
-
setSpecularColor
public void setSpecularColor(float red, float green, float blue, float alpha) Set up this material's specular color.- Parameters:
red- the material's ambient color, red component.green- the material's ambient color, green component.blue- the material's ambient color, blue component.alpha- the material's ambient color, alpha component.
-
setEmissionColor
Set up this material's emission color.- Parameters:
emission- the material's emission color.
-
setEmissionColor
public void setEmissionColor(float red, float green, float blue, float alpha) Set up this material's emission color.- Parameters:
red- the material's ambient color, red component.green- the material's ambient color, green component.blue- the material's ambient color, blue component.alpha- the material's ambient color, alpha component.
-
setShininess
public void setShininess(float shine) Set this material's shininess.- Parameters:
shine- the shininess factor.
-
getAmbientColor
- Returns:
- this material's ambient color.
-
getDiffuseColor
- Returns:
- this material's diffuse color.
-
getSpecularColor
- Returns:
- this material's specular color.
-
getEmissionColor
- Returns:
- this material's emissive color.
-
getShininess
public float getShininess()- Returns:
- this material's shininess factor.
-