public class SoLineHighlightRenderAction extends SoGLRenderAction
SoLineHighlightRenderAction
is a render action which renders the specified scene graph, then renders each selected object again in wireframe. Selected objects are specified by the first SoSelection
node in the scene to which this action is applied. If there is no renderable geometry in a selected object, no highlight is rendered for that object. A highlight render action can be passed to the setGLRenderAction() method of SoWinRenderArea
to have an effect on scene graphs.
Here is an example of how a line highlight can be specified for a particular selection node and render area.
SoWinRenderArea
*myRenderArea;
SoSelection
*mySelection;
// Set the highlight render action
myRenderArea->setGLRenderAction(
new SoLineHighlightRenderAction()
);
// Automatic redraw on selection changes
myRenderArea->redrawOnSelectionChange(mySelection);
See also:
SoBoxHighlightRenderAction
, SoGLRenderAction
, SoSelection
, SoWinRenderArea
, SoDrawStyle
, SoInteraction
SoGLRenderAction.AbortCodes, SoGLRenderAction.AutoCacheModes, SoGLRenderAction.FastEditSavePolicies, SoGLRenderAction.InvalidateCacheModes, SoGLRenderAction.TransparencyTypes
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoLineHighlightRenderAction()
Constructor.
|
SoLineHighlightRenderAction(SbViewportRegion viewportRegion)
Constructor which takes the normal
SoGLRenderAction parameters. |
Modifier and Type | Method and Description |
---|---|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
SbColor |
getColor()
Gets the color of the highlight.
|
short |
getLinePattern()
Gets the line pattern of the highlight.
|
float |
getLineWidth()
Gets the line width of the highlight.
|
float |
getPointSize()
Gets the point size of the highlight.
|
boolean |
isVisible()
Returns whether highlights will be rendered or not.
|
void |
setColor(SbColor c)
Sets the color of the highlight.
|
void |
setLinePattern(short pattern)
Sets the line pattern of the highlight.
|
void |
setLineWidth(float width)
Sets the line width of the highlight.
|
void |
setPointSize(float size)
Sets the size of points (diameter in pixels) rendered by the highlight.
|
void |
setVisible(boolean b)
This provides a convenient mechanism for turning highlights off or back on.
|
abortNow, enableDepthPeeling3D, generateCacheContext, 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, postDelayedTraversal, preDelayedTraversal, resetFrameCounter, resetFrameCounter, setAlphaTest, setCacheContext, setDecimationValue, setDecimationValue, setDelayedObjDepthWrite, setFastEditSavePolicy, setFastEditSavePolicy, setInvalidateCacheMode, setLogicalViewportRegion, setNumPasses, setPassCallback, setPassCallback, setPassUpdate, setRenderingIsRemote, setSmoothing, setSortedLayersNumPasses, setTransparencyType, setUpdateArea, setUpState, setViewportRegion, shouldAutoCache
apply, apply, clearApplyResult, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, resetContinueActionInBranchFlag, setPipeId, setSceneManager, stopActionInBranch, traverse, useAlternateRep
dispose, getNativeResourceHandle
public SoLineHighlightRenderAction(SbViewportRegion viewportRegion)
SoGLRenderAction
parameters.public SoLineHighlightRenderAction()
public short getLinePattern()
public void setColor(SbColor c)
public SbColor getColor()
public void setLinePattern(short pattern)
SoDrawStyle
for more information. The application is responsible for forcing a redraw of the scene to see the effects of this change.public void setLineWidth(float width)
public void setVisible(boolean b)
public void setPointSize(float size)
SoPointSet
.public float getPointSize()
public boolean isVisible()
public float getLineWidth()
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com