javax.media.j3d
Class DirectionalLightRetained

java.lang.Object
  extended by javax.media.j3d.IndexedObject
      extended by javax.media.j3d.SceneGraphObjectRetained
          extended by javax.media.j3d.NodeRetained
              extended by javax.media.j3d.LeafRetained
                  extended by javax.media.j3d.LightRetained
                      extended by javax.media.j3d.DirectionalLightRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId

 class DirectionalLightRetained
extends LightRetained

An infinite directional light source object.


Field Summary
(package private)  Vector3f direction
           
(package private) static int DIRECTION_CHANGED
           
(package private)  Vector3f xformDirection
           
 
Fields inherited from class javax.media.j3d.LightRetained
boundingLeaf, BOUNDINGLEAF_CHANGED, BOUNDS_CHANGED, CLEAR_MIRROR, color, COLOR_CHANGED, ENABLE_CHANGED, environmentSets, inImmCtx, INIT_MIRROR, isNeeded, isScoped, isViewScoped, key, LAST_DEFINED_BIT, lightDirty, lightOn, lightType, mirrorLights, newlyAddedMirrorLights, numMirrorLights, region, regionOfInfluence, SCOPE_CHANGED, scopes, sgLight, sgLightDirty, targetThreads, tempKey
 
Fields inherited from class javax.media.j3d.LeafRetained
boundsDirty, switchState
 
Fields inherited from class javax.media.j3d.NodeRetained
ALTERNATEAPPEARANCE, AMBIENTLIGHT, apiBounds, BACKGROUND, BACKGROUNDSOUND, BEHAVIOR, BOUNDINGLEAF, boundsAutoCompute, BRANCHGROUP, branchGroupPaths, cachedBounds, childIndex, CLIP, collidable, CONESOUND, CONTAINS_VIEWPLATFORM, CURRENT_LOCAL_TO_VWORLD, DECALGROUP, DIRECTIONALLIGHT, EXPONENTIALFOG, geometryBackground, GROUP, inSharedGroup, LAST_LOCAL_TO_VWORLD, LINEARFOG, LINK, localBounds, locale, localToVworld, localToVworldIndex, localToVworldKeys, MODELCLIP, MORPH, nnuId, nodeId, nodeType, NUMNODES, ORDEREDGROUP, orderedId, ORIENTEDSHAPE3D, parent, parentSwitchLink, parentTransformLink, pickable, POINTLIGHT, POINTSOUND, refCount, SHAPE, SHAREDGROUP, SOUNDSCAPE, SPOTLIGHT, staticTransform, SWITCH, TRANSFORMGROUP, universe, validCachedBounds, VIEWPLATFORM, VIEWSPECIFICGROUP
 
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
DirectionalLightRetained()
           
 
Method Summary
protected  java.lang.Object clone()
          Clones only the retained side, internal use only
(package private)  void getDirection(Vector3f direction)
          Retrieves this light's direction and places it in the vector provided.
(package private)  void initDirection(float x, float y, float z)
          Initializes this light's direction from the three values provided.
(package private)  void initDirection(Vector3f direction)
          Initializes this light's direction from the vector provided.
(package private)  void mergeTransform(TransformGroupRetained xform)
           
(package private)  void setDirection(float x, float y, float z)
          Sets this light's direction from the three values provided.
(package private)  void setDirection(Vector3f direction)
          Sets this light's direction from the vector provided.
(package private)  void setLive(SetLiveState s)
           
(package private)  void update(Context ctx, int lightSlot, double scale)
          This method is implemented by each light for rendering context updates.
(package private)  void updateMirrorObject(java.lang.Object[] objs)
          This update function, and its native counterpart, updates a directional light.
(package private)  void updateTransformChange()
           
 
Methods inherited from class javax.media.j3d.LightRetained
addScope, clearLive, clearMirrorObject, getAllScopes, getColor, getEnable, getInfluencingBoundingLeaf, getInfluencingBounds, getInImmCtx, getMirrorLight, getMirrorObjects, getScope, indexOfScope, initAddScope, initColor, initEnable, initInfluencingBoundingLeaf, initInfluencingBounds, initInsertScope, initMessage, initMirrorObject, initRemoveAllScopes, initRemoveScope, initRemoveScope, initScope, insertScope, numScopes, removeAllScopes, removeScope, removeScope, sendMessage, setColor, setEnable, setInfluencingBoundingLeaf, setInfluencingBounds, setInImmCtx, setScope, updateBoundingLeaf, updateImmediateMirrorObject, updateImmediateTransformChange
 
Methods inherited from class javax.media.j3d.LeafRetained
clone, updateBounds
 
Methods inherited from class javax.media.j3d.NodeRetained
computeCombineBounds, computeNonLiveLocalToVworld, dirtyBoundsCache, doSetLive, equal, findCollidableFlags, findPickableFlags, findTransformLevels, getBounds, getBoundsAutoCompute, getCollidable, getCurrentLocalToVworld, getCurrentLocalToVworld, getCurrentLocalToVworld, getEffectiveBounds, getId, getLastLocalToVworld, getLastLocalToVworld, getLastLocalToVworld, getLocalBounds, getLocale, getLocalToVworld, getLocalToVworld, getLocalToVworld, getParent, getPickable, getVirtualUniverse, isStatic, merge, notifySceneGraphChanged, processViewSpecificInfo, recombineAbove, removeNodeData, searchGeometryAtoms, setAuxData, setBounds, setBoundsAutoCompute, setCollidable, setNodeData, setParent, setPickable, transformBounds, updateCollidable, updateLocalToVworld, updatePickable
 
Methods inherited from class javax.media.j3d.SceneGraphObjectRetained
clearLive, clearLive, compile, doSetLive, getSource, handleFrequencyChange, isInSetLive, markAsLive, setCompiled, 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

DIRECTION_CHANGED

static final int DIRECTION_CHANGED
See Also:
Constant Field Values

direction

Vector3f direction

xformDirection

Vector3f xformDirection
Constructor Detail

DirectionalLightRetained

DirectionalLightRetained()
Method Detail

initDirection

void initDirection(Vector3f direction)
Initializes this light's direction from the vector provided.

Parameters:
direction - the new direction

setDirection

void setDirection(Vector3f direction)
Sets this light's direction from the vector provided. and sends a message

Parameters:
direction - the new direction

initDirection

void initDirection(float x,
                   float y,
                   float z)
Initializes this light's direction from the three values provided.

Parameters:
x - the new x direction
y - the new y direction
z - the new z direction

setDirection

void setDirection(float x,
                  float y,
                  float z)
Sets this light's direction from the three values provided.

Parameters:
x - the new x direction
y - the new y direction
z - the new z direction

getDirection

void getDirection(Vector3f direction)
Retrieves this light's direction and places it in the vector provided.

Parameters:
direction - the variable to receive the direction vector

setLive

void setLive(SetLiveState s)
Overrides:
setLive in class LightRetained

updateMirrorObject

void updateMirrorObject(java.lang.Object[] objs)
This update function, and its native counterpart, updates a directional light. This includes its color and its transformed direction.

Overrides:
updateMirrorObject in class LightRetained

update

void update(Context ctx,
            int lightSlot,
            double scale)
Description copied from class: LightRetained
This method is implemented by each light for rendering context updates. This default one does nothing.

Specified by:
update in class LightRetained

clone

protected java.lang.Object clone()
Description copied from class: LightRetained
Clones only the retained side, internal use only

Overrides:
clone in class LightRetained

updateTransformChange

void updateTransformChange()
Overrides:
updateTransformChange in class LightRetained

mergeTransform

void mergeTransform(TransformGroupRetained xform)
Overrides:
mergeTransform in class LightRetained


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