javax.media.j3d
Class ShaderAttributeArrayRetained
java.lang.Object
javax.media.j3d.IndexedObject
javax.media.j3d.SceneGraphObjectRetained
javax.media.j3d.NodeComponentRetained
javax.media.j3d.ShaderAttributeRetained
javax.media.j3d.ShaderAttributeObjectRetained
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.
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 |
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.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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShaderAttributeArrayRetained
ShaderAttributeArrayRetained()
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.