javax.media.j3d
Class ShaderAttributeArrayRetained

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

 class ShaderAttributeArrayRetained
extends ShaderAttributeObjectRetained

The ShaderAttributeArray object encapsulates a uniform shader attribute whose value is specified explicitly.


Nested Class Summary
(package private) static class ShaderAttributeArrayRetained.ArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.FloatArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.IntegerArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Matrix3fArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Matrix4fArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Tuple2fArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Tuple2iArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Tuple3fArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Tuple3iArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Tuple4fArrayWrapper
           
(package private) static class ShaderAttributeArrayRetained.Tuple4iArrayWrapper
           
 
Nested classes/interfaces inherited from class javax.media.j3d.ShaderAttributeObjectRetained
ShaderAttributeObjectRetained.AttrWrapper
 
Field Summary
 
Fields inherited from class javax.media.j3d.ShaderAttributeObjectRetained
attrWrapper, classTable, classTableArr, TYPE_FLOAT, TYPE_INTEGER, TYPE_MATRIX3F, TYPE_MATRIX4F, TYPE_TUPLE2F, TYPE_TUPLE2I, TYPE_TUPLE3F, TYPE_TUPLE3I, TYPE_TUPLE4F, TYPE_TUPLE4I
 
Fields inherited from class javax.media.j3d.ShaderAttributeRetained
attrName
 
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
ShaderAttributeArrayRetained()
           
 
Method Summary
(package private)  int computeClassType(java.lang.Object value)
          Computes the base class from the specified object.
(package private)  ShaderAttributeObjectRetained.AttrWrapper createAttrWrapper(java.lang.Object value, int classType)
          Creates an attribute wrapper object of the specified class type, and stores the specified array of objects.
(package private)  void createMirrorObject()
           
(package private)  java.lang.Class getBaseClass(int classType)
          Returns the base class represented by the specified class type.
(package private)  void initValue(int index, java.lang.Object value)
           
(package private)  int length()
          Returns the number of elements in the value array.
(package private)  void setValue(int index, java.lang.Object value)
          Sets the specified array element of the value of this shader attribute to the specified value.
 
Methods inherited from class javax.media.j3d.ShaderAttributeObjectRetained
createObjectData, getClassType, getValue, getValueClass, handleFrequencyChange, initMirrorObject, initValue, sendMessage, setClassType, setFrequencyChangeMask, setValue, updateMirrorObject
 
Methods inherited from class javax.media.j3d.ShaderAttributeRetained
getAttributeName, initializeAttrName
 
Methods inherited from class javax.media.j3d.NodeComponentRetained
addAMirrorUser, addUser, clearLive, clone, copyMirrorUsers, decRefCnt, doSetLive, getDuplicateOnCloneTree, getInImmCtx, incRefCnt, notifyUsers, removeAMirrorUser, removeMirrorUsers, removeUser, set, setDuplicateOnCloneTree, 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
 

Constructor Detail

ShaderAttributeArrayRetained

ShaderAttributeArrayRetained()
Method Detail

initValue

void initValue(int index,
               java.lang.Object value)

setValue

void setValue(int index,
              java.lang.Object value)
Sets the specified array element of the value of this shader attribute to the specified value. A copy of the object is stored.

Parameters:
value - the new value of the shader attribute
Throws:
java.lang.NullPointerException - if value is null
java.lang.ClassCastException - if value is not an instance of the same base class as the individual elements of the array object used to construct this shader attribute object.
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

length

int length()
Returns the number of elements in the value array.

Returns:
the number of elements in the value array
Throws:
CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph

createMirrorObject

void createMirrorObject()
Overrides:
createMirrorObject in class NodeComponentRetained

computeClassType

int computeClassType(java.lang.Object value)
Computes the base class from the specified object. A ClassCastException is thrown if the object is not an array of one of the allowed classes.

Specified by:
computeClassType in class ShaderAttributeObjectRetained

getBaseClass

java.lang.Class getBaseClass(int classType)
Returns the base class represented by the specified class type.

Specified by:
getBaseClass in class ShaderAttributeObjectRetained

createAttrWrapper

ShaderAttributeObjectRetained.AttrWrapper createAttrWrapper(java.lang.Object value,
                                                            int classType)
Creates an attribute wrapper object of the specified class type, and stores the specified array of objects.

Specified by:
createAttrWrapper in class ShaderAttributeObjectRetained


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