javax.media.j3d
Class BackgroundRetained

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.BackgroundRetained
All Implemented Interfaces:
java.lang.Cloneable, NnuId

 class BackgroundRetained
extends LeafRetained

The Background leaf node defines either a solid background color or a background image that is used to fill the window at the beginning of each new frame. It also specifies an application region in which this background is active.


Field Summary
(package private)  Bounds applicationRegion
          The Boundary object defining the lights's application region.
(package private)  java.util.ArrayList bgGeometryAtomList
           
(package private)  boolean bgGeometryAtomListDirty
           
(package private)  GeometryAtom[] bgGeometryAtoms
           
(package private)  BoundingLeafRetained boundingLeaf
          The bounding leaf reference
(package private) static int BOUNDINGLEAF_CHANGED
           
(package private) static int BOUNDS_CHANGED
           
(package private)  Locale cachedLocale
          The locale of this Background node since we don't have mirror object when clearLive is called locale is set to null, we still want locale to have a non-null value, since renderingEnv structure may be using the locale
(package private)  Color3f color
           
(package private) static int COLOR_CHANGED
           
(package private)  java.util.ArrayList fogs
           
(package private) static int GEOMETRY_CHANGED
           
(package private)  BranchGroup geometryBranch
          Background geometry branch group
(package private)  ImageComponent2DRetained image
           
(package private) static int IMAGE_CHANGED
           
(package private) static int IMAGE_SCALE_CHANGED
           
(package private)  int imageScaleMode
           
(package private)  boolean inImmCtx
           
(package private)  boolean isViewScoped
           
(package private)  java.util.ArrayList lights
           
(package private)  SetLiveState setLiveState
          The state structure used for Background Geometry
(package private) static int targetThreads
           
(package private)  Texture2DRetained texture
           
(package private)  Bounds transformedRegion
          The transformed value of the applicationRegion.
 
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
BackgroundRetained()
           
 
Method Summary
(package private)  void addBgGeometryAtomList(GeometryAtom geomAtom)
           
(package private)  void clearGeometryBranch(BranchGroupRetained branch)
           
(package private)  void clearLive(SetLiveState s)
          This clearLive routine first calls the superclass's method, then it removes itself to the list of lights
(package private)  BoundingLeaf getApplicationBoundingLeaf()
          Get the Background's application region
(package private)  Bounds getApplicationBounds()
          Get the Backgound's application region.
(package private)  GeometryAtom[] getBackgroundGeometryAtoms()
           
(package private)  void getColor(Color3f color)
          Retrieves the background color.
(package private)  BranchGroup getGeometry()
          Retrieves the background geometry branch group.
(package private)  ImageComponent2D getImage()
          Retrieves the background image.
(package private)  int getImageScaleMode()
          gets the image scale mode for this Background node.
(package private)  boolean getInImmCtx()
          This gets the immedate mode context flag
(package private)  void getMirrorObjects(java.util.ArrayList leafList, HashKey key)
           
(package private)  void initApplicationBoundingLeaf(BoundingLeaf region)
          Initializes the Background's application region to the specified Leaf node.
(package private)  void initApplicationBounds(Bounds region)
          Initializes the Background's application region.
(package private)  void initColor(Color3f color)
          Initializes the background color to the specified color.
(package private)  void initColor(float r, float g, float b)
          Initializes the background color to the specified color.
(package private)  void initGeometry(BranchGroup branch)
          Initializes the background geometry branch group to the specified branch.
(package private)  void initImage(ImageComponent2D img)
          Initializes the background image to the specified image.
(package private)  void initImageScaleMode(int imageScaleMode)
          Initialize the image scale mode to the specified mode
(package private)  void mergeTransform(TransformGroupRetained xform)
           
(package private)  void notifyImageComponentImageChanged(ImageComponentRetained image, ImageComponentUpdateInfo value)
           
(package private)  void removeBgGeometryAtomList(GeometryAtom geomAtom)
           
(package private)  void sendMessage(int attrMask, java.lang.Object attr)
           
