javax.media.j3d
Class PointLightRetained

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
All Implemented Interfaces:
java.lang.Cloneable, NnuId
Direct Known Subclasses:
SpotLightRetained

 class PointLightRetained
extends LightRetained

A Retained PointLight source.


Field Summary
(package private)  Point3f attenuation
          The attenuation vector consisting of constant, linear, and quadratic coefficients.
(package private) static int ATTENUATION_CHANGED
           
(package private) static int LAST_POINTLIGHT_DEFINED_BIT
           
(package private)  float linearAttenuationInEc
           
(package private)  double localToVworldScale
           
(package private)  Point3f position
           
(package private) static int POSITION_CHANGED
           
(package private)  float quadraticAttenuationInEc
           
(package private)  Point3f 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
PointLightRetained()
           
 
Method Summary
protected  java.lang.Object clone()
          Clones only the retained side, internal use only
(package private)  void doSetLive(SetLiveState s)
          Makes the internal node live.
(package private)  void getAttenuation(Point3f attenuation)
          Retrieves the light's attenuation and places the value in the parameter specified.
(package private)  void getPosition(Point3f position)
          Retrieves this light's position and places it in the vector provided.
(package private)  void initAttenuation(float constant, float linear, float quadratic)
          Sets the point light's attenuation.
(package private)  void initAttenuation(Point3f attenuation)
          Initializes the point light's attenuation constants.
(package private)  J3dMessage initMessage(int num)
           
(package private)  void initPosition(float x, float y, float z)
          Initializes this light's position from the three values provided.
(package private)  void initPosition(Point3f position)
          Initializes this light's position from the vector provided.
(package private)  void mergeTransform(TransformGroupRetained xform)
           
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
(package private)  void setAttenuation(float constant, float linear, float quadratic)
          Sets the point light's attenuation.
(package private)  void setAttenuation(Point3f attenuation)
          Sets the point light's attenuation constants.
(package private)  void setLive(SetLiveState s)
           
(package private)  void setPosition(float x, float y, float z)
          Sets this light's position from the three values provided.
(package private)  void setPosition(Point3f position)
          Sets this light's position from the vector provided.
(package private)  void update(Context ctx, int lightSlot, double scale)
          This update function, and its native counterpart, updates a point light.
(package private)  void updateMirrorObject(java.lang.Object[] objs)
           
(package private)  void updateTransformChange()
           
(package private)  void validateAttenuationInEc(double vworldToCoexistenceScale)
           
 
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

POSITION_CHANGED

static final int POSITION_CHANGED
See Also:
Constant Field Values

ATTENUATION_CHANGED

static final int ATTENUATION_CHANGED
See Also:
Constant Field Values

LAST_POINTLIGHT_DEFINED_BIT

static final int LAST_POINTLIGHT_DEFINED_BIT
See Also:
Constant Field Values

attenuation

Point3f attenuation
The attenuation vector consisting of constant, linear, and quadratic coefficients.


position

Point3f position

xformPosition

Point3f xformPosition

localToVworldScale

double localToVworldScale

linearAttenuationInEc

float linearAttenuationInEc

quadraticAttenuationInEc

float quadraticAttenuationInEc
Constructor Detail

PointLightRetained

PointLightRetained()
Method Detail

initPosition

void initPosition(Point3f position)
Initializes this light's position from the vector provided.

Parameters:
position - the new position

setPosition

void setPosition(Point3f position)
Sets this light's position from the vector provided.

Parameters:
position - the new position

initPosition

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

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

setPosition

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

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

getPosition

void getPosition(Point3f position)
Retrieves this light's position and places it in the vector provided.

Parameters:
position - the variable to receive the position vector

initAttenuation

void initAttenuation(Point3f attenuation)
Initializes the point light's attenuation constants.

Parameters:
attenuation - a vector consisting of constant, linear, and quadratic coefficients

setAttenuation

void setAttenuation(Point3f attenuation)
Sets the point light's attenuation constants.

Parameters:
attenuation - a vector consisting of constant, linear, and quadratic coefficients

initAttenuation

void initAttenuation(float constant,
                     float linear,
                     float quadratic)
Sets the point light's attenuation.

Parameters:
constant - the point light's constant attenuation
linear - the linear attenuation of the light
quadratic - the quadratic attenuation of the light

setAttenuation

void setAttenuation(float constant,
                    float linear,
                    float quadratic)
Sets the point light's attenuation.

Parameters:
constant - the point light's constant attenuation
linear - the linear attenuation of the light
quadratic - the quadratic attenuation of the light

getAttenuation

void getAttenuation(Point3f attenuation)
Retrieves the light's attenuation and places the value in the parameter specified.

Parameters:
attenuation - the variable that will contain the attenuation

update

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

Specified by:
update in class LightRetained

setLive

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

doSetLive

void doSetLive(SetLiveState s)
Description copied from class: SceneGraphObjectRetained
Makes the internal node live.

Overrides:
doSetLive in class NodeRetained

initMessage

J3dMessage initMessage(int num)
Overrides:
initMessage in class LightRetained

updateMirrorObject

void updateMirrorObject(java.lang.Object[] objs)
Overrides:
updateMirrorObject in class LightRetained

validateAttenuationInEc

void validateAttenuationInEc(double vworldToCoexistenceScale)

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

sendMessage

void sendMessage(int attrMask,
                 java.lang.Object attr)
Overrides:
sendMessage 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.