1SoLineHighlightRenderAction(3IV)() SoLineHighlightRenderAction(3IV)()
2
3
4
6 SoLineHighlightRenderAction — selection highlight style
7
9 SoAction > SoGLRenderAction > SoLineHighlightRenderAction
10
12 #include <Inventor/actions/SoLineHighlightRenderAction.h>
13
14 Methods from class SoLineHighlightRenderAction:
15
16 SoLineHighlightRenderAction()
17 virtual void apply(SoNode *node)
18 void setVisible(SbBool b)
19 SbBool isVisible() const
20 void setColor(const SbColor &c)
21 SbColor & getColor()
22 void setLinePattern(unsigned short pattern)
23 unsigned short getLinePattern()
24 void setLineWidth(float width)
25 float getLineWidth()
26
27 Methods from class SoGLRenderAction:
28
29 void setViewportRegion(const SbViewportRegion
30 &newRegion)
31 const SbViewportRegion & getViewportRegion() const
32 void setUpdateArea(const SbVec2f &origin, const
33 SbVec2f &size)
34 void getUpdateArea(SbVec2f &origin, SbVec2f &size)
35 const
36 void setAbortCallback(SoGLRenderAbortCB *func, void
37 *userData)
38 void setTransparencyType(TransparencyType type)
39 TransparencyType getTransparencyType() const
40 void setSmoothing(SbBool smooth)
41 SbBool isSmoothing() const
42 void setNumPasses(int num)
43 int getNumPasses() const
44 void setPassUpdate(SbBool flag)
45 SbBool isPassUpdate() const
46 void setPassCallback(SoGLRenderPassCB *func, void
47 *userData)
48 void setCacheContext(uint32_t context)
49 uint32_t getCacheContext() const
50
51 Methods from class SoAction:
52
53 static SoType getClassTypeId()
54 virtual SoType getTypeId()
55 virtual SbBool isOfType(SoType type)
56 virtual void invalidateState()
57
58
60 SoLineHighlightRenderAction is a render action which renders the speci‐
61 fied scene graph, then renders each selected object again in wireframe.
62 Selected objects are specified by the first SoSelection node in the
63 scene to which this action is applied. If there is no renderable geome‐
64 try in a selected object, no highlight is rendered for that object. A
65 highlight render action can be passed to the setGLRenderAction() method
66 of SoXtRenderArea to have an affect on scene graphs.
67
69 SoLineHighlightRenderAction()
70 Constructor.
71
72 virtual void apply(SoNode *node)
73 This renders the passed scene graph, and also renders each selected
74 object in wireframe, as specified by the first SoSelection node
75 found in the scene graph.
76
77 void setVisible(SbBool b)
78 This provides a convenient mechansim for turning highlights off or
79 back on. When FALSE is passed, subsequent calls to apply() render
80 the scene graph without rendering highlights. The application is
81 responsible for forcing a redraw of the scene after changing this
82 state. The default visibility is on.
83
84 SbBool isVisible() const
85 Returns whether highlights will be rendered or not.
86
87 void setColor(const SbColor &c)
88 SbColor & getColor()
89 Set and get the color of the highlight. Default is red (1,0,0). The
90 application is responsible for forcing a redraw of the scene to see
91 the affects of this change.
92
93 void setLinePattern(unsigned short pattern)
94 unsigned short getLinePattern()
95 Set and get the line pattern of the highlight. Default is solid,
96 0xffff. The pattern of bits in the passed variable specifies the
97 pattern of the line. See SoDrawStyle for more information. The
98 application is responsible for forcing a redraw of the scene to see
99 the affects of this change.
100
101 void setLineWidth(float width)
102 float getLineWidth()
103 Set and get the line width of the highlight. Default is 3. The
104 application is responsible for forcing a redraw of the scene to see
105 the affects of this change.
106
107
109 Here is an example of how a line highlight can be specified for a par‐
110 ticular selection node and render area.
111
112 SoXtRenderArea *myRenderArea;
113 SoSelection *mySelection;
114
115 // Set the highlight render action
116 myRenderArea->setGLRenderAction(
117 new SoLineHighlightRenderAction());
118
119 // Automatic redraw on selection changes
120 myRenderArea->redrawOnSelectionChange(mySelection);
121
122
123
124
126 SoBoxHighlightRenderAction, SoGLRenderAction, SoSelection, SoXtRender‐
127 Area, SoDrawStyle, SoInteraction
128
129
130
131
132 SoLineHighlightRenderAction(3IV)()