(package private)  void setApplicationBoundingLeaf(BoundingLeaf region)
          Set the Background's application region to the specified Leaf node.
(package private)  void setApplicationBounds(Bounds region)
          Set the Background's application region.
(package private)  void setColor(Color3f color)
          Sets the background color to the specified color.
(package private)  void setColor(float r, float g, float b)
          Sets the background color to the specified color.
(package private)  void setGeometry(BranchGroup branch)
          Sets the background geometry branch group to the specified branch.
(package private)  void setGeometryBranch(BranchGroupRetained branch)
           
(package private)  void setImage(ImageComponent2D img)
          Sets the background image to the specified image.
(package private)  void setImageScaleMode(int imageScaleMode)
          Sets the image scale mode for this Background node.
(package private)  void setInImmCtx(boolean inCtx)
          This sets the immedate mode context flag
(package private)  void setLive(SetLiveState s)
          This setLive routine first calls the superclass's method, then it adds itself to the list of lights
(package private)  void updateBoundingLeaf()
          Note: This routine will only be called to update the object's transformed region
(package private)  void updateImmediateMirrorObject(java.lang.Object[] objs)
           
(package private)  void updateImmediateTransformChange()
           
 
Methods inherited from class javax.media.j3d.LeafRetained
clone, updateBounds, updateMirrorObject, updateTransformChange
 
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, clone, 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

COLOR_CHANGED

static final int COLOR_CHANGED
See Also:
Constant Field Values

IMAGE_CHANGED

static final int IMAGE_CHANGED
See Also:
Constant Field Values

GEOMETRY_CHANGED

static final int GEOMETRY_CHANGED
See Also:
Constant Field Values

BOUNDS_CHANGED

static final int BOUNDS_CHANGED
See Also:
Constant Field Values

BOUNDINGLEAF_CHANGED

static final int BOUNDINGLEAF_CHANGED
See Also:
Constant Field Values

IMAGE_SCALE_CHANGED

static final int IMAGE_SCALE_CHANGED
See Also:
Constant Field Values

color

Color3f color

image

ImageComponent2DRetained image

texture

Texture2DRetained texture

imageScaleMode

int imageScaleMode

applicationRegion

Bounds applicationRegion
The Boundary object defining the lights's application region.


boundingLeaf

BoundingLeafRetained boundingLeaf
The bounding leaf reference


geometryBranch

BranchGroup geometryBranch
Background geometry branch group


transformedRegion

Bounds transformedRegion
The transformed value of the applicationRegion.


setLiveState

SetLiveState setLiveState
The state structure used for Background Geometry


cachedLocale

Locale cachedLocale
The locale of this Background node since we don't have mirror object when clearLive is called locale is set to null, we still want locale to have a non-null value, since renderingEnv structure may be using the locale


inImmCtx

boolean inImmCtx

lights

java.util.ArrayList lights

fogs

java.util.ArrayList fogs

bgGeometryAtomList

java.util.ArrayList bgGeometryAtomList

bgGeometryAtomListDirty

boolean bgGeometryAtomListDirty

bgGeometryAtoms

GeometryAtom[] bgGeometryAtoms

targetThreads

static final int targetThreads
See Also:
Constant Field Values

isViewScoped

boolean isViewScoped
Constructor Detail

BackgroundRetained

BackgroundRetained()
Method Detail

initColor

final void initColor(Color3f color)
Initializes the background color to the specified color. This color is used if the image is null.

Parameters:
color - the new background color

setColor

final void setColor(Color3f color)
Sets the background color to the specified color. This color is used if the image is null.

Parameters:
color - the new background color

initColor

final void initColor(float r,
                     float g,
                     float b)
Initializes the background color to the specified color. This color is used if the image is null.

Parameters:
r - the red component of the background color
g - the green component of the background color
b - the blue component of the background color

setColor

final void setColor(float r,
                    float g,
                    float b)
Sets the background color to the specified color. This color is used if the image is null.

Parameters:
r - the red component of the background color
g - the green component of the background color
b - the blue component of the background color

