Class SoGradientBackground
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.nodes.SoNode
-
- com.openinventor.inventor.nodes.SoBackground
-
- com.openinventor.inventor.nodes.SoGradientBackground
-
- All Implemented Interfaces:
SafeDisposable
public class SoGradientBackground extends SoBackground
Gradient background node. Draws a color gradient background.This node provides a convenient way of drawing a color gradient background for a scene. The first color (color0) appears at the bottom of the window and the second color (color1) appears at the top of the window. Rendering of the gradient is automatically recalculated if the window size changes.
Generally background nodes should be placed at the beginning of the scene graph so that geometry is drawn on top of the background. Background nodes have no size, are not pickable, and do not modify the OpenGL depth buffer.
Another convenient feature is that this node renders correctly on a tiled display that represents a single large virtual window, for example using the MultiPipe extension (see SoXtMPExaminerViewer). The gradient will be interpolated smoothly across the entire virtual window.
File format/default:
GradientBackground {
color0 0.7 0.7 0.8 color1 0.0 0.1 0.3 swapColors false Action behavior:
SoGLRenderAction
Renders background, does not affect state.- See Also:
SoBackground
,SoImageBackground
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFColor
color0
First color in gradient (0.7 0.7 0.8 by default).SoSFColor
color1
Second color in gradient (0.0 0.1 0.3 by default).SoSFBool
swapColors
Reverse colors (default is false).-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoGradientBackground()
Creates a background gradient node with default settings.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
color0
public final SoSFColor color0
First color in gradient (0.7 0.7 0.8 by default). This color appears at the bottom of the window (unless the swapColors field is true).
-
color1
public final SoSFColor color1
Second color in gradient (0.0 0.1 0.3 by default). This color appears at the top of the window (unless the swapColors field is true).
-
swapColors
public final SoSFBool swapColors
Reverse colors (default is false).
-
-