javax.media.j3d
Class ShaderAppearanceRetained

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.AppearanceRetained
                  extended by javax.media.j3d.ShaderAppearanceRetained
All Implemented Interfaces:
java.lang.Cloneable

 class ShaderAppearanceRetained
extends AppearanceRetained

The Appearance object defines all rendering state that can be set as a component object of a Shape3D node.


Field Summary
protected  boolean isMirror
           
(package private) static int SHADER_ATTRIBUTE_SET
           
(package private) static int SHADER_PROGRAM
           
protected  ShaderAttributeSetRetained shaderAttributeSet
           
protected  ShaderProgramRetained shaderProgram
           
 
Fields inherited from class javax.media.j3d.AppearanceRetained
ALL_SOLE_USERS, COLOR, coloringAttributes, LINE, lineAttributes, liveStateLock, map, mapAppearance, material, MATERIAL, POINT, pointAttributes, POLYGON, polygonAttributes, RENDERING, renderingAttributes, sgApp, TEXCOORD_GEN, texCoordGeneration, texture, TEXTURE, TEXTURE_ATTR, TEXTURE_UNIT_STATE, textureAttributes, texUnitState, TRANSPARENCY, transparencyAttributes
 
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
ShaderAppearanceRetained()
           
 
Method Summary
(package private)  void addAMirrorUser(Shape3DRetained shape)
           
(package private)  void clearLive(int refCount)
          This clearLive routine first calls the superclass's method, then it removes itself to the list of lights
(package private)  void compile(CompileState compState)
          This is the default compile() method, which just marks the sgo as compiled.
(package private)  void createMirrorObject()
           
(package private)  void doSetLive(boolean backgroundGroup, int refCount)
          This method calls the setLive method of all appearance bundle objects.
 boolean equals(java.lang.Object obj)
           
(package private)  boolean equals(ShaderAppearanceRetained sApp)
           
(package private)  ShaderAttributeSet getShaderAttributeSet()
          Retrieves the current ShaderAttributeSet object.
(package private)  ShaderProgram getShaderProgram()
          Retrieves the current shader program object.
(package private)  void handleFrequencyChange(int bit)
           
(package private)  void initMirrorObject()
          This routine updates the mirror appearance for this appearance.
(package private)  boolean isOpaque(int geoType)
           
(package private)  boolean isStatic()
          true if component can't be read or written after compile or setlive()
(package private)  void removeAMirrorUser(Shape3DRetained shape)
           
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
(package private)  void setShaderAttributeSet(ShaderAttributeSet sas)
          Sets the ShaderAttributeSet object to the specified object.
(package private)  void setShaderProgram(ShaderProgram sp)
          Set the shader program object to the specified object.
(package private)  void updateMirrorObject(int component, java.lang.Object value)
          Update the "component" field of the mirror object with the given "value"
 
Methods inherited from class javax.media.j3d.AppearanceRetained
equals, getColoringAttributes, getLineAttributes, getMaterial, getPointAttributes, getPolygonAttributes, getRenderingAttributes, getTexCoordGeneration, getTexture, getTextureAttributes, getTextureUnitCount, getTextureUnitState, getTextureUnitState, getTransparencyAttributes, hashCode, sendMessage, sendRenderingAttributesChangedMessage, setColoringAttributes, setLineAttributes, setLive, setMaterial, setPointAttributes, setPolygonAttributes, setRenderingAttributes, setTexCoordGeneration, setTexture, setTextureAttributes, setTextureUnitState, setTextureUnitState, setTransparencyAttributes
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addUser, clone, copyMirrorUsers, decRefCnt, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, setFrequencyChangeMask, setInImmCtx
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, doSetLive, doSetLive, getSource, getVirtualUniverse, isInSetLive, 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
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHADER_PROGRAM

static final int SHADER_PROGRAM
See Also:
Constant Field Values

SHADER_ATTRIBUTE_SET

static final int SHADER_ATTRIBUTE_SET
See Also:
Constant Field Values

shaderProgram

protected ShaderProgramRetained shaderProgram

shaderAttributeSet

protected ShaderAttributeSetRetained shaderAttributeSet

isMirror

protected boolean isMirror
Constructor Detail

ShaderAppearanceRetained

ShaderAppearanceRetained()
Method Detail

setShaderProgram

void setShaderProgram(ShaderProgram sp)
Set the shader program object to the specified object.

Parameters:
shaderProgram - object that specifies the desired shader program and shader program attributes.

getShaderProgram

ShaderProgram getShaderProgram()
Retrieves the current shader program object.

Returns:
current shader program object

setShaderAttributeSet

void setShaderAttributeSet(ShaderAttributeSet sas)
Sets the ShaderAttributeSet object to the specified object. Setting it to null is equivalent to specifying an empty set of attributes.

Parameters:
shaderAttributeSet - object that specifies the desired shader attributes

getShaderAttributeSet

ShaderAttributeSet getShaderAttributeSet()
Retrieves the current ShaderAttributeSet object.

Returns:
current ShaderAttributeSet object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AppearanceRetained

equals

boolean equals(ShaderAppearanceRetained sApp)

createMirrorObject

void createMirrorObject()
Overrides:
createMirrorObject in class AppearanceRetained

initMirrorObject

void initMirrorObject()
This routine updates the mirror appearance for this appearance. It also calls the update method for each node component if it is not null.

Overrides:
initMirrorObject in class AppearanceRetained

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 AppearanceRetained

doSetLive

void doSetLive(boolean backgroundGroup,
               int refCount)
This method calls the setLive method of all appearance bundle objects.

Overrides:
doSetLive in class AppearanceRetained

clearLive

void clearLive(int refCount)
This clearLive routine first calls the superclass's method, then it removes itself to the list of lights

Overrides:
clearLive in class AppearanceRetained

addAMirrorUser

void addAMirrorUser(Shape3DRetained shape)
Overrides:
addAMirrorUser in class AppearanceRetained

removeAMirrorUser

void removeAMirrorUser(Shape3DRetained shape)
Overrides:
removeAMirrorUser in class AppearanceRetained

sendMessage

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

isStatic

boolean isStatic()
Description copied from class: SceneGraphObjectRetained
true if component can't be read or written after compile or setlive()

Overrides:
isStatic in class AppearanceRetained

compile

void compile(CompileState compState)
Description copied from class: SceneGraphObjectRetained
This is the default compile() method, which just marks the sgo as compiled.

Overrides:
compile in class AppearanceRetained

isOpaque

boolean isOpaque(int geoType)
Overrides:
isOpaque in class AppearanceRetained

handleFrequencyChange

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


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