getColor

final void getColor(Color3f color)
Retrieves the background color.

Parameters:
color - the vector that will receive the current background color

initImageScaleMode

final void initImageScaleMode(int imageScaleMode)
Initialize the image scale mode to the specified mode


setImageScaleMode

final void setImageScaleMode(int imageScaleMode)
Sets the image scale mode for this Background node.

Parameters:
imageScaleMode - the image scale mode

getImageScaleMode

final int getImageScaleMode()
gets the image scale mode for this Background node.


initImage

final void initImage(ImageComponent2D img)
Initializes the background image to the specified image.

Parameters:
image - new ImageCompoent2D object used as the background image

setImage

final void setImage(ImageComponent2D img)
Sets the background image to the specified image.

Parameters:
image - new ImageCompoent3D object used as the background image

getImage

final ImageComponent2D getImage()
Retrieves the background image.

Returns:
the current background image

initGeometry

final void initGeometry(BranchGroup branch)
Initializes the background geometry branch group to the specified branch.

Parameters:
branch - new branch group object used for background geometry

setGeometry

final void setGeometry(BranchGroup branch)
Sets the background geometry branch group to the specified branch.

Parameters:
branch - new branch group object used for background geometry

getGeometry

final BranchGroup getGeometry()
Retrieves the background geometry branch group.

Returns:
the current background geometry branch group

initApplicationBounds

final void initApplicationBounds(Bounds region)
Initializes the Background's application region.

Parameters:
region - a region that contains the Backgound's new application bounds

setApplicationBounds

final void setApplicationBounds(Bounds region)
Set the Background's application region.

Parameters:
region - a region that contains the Backgound's new application bounds

getApplicationBounds

final Bounds getApplicationBounds()
Get the Backgound's application region.

Returns:
this Backgound's application region information

initApplicationBoundingLeaf

void initApplicationBoundingLeaf(BoundingLeaf region)
Initializes the Background's application region to the specified Leaf node.


setApplicationBoundingLeaf

void setApplicationBoundingLeaf(BoundingLeaf region)
Set the Background's application region to the specified Leaf node.


getApplicationBoundingLeaf

BoundingLeaf getApplicationBoundingLeaf()
Get the Background's application region


setInImmCtx

void setInImmCtx(boolean inCtx)
This sets the immedate mode context flag


getInImmCtx

boolean getInImmCtx()
This gets the immedate mode context flag


setGeometryBranch

void setGeometryBranch(BranchGroupRetained branch)

clearGeometryBranch

void clearGeometryBranch(BranchGroupRetained branch)

setLive

void setLive(SetLiveState s)
This setLive routine first calls the superclass's method, then it adds itself to the list of lights

Overrides:
setLive in class NodeRetained

clearLive

void clearLive(SetLiveState s)
This clearLive routine first calls the superclass's method, then it removes itself to the list of lights

Overrides:
clearLive in class NodeRetained

updateImmediateMirrorObject

void updateImmediateMirrorObject(java.lang.Object[] objs)

updateBoundingLeaf

void updateBoundingLeaf()
Note: This routine will only be called to update the object's transformed region

Overrides:
updateBoundingLeaf in class LeafRetained

updateImmediateTransformChange

void updateImmediateTransformChange()

sendMessage

final void sendMessage(int attrMask,
                       java.lang.Object attr)

addBgGeometryAtomList

void addBgGeometryAtomList(GeometryAtom geomAtom)

removeBgGeometryAtomList

void removeBgGeometryAtomList(GeometryAtom geomAtom)

getBackgroundGeometryAtoms

GeometryAtom[] getBackgroundGeometryAtoms()

mergeTransform

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

notifyImageComponentImageChanged

void notifyImageComponentImageChanged(ImageComponentRetained image,
                                      ImageComponentUpdateInfo value)

getMirrorObjects

void getMirrorObjects(java.util.ArrayList leafList,
                      HashKey key)
Overrides:
getMirrorObjects in class LeafRetained


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