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
-
public class SoColorHighlightRenderAction extends SoHighlightRenderAction
A polygon selection highlight style.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 firstSoSelection
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.EXAMPLE 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:
SoLineHighlightRenderAction
,SoBoxHighlightRenderAction
,SoHaloHighlightRenderAction
,SoHighlightRenderAction
,SoGLRenderAction
,SoSelection
,SoWinRenderArea
,SoDrawStyle SoInteraction
-
-
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 Constructor Description SoColorHighlightRenderAction()
SoColorHighlightRenderAction(SbViewportRegion viewportRegion)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
SbColor
getColor()
Gets the color of the highlight.void
setColor(SbColor c)
Sets the color of the highlight.-
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 Detail
-
SoColorHighlightRenderAction
public SoColorHighlightRenderAction()
-
SoColorHighlightRenderAction
public SoColorHighlightRenderAction(SbViewportRegion viewportRegion)
-
-
Method Detail
-
setColor
public void setColor(SbColor c)
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
public SbColor getColor()
Gets the color of the highlight.
-
enableElement
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
-
-