javax.media.j3d
Class ColoringAttributesRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeComponentRetained
              extended by javax.media.j3d.ColoringAttributesRetained
All Implemented Interfaces:
java.lang.Cloneable

 class ColoringAttributesRetained
extends NodeComponentRetained

The ColoringAttributesRetained object defines attributes that apply to to coloring mapping.


Field Summary
(package private)  Color3f color
           
(package private) static int COLOR_CHANGED
           
(package private) static int SHADE_MODEL_CHANGED
           
(package private)  int shadeModel
           
 
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
ColoringAttributesRetained()
           
 
Method Summary
protected  java.lang.Object clone()
           
(package private)  void createMirrorObject()
          Creates and initializes a mirror object, point the mirror object to the retained object if the object is not editable
(package private)  boolean equivalent(ColoringAttributesRetained cr)
           
(package private)  void getColor(Color3f color)
          Gets the intrinsic color of this ColoringAttributes component object.
(package private)  int getShadeModel()
          Gets the shade mode for this ColoringAttributes component object.
(package private)  void handleFrequencyChange(int bit)
           
(package private)  void initColor(Color3f color)
          Sets the intrinsic color of this ColoringAttributes component object.
(package private)  void initColor(float r, float g, float b)
          Sets the intrinsic color of this ColoringAttributes 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 initShadeModel(int shadeModel)
          Sets the shade mode for this ColoringAttributes component object.
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
protected  void set(ColoringAttributesRetained cr)
           
(package private)  void setColor(Color3f color)
          Sets the intrinsic color of this ColoringAttributes component object and sends a message notifying the interested structures of the change.
(package private)  void setColor(float r, float g, float b)
          Sets the intrinsic color of this ColoringAttributes component object and sends a message notifying the interested structures of the change.
(package private)  void setShadeModel(int shadeModel)
          Sets the shade mode for this ColoringAttributes component object 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 dRed, float dGreen, float dBlue, float alpha, boolean lEnable)
           
 
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

COLOR_CHANGED

static final int COLOR_CHANGED
See Also:
Constant Field Values

SHADE_MODEL_CHANGED

static final int SHADE_MODEL_CHANGED
See Also:
Constant Field Values

color

Color3f color

shadeModel

int shadeModel
Constructor Detail

ColoringAttributesRetained

ColoringAttributesRetained()
Method Detail

initColor

final void initColor(Color3f color)
Sets the intrinsic color of this ColoringAttributes component object.

Parameters:
color - the color that is used when lighting is disabled or when material is null

setColor

final void setColor(Color3f color)
Sets the intrinsic color of this ColoringAttributes component object and sends a message notifying the interested structures of the change.

Parameters:
color - the color that is used when lighting is disabled or when material is null

initColor

final void initColor(float r,
                     float g,
                     float b)
Sets the intrinsic color of this ColoringAttributes component object. This color is used when lighting is disabled or when material is null.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color

setColor

final void setColor(float r,
                    float g,
                    float b)
Sets the intrinsic color of this ColoringAttributes component object and sends a message notifying the interested structures of the change. This color is used when lighting is disabled or when material is null.

Parameters:
r - the red component of the color
g - the green component of the color
b - the blue component of the color

getColor

final void getColor(Color3f color)
Gets the intrinsic color of this ColoringAttributes component object.

Parameters:
color - the vector that will receive color

initShadeModel

final void initShadeModel(int shadeModel)
Sets the shade mode for this ColoringAttributes component object.

Parameters:
shadeModel - the shade mode to be used; one of FASTEST, NICEST, SHADE_FLAT, or SHADE_GOURAUD

setShadeModel

final void setShadeModel(int shadeModel)
Sets the shade mode for this ColoringAttributes component object and sends a message notifying the interested structures of the change.

Parameters:
shadeModel - the shade mode to be used; one of FASTEST, NICEST, SHADE_FLAT, or SHADE_GOURAUD

getShadeModel

final int getShadeModel()
Gets the shade mode for this ColoringAttributes component object.

Returns:
shadeModel the shade mode

createMirrorObject

void createMirrorObject()
Creates and initializes a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
createMirrorObject in class NodeComponentRetained

updateNative

void updateNative(Context ctx,
                  float dRed,
                  float dGreen,
                  float dBlue,
                  float alpha,
                  boolean lEnable)

initMirrorObject

void initMirrorObject()
Creates a mirror object, point the mirror object to the retained object if the object is not editable

Overrides:
initMirrorObject in class NodeComponentRetained

updateMirrorObject

void updateMirrorObject(int component,
                        java.lang.Object value)
Update the "component" field of the mirror object with the given "value"

Overrides:
updateMirrorObject in class NodeComponentRetained

equivalent

boolean equivalent(ColoringAttributesRetained cr)

clone

protected java.lang.Object clone()
Overrides:
clone in class NodeComponentRetained

set

protected void set(ColoringAttributesRetained cr)

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr)

handleFrequencyChange

void handleFrequencyChange(int bit)
Overrides:
handleFrequencyChange in class SceneGraphObjectRetained


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.