javax.media.j3d
Class SpotLightRetained

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.PointLightRetained
                          extended by javax.media.j3d.SpotLightRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId

 class SpotLightRetained
extends PointLightRetained

A local spot light source object.


Field Summary
(package private) static int ANGLE_CHANGED
           
(package private)  float concentration
          The spot light's concentration.
(package private) static int CONCENTRATION_CHANGED
           
(package private)  Vector3f direction
          The spot light's direction.
(package private) static int DIRECTION_CHANGED
           
(package private)  float spreadAngle
          The spot light's spread angle.
(package private)  Vector3f xformDirection
           
 
Fields inherited from class javax.media.j3d.PointLightRetained
attenuation, ATTENUATION_CHANGED, LAST_POINTLIGHT_DEFINED_BIT, linearAttenuationInEc, localToVworldScale, position, POSITION_CHANGED, quadraticAttenuationInEc, xformPosition
 
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
SpotLightRetained()
           
 
Method Summary
protected  java.lang.Object clone()
          Clones only the retained side, internal use only
(package private)  float getConcentration()
          Retrieves the spot light's concentration.
(package private)  void getDirection(Vector3f direction)
          Retrieves this light's direction and places it in the vector provided.
(package private)  float getSpreadAngle()
          Returns the spot light's spread angle.
(package private)  void initConcentration(float concentration)
          Initializes the spot light's concentration.
(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 the spot light's direction from the vector provided.
(package private)  void initSpreadAngle(float spreadAngle)
          Initializes the spot light's spread angle.
(package private)  void mergeTransform(TransformGroupRetained xform)
           
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
(package private)  void setConcentration(float concentration)
          Sets the spot light's concentration.
(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 the spot light's direction from the vector provided.
(package private)  void setLive(SetLiveState s)
           
(package private)  void setSpreadAngle(float spreadAngle)
          Sets the spot light's spread angle.
(package private)  void update(Context ctx, int lightSlot, double scale)
          This update function, and its native counterpart, updates a spot light.
(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.PointLightRetained
doSetLive, getAttenuation, getPosition, initAttenuation, initAttenuation, initMessage, initPosition, initPosition, setAttenuation, setAttenuation, setPosition, setPosition, validateAttenuationInEc
 
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, initMirrorObject, initRemoveAllScopes, initRemoveScope, initRemoveScope, initScope, insertScope, numScopes, removeAllScopes, removeScope, removeScope, 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, 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

ANGLE_CHANGED

static final int ANGLE_CHANGED
See Also:
Constant Field Values

CONCENTRATION_CHANGED

static final int CONCENTRATION_CHANGED
See Also:
Constant Field Values

direction

Vector3f direction
The spot light's direction.


xformDirection

Vector3f xformDirection

spreadAngle

float spreadAngle
The spot light's spread angle.


concentration

float concentration
The spot light's concentration.

Constructor Detail

SpotLightRetained

SpotLightRetained()
Method Detail

initSpreadAngle

void initSpreadAngle(float spreadAngle)
Initializes the spot light's spread angle.

Parameters:
spreadAngle - the light's spread angle

setLive

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

setSpreadAngle

void setSpreadAngle(float spreadAngle)
Sets the spot light's spread angle.

Parameters:
spreadAngle - the light's spread angle

getSpreadAngle

float getSpreadAngle()
Returns the spot light's spread angle.

Returns:
the spread angle of the light

initConcentration

void initConcentration(float concentration)
Initializes the spot light's concentration.

Parameters:
concentration - the concentration of the light

setConcentration

void setConcentration(float concentration)
Sets the spot light's concentration.

Parameters:
concentration - the concentration of the light

getConcentration

float getConcentration()
Retrieves the spot light's concentration.

Returns:
the concentration of the light

initDirection

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

Parameters:
direction - the new direction of the light

setDirection

void setDirection(Vector3f direction)
Sets the spot light's direction from the vector provided.

Parameters:
direction - the new direction of the light

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

update

void update(Context ctx,
            int lightSlot,
            double scale)
This update function, and its native counterpart, updates a spot light. This includes its color, attenuation, transformed position, spread angle, concentration, and its transformed position.

Overrides:
update in class PointLightRetained

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 PointLightRetained

clone

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

Overrides:
clone in class PointLightRetained

updateTransformChange

void updateTransformChange()
Overrides:
updateTransformChange in class PointLightRetained

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr)
Overrides:
sendMessage in class PointLightRetained

mergeTransform

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


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