Class SoColorHighlightRenderAction
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.actions.SoAction
com.openinventor.inventor.actions.SoGLRenderAction
com.openinventor.inventor.actions.SoHighlightRenderAction
com.openinventor.inventor.actions.SoColorHighlightRenderAction
A polygon selection highlight style.
EXAMPLE
SoColorHighlightRenderAction
is a render action which renders the scene graph and then renders again the polygons of selected objects in a highlight color.Selected objects are specified by the first SoSelection
node in the scene to which this action is applied. A highlight render action can be passed to the setGLRenderAction() method of render area and viewer classes to have an effect on scene graphs. Here is an example of how a box highlight can be specified for a particular selection node and viewer:
// Viewer ViewerExaminer viewer = new ViewerExaminer(); // Set the highlight render action final RenderArea area = viewer.getRenderArea(); area.setGLRenderAction( new SoColorHighlightRenderAction() ); // Scene graph SoSelection selectionNode = new SoSelection(); // Request automatic redraw when selection changes selectionNode.addChangeCallback(new SoSelectionClassCB() { public void invoke(SoSelection s) { area.scheduleRedraw(); } }); . . . viewer.setSceneGraph( selectionNode );
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoGLRenderAction
SoGLRenderAction.AbortCodes, SoGLRenderAction.AutoCacheModes, SoGLRenderAction.FastEditSavePolicies, SoGLRenderAction.InvalidateCacheModes, SoGLRenderAction.TransparencyTypes
Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.openinventor.inventor.actions.SoHighlightRenderAction
isVisible, setVisible
Methods inherited from class com.openinventor.inventor.actions.SoGLRenderAction
abortNow, enableDepthPeeling3D, generateCacheContext, getCache, getCacheContext, getCurPass, getDecimationPercentage, getDecimationType, getDelayedObjDepthWrite, getDepthPeelingPass, getFastEditSavePolicy, getFrameCounter, getInvalidateCacheMode, getLogicalViewportRegion, getNumPasses, getRenderingIsRemote, getSortedLayersNumPasses, getTransparencyType, getUpdateArea, getViewportRegion, handleTransparency, handleTransparency, handleTransparency, isAlphaTest, isDoingDepthPeeling, isPassUpdate, isSmoothing, isSortedLayersSupported, isSortedLayersSupported, isUsedCacheContext, resetFrameCounter, resetFrameCounter, setAlphaTest, setCache, setCacheContext, setDecimationValue, setDecimationValue, setDelayedObjDepthWrite, setFastEditSavePolicy, setFastEditSavePolicy, setInvalidateCacheMode, setLogicalViewportRegion, setNumPasses, setPassCallback, setPassCallback, setPassUpdate, setRenderingIsRemote, setSmoothing, setSortedLayersNumPasses, setTransparencyType, setUpdateArea, setViewportRegion, shouldAutoCache
Methods inherited from class com.openinventor.inventor.actions.SoAction
apply, apply, clearApplyResult, forwardTraversal, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoColorHighlightRenderAction
public SoColorHighlightRenderAction() -
SoColorHighlightRenderAction
-
-
Method Details
-
setColor
Sets the color of the highlight. Default is red (1,0,0). The application is responsible for forcing a redraw of the scene to see the effects of this change. -
getColor
Gets the color of the highlight. -
enableElement
-