|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.scenegraph.SceneGraphObject
org.xith3d.scenegraph.NodeComponent
org.xith3d.scenegraph.Material
public class Material
The Material object defines the appearance of an object under illumination. If the Material object in an Appearance object is null, lighting is disabled for all nodes that use that Appearance object. The properties that can be set for a Material object are:
| Field Summary | |
|---|---|
static org.jagatoo.opengl.enums.ColorTarget |
AMBIENT
|
static org.jagatoo.opengl.enums.ColorTarget |
AMBIENT_AND_DIFFUSE
|
static org.jagatoo.opengl.enums.ColorTarget |
DIFFUSE
|
static org.jagatoo.opengl.enums.ColorTarget |
EMISSIVE
|
static org.jagatoo.opengl.enums.ColorTarget |
NONE
|
static org.jagatoo.opengl.enums.ColorTarget |
SPECULAR
|
| Fields inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
XITH3D_USERDATAKEY_OLDUSERDATA |
| Constructor Summary | |
|---|---|
Material()
Constructs a new Material object. |
|
Material(boolean lightEnabled)
|
|
Material(boolean lightEnabled,
float shininess)
|
|
Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess)
Constructs a new Material object. |
|
Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess,
boolean lightingEnabled)
Constructs a new Material object. |
|
Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess,
org.jagatoo.opengl.enums.ColorTarget colorTarget,
boolean lightingEnabled)
Constructs a new Material object. |
|
Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess,
org.jagatoo.opengl.enums.ColorTarget colorTarget,
boolean normalizeNormals,
boolean lightingEnabled)
Constructs a new Material object. |
|
Material(float shininess)
|
|
| Method Summary | |
|---|---|
Material |
cloneNodeComponent(boolean forceDuplicate)
|
int |
compareTo(Material o)
|
protected void |
duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
|
boolean |
equals(java.lang.Object o)
|
void |
freeOpenGLResources(CanvasPeer canvasPeer)
This method frees OpenGL resources (names) for all this NodeComponent and all child-components. |
org.openmali.vecmath2.Colorf |
getAmbientColor()
|
void |
getAmbientColor(org.openmali.vecmath2.Colorf c)
|
org.jagatoo.opengl.enums.ColorTarget |
getColorTarget()
|
Material |
getCopy()
|
org.openmali.vecmath2.Colorf |
getDiffuseColor()
|
void |
getDiffuseColor(org.openmali.vecmath2.Colorf c)
|
org.openmali.vecmath2.Colorf |
getEmissiveColor()
|
void |
getEmissiveColor(org.openmali.vecmath2.Colorf c)
|
boolean |
getNormalizeNormals()
Retrieves the current value of normal normalization flag |
float |
getShininess()
|
org.openmali.vecmath2.Colorf |
getSpecularColor()
|
void |
getSpecularColor(org.openmali.vecmath2.Colorf c)
|
long |
getStateId()
|
StateNode |
getStateNode()
|
boolean |
isLightingEnabled()
|
void |
setAmbientColor(org.openmali.vecmath2.Colorf color)
Sets the ambient color value. |
void |
setAmbientColor(float r,
float g,
float b)
Sets the ambient color value. |
void |
setColorTarget(org.jagatoo.opengl.enums.ColorTarget colorTarget)
Sets the color target for per-vertex colors. |
void |
setDiffuseColor(org.openmali.vecmath2.Colorf color)
Sets the diffuse color value. |
void |
setDiffuseColor(float r,
float g,
float b)
Sets the diffuse color value. |
void |
setEmissiveColor(org.openmali.vecmath2.Colorf color)
Sets the emissive color value. |
void |
setEmissiveColor(float r,
float g,
float b)
|
void |
setLightingEnabled(boolean enabled)
Turns lighting on or off. |
void |
setNormalizeNormals(boolean normalizeNormals)
Sets flag indicating the normal vecrots should be normalized after transformations applied. |
void |
setShininess(float shininess)
Sets the shininess value. |
void |
setSpecularColor(org.openmali.vecmath2.Colorf color)
Sets the specular color value. |
void |
setSpecularColor(float r,
float g,
float b)
Sets the specular color value. |
void |
setStateNode(StateNode stateNode)
Used by the render engine to set the state id for the node. |
java.lang.String |
toString()
|
| Methods inherited from class org.xith3d.scenegraph.NodeComponent |
|---|
freeOpenGLResources, getDuplicateOnCloneTree, getModListener, isChanged, isChanged2, setChanged, setDuplicateOnCloneTree, setModListener |
| Methods inherited from class org.xith3d.scenegraph.SceneGraphObject |
|---|
getName, getUserData, getUserData, getUserDataMap, isLive, setLive, setName, setUserData, setUserData, setUserDataRecursive, setUserDataRecursive |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.jagatoo.opengl.enums.ColorTarget NONE
ColorTarget.NONEpublic static final org.jagatoo.opengl.enums.ColorTarget AMBIENT
ColorTarget.AMBIENTpublic static final org.jagatoo.opengl.enums.ColorTarget EMISSIVE
ColorTarget.EMISSIVEpublic static final org.jagatoo.opengl.enums.ColorTarget DIFFUSE
ColorTarget.DIFFUSEpublic static final org.jagatoo.opengl.enums.ColorTarget SPECULAR
ColorTarget.SPECULARpublic static final org.jagatoo.opengl.enums.ColorTarget AMBIENT_AND_DIFFUSE
ColorTarget.AMBIENT_AND_DIFFUSE| Constructor Detail |
|---|
public Material()
public Material(boolean lightEnabled)
public Material(boolean lightEnabled,
float shininess)
public Material(float shininess)
public Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess)
public Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess,
boolean lightingEnabled)
public Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess,
org.jagatoo.opengl.enums.ColorTarget colorTarget,
boolean lightingEnabled)
public Material(org.openmali.vecmath2.Colorf ambientColor,
org.openmali.vecmath2.Colorf emissiveColor,
org.openmali.vecmath2.Colorf diffuseColor,
org.openmali.vecmath2.Colorf specularColor,
float shininess,
org.jagatoo.opengl.enums.ColorTarget colorTarget,
boolean normalizeNormals,
boolean lightingEnabled)
| Method Detail |
|---|
public final void setAmbientColor(org.openmali.vecmath2.Colorf color)
public final void setAmbientColor(float r,
float g,
float b)
r - g - b - public final void getAmbientColor(org.openmali.vecmath2.Colorf c)
public final org.openmali.vecmath2.Colorf getAmbientColor()
public final void setEmissiveColor(org.openmali.vecmath2.Colorf color)
r - g - b -
public final void setEmissiveColor(float r,
float g,
float b)
public final void getEmissiveColor(org.openmali.vecmath2.Colorf c)
public final org.openmali.vecmath2.Colorf getEmissiveColor()
public final void setDiffuseColor(org.openmali.vecmath2.Colorf color)
public final void setDiffuseColor(float r,
float g,
float b)
r - g - b - public final void getDiffuseColor(org.openmali.vecmath2.Colorf c)
public final org.openmali.vecmath2.Colorf getDiffuseColor()
public final void setSpecularColor(org.openmali.vecmath2.Colorf color)
public final void setSpecularColor(float r,
float g,
float b)
r - g - b - public final void getSpecularColor(org.openmali.vecmath2.Colorf c)
public final org.openmali.vecmath2.Colorf getSpecularColor()
public final void setShininess(float shininess)
public final float getShininess()
public final void setColorTarget(org.jagatoo.opengl.enums.ColorTarget colorTarget)
colorTarget - public final org.jagatoo.opengl.enums.ColorTarget getColorTarget()
public final void setNormalizeNormals(boolean normalizeNormals)
normalizeNormals - New value for normal normalization flagpublic final boolean getNormalizeNormals()
public final void setLightingEnabled(boolean enabled)
public final boolean isLightingEnabled()
public final void setStateNode(StateNode stateNode)
setStateNode in interface StateTrackable<Material>stateNode - public final StateNode getStateNode()
getStateNode in interface StateTrackable<Material>public final long getStateId()
public Material getCopy()
getCopy in interface StateTrackable<Material>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(Material o)
compareTo in interface java.lang.Comparable<Material>
protected void duplicateNodeComponent(NodeComponent original,
boolean forceDuplicate)
duplicateNodeComponent in class NodeComponentpublic Material cloneNodeComponent(boolean forceDuplicate)
cloneNodeComponent in class NodeComponentpublic void freeOpenGLResources(CanvasPeer canvasPeer)
freeOpenGLResources in class NodeComponentpublic java.lang.String toString()
toString in class SceneGraphObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||