|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.media.j3d.IndexedObject
javax.media.j3d.SceneGraphObjectRetained
javax.media.j3d.NodeComponentRetained
javax.media.j3d.MaterialRetained
class MaterialRetained
The MaterialRetained object defines the appearance of an object under illumination.
Field Summary | |
---|---|
(package private) static int |
AMBIENT_COLOR_CHANGED
|
(package private) Color3f |
ambientColor
|
(package private) int |
colorTarget
|
(package private) static int |
COLORTARGET_CHANGED
|
(package private) static int |
DIFFUSE_COLOR_CHANGED
|
(package private) Color3f |
diffuseColor
|
(package private) static int |
EMISSIVE_COLOR_CHANGED
|
(package private) Color3f |
emissiveColor
|
(package private) static int |
ENABLE_CHANGED
|
(package private) boolean |
lightingEnable
|
(package private) float |
shininess
|
(package private) static int |
SHININESS_CHANGED
|
(package private) static int |
SPECULAR_COLOR_CHANGED
|
(package private) Color3f |
specularColor
|
Fields inherited from class javax.media.j3d.NodeComponentRetained |
---|
changedFrequent, compChanged, duplicateOnCloneTree, mirror, refCnt, refCount, users |
Fields inherited from class javax.media.j3d.SceneGraphObjectRetained |
---|
DONT_MERGE, inBackgroundGroup, inSetLive, MERGE, MERGE_DONE, mergeFlag, onUpdateList, source |
Fields inherited from class javax.media.j3d.IndexedObject |
---|
listIdx |
Constructor Summary | |
---|---|
MaterialRetained()
|
Method Summary | |
---|---|
protected java.lang.Object |
clone()
|
(package private) void |
createMaterial(Color3f aColor,
Color3f eColor,
Color3f dColor,
Color3f sColor,
float shine)
Constructs and initializes a new material object using the specified parameters. |
(package private) void |
createMirrorObject()
|
(package private) boolean |
equivalent(MaterialRetained m)
|
(package private) void |
getAmbientColor(Color3f color)
Retrieves this material's ambient color. |
(package private) int |
getColorTarget()
|
(package private) void |
getDiffuseColor(Color3f color)
Retrieves this material's diffuse color. |
(package private) void |
getEmissiveColor(Color3f color)
Retrieves this material's emissive color and stores it in the argument provided. |
(package private) boolean |
getLightingEnable()
Retrieves the state of the lighting enable flag. |
(package private) float |
getShininess()
Retrieves this material's shininess. |
(package private) void |
getSpecularColor(Color3f color)
Retrieves this material's specular color. |
(package private) void |
handleFrequencyChange(int bit)
|
(package private) void |
initAmbientColor(Color3f color)
Initializes this material's ambient color This specifies how much ambient light is reflected by the surface. |
(package private) void |
initAmbientColor(float r,
float g,
float b)
Sets this material's ambient color |
(package private) void |
initColorTarget(int colorTarget)
|
(package private) void |
initDiffuseColor(Color3f color)
Sets this material's diffuse color. |
(package private) void |
initDiffuseColor(float r,
float g,
float b)
Sets this material's diffuse color. |
(package private) void |
initDiffuseColor(float r,
float g,
float b,
float a)
Sets this material's diffuse color plus alpha. |
(package private) void |
initEmissiveColor(Color3f color)
Sets this material's emissive color This is the color of light, if any, that the material emits. |
(package private) void |
initEmissiveColor(float r,
float g,
float b)
Sets this material's emissive color. |
(package private) void |
initLightingEnable(boolean state)
Enables or disables lighting for this appearance component object. |
(package private) void |
initMirrorObject()
Creates a mirror object, point the mirror object to the retained object if the object is not editable |
(package private) void |
initShininess(float shininess)
Sets this material's shininess. |
(package private) void |
initSpecularColor(Color3f color)
Sets this material's specular color. |
(package private) void |
initSpecularColor(float r,
float g,
float b)
Sets this material's specular color. |
(package private) void |
sendMessage(int attrMask,
java.lang.Object attr)
|
protected void |
set(MaterialRetained mat)
|
(package private) void |
setAmbientColor(Color3f color)
Sets this material's ambient color and sends a message notifying the interested structures of the change. |
(package private) void |
setAmbientColor(float r,
float g,
float b)
Sets this material's ambient color and sends a message notifying the interested structures of the change. |
(package private) void |
setColorTarget(int colorTarget)
|
(package private) void |
setDiffuseColor(Color3f color)
Sets this material's diffuse color and sends a message notifying the interested structures of the change. |
(package private) void |
setDiffuseColor(float r,
float g,
float b)
Sets this material's diffuse color and sends a message notifying the interested structures of the change. |
(package private) void |
setDiffuseColor(float r,
float g,
float b,
float a)
Sets this material's diffuse color plus alpha and sends a message notifying the interested structures of the change. |
(package private) void |
setEmissiveColor(Color3f color)
Sets this material's emissive color and sends a message notifying the interested structures of the change. |
(package private) void |
setEmissiveColor(float r,
float g,
float b)
Sets this material's emissive color and sends a message notifying the interested structures of the change. |
(package private) void |
setLightingEnable(boolean state)
Enables or disables lighting for this appearance component object and sends a message notifying the interested structures of the change. |
(package private) void |
setShininess(float shininess)
Sets this material's shininess and sends a message notifying the interested structures of the change. |
(package private) void |
setSpecularColor(Color3f color)
Sets this material's specular color and sends a message notifying the interested structures of the change. |
(package private) void |
setSpecularColor(float r,
float g,
float b)
Sets this material's specular color and sends a message notifying the interested structures of the change. |
(package private) void |
updateMirrorObject(int component,
java.lang.Object value)
Update the "component" field of the mirror object with the given "value" |
(package private) void |
updateNative(Context ctx,
float red,
float green,
float blue,
float alpha,
boolean enableLighting)
Updates the native context. |
Methods inherited from class javax.media.j3d.NodeComponentRetained |
---|
addAMirrorUser, addUser, clearLive, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx, setLive |
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained |
---|
clearLive, clearLive, compile, doSetLive, doSetLive, getSource, getVirtualUniverse, isInSetLive, isStatic, markAsLive, merge, mergeTransform, setCompiled, setLive, setLive, setSource, traverse |
Methods inherited from class javax.media.j3d.IndexedObject |
---|
getIdxUsed, incIdxUsed |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Color3f ambientColor
Color3f emissiveColor
Color3f diffuseColor
Color3f specularColor
float shininess
int colorTarget
boolean lightingEnable
static final int AMBIENT_COLOR_CHANGED
static final int EMISSIVE_COLOR_CHANGED
static final int DIFFUSE_COLOR_CHANGED
static final int SPECULAR_COLOR_CHANGED
static final int SHININESS_CHANGED
static final int ENABLE_CHANGED
static final int COLORTARGET_CHANGED
Constructor Detail |
---|
MaterialRetained()
Method Detail |
---|
void createMaterial(Color3f aColor, Color3f eColor, Color3f dColor, Color3f sColor, float shine)
ambientColor
- the material's ambient coloremissiveColor
- the material's emissive colordiffuseColor
- the material's diffuse color when illuminated by a
lightspecularColor
- the material's specular color when illuminated
to generate a highlightshininess
- the material's shininess in the
range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shinyfinal void initAmbientColor(Color3f color)
color
- the material's ambient colorfinal void setAmbientColor(Color3f color)
color
- the material's ambient colorfinal void initAmbientColor(float r, float g, float b)
r
- the new ambient color's red componentg
- the new ambient color's green componentb
- the new ambient color's blue componentfinal void setAmbientColor(float r, float g, float b)
r
- the new ambient color's red componentg
- the new ambient color's green componentb
- the new ambient color's blue componentfinal void getAmbientColor(Color3f color)
final void initEmissiveColor(Color3f color)
color
- the new emissive colorfinal void setEmissiveColor(Color3f color)
color
- the new emissive colorfinal void initEmissiveColor(float r, float g, float b)
r
- the new emissive color's red componentg
- the new emissive color's green componentb
- the new emissive color's blue componentfinal void setEmissiveColor(float r, float g, float b)
r
- the new emissive color's red componentg
- the new emissive color's green componentb
- the new emissive color's blue componentfinal void getEmissiveColor(Color3f color)
color
- the vector that will receive this material's emissive colorfinal void initDiffuseColor(Color3f color)
color
- the new diffuse colorfinal void setDiffuseColor(Color3f color)
color
- the new diffuse colorfinal void initDiffuseColor(float r, float g, float b)
r
- the new diffuse color's red componentg
- the new diffuse color's green componentb
- the new diffuse color's blue componentfinal void setDiffuseColor(float r, float g, float b)
r
- the new diffuse color's red componentg
- the new diffuse color's green componentb
- the new diffuse color's blue componentfinal void initDiffuseColor(float r, float g, float b, float a)
r
- the new diffuse color's red componentg
- the new diffuse color's green componentb
- the new diffuse color's blue componenta
- the alpha component used to set transparencyfinal void setDiffuseColor(float r, float g, float b, float a)
r
- the new diffuse color's red componentg
- the new diffuse color's green componentb
- the new diffuse color's blue componenta
- the alpha component used to set transparencyfinal void getDiffuseColor(Color3f color)
color
- the vector that will receive this material's diffuse colorfinal void initSpecularColor(Color3f color)
color
- the new specular colorfinal void setSpecularColor(Color3f color)
color
- the new specular colorfinal void initSpecularColor(float r, float g, float b)
r
- the new specular color's red componentg
- the new specular color's green componentb
- the new specular color's blue componentfinal void setSpecularColor(float r, float g, float b)
r
- the new specular color's red componentg
- the new specular color's green componentb
- the new specular color's blue componentfinal void getSpecularColor(Color3f color)
color
- the vector that will receive this material's specular colorfinal void initShininess(float shininess)
shininess
- the material's shininessfinal void setShininess(float shininess)
shininess
- the material's shininessfinal float getShininess()
void initLightingEnable(boolean state)
state
- true or false to enable or disable lightingvoid setLightingEnable(boolean state)
state
- true or false to enable or disable lightingboolean getLightingEnable()
void initColorTarget(int colorTarget)
final void setColorTarget(int colorTarget)
final int getColorTarget()
void createMirrorObject()
createMirrorObject
in class NodeComponentRetained
void updateNative(Context ctx, float red, float green, float blue, float alpha, boolean enableLighting)
void initMirrorObject()
initMirrorObject
in class NodeComponentRetained
void updateMirrorObject(int component, java.lang.Object value)
updateMirrorObject
in class NodeComponentRetained
boolean equivalent(MaterialRetained m)
protected java.lang.Object clone()
clone
in class NodeComponentRetained
protected void set(MaterialRetained mat)
final void sendMessage(int attrMask, java.lang.Object attr)
void handleFrequencyChange(int bit)
handleFrequencyChange
in class SceneGraphObjectRetained
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |