1SoBoxHighlightRenderAction(3IV)() SoBoxHighlightRenderAction(3IV)()
2
3
4
6 SoBoxHighlightRenderAction — a selection highlight style
7
9 SoAction > SoGLRenderAction > SoBoxHighlightRenderAction
10
12 #include <Inventor/actions/SoBoxHighlightRenderAction.h>
13
14 Methods from class SoBoxHighlightRenderAction:
15
16 SoBoxHighlightRenderAction()
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 SoBoxHighlightRenderAction is a render action which renders the speci‐
61 fied scene graph, then renders wireframe boxes surrounding each
62 selected object. Selected objects are specified by the first SoSelec‐
63 tion node in the scene to which this action is applied. If an SoGet‐
64 BoundingBoxAction applied to a selected object produces an empty bound‐
65 ing box, no highlight is rendered for that object. A highlight render
66 action can be passed to the setGLRenderAction() method of SoXtRender‐
67 Area to have an effect on scene graphs.
68
70 SoBoxHighlightRenderAction()
71 Constructor.
72
73 virtual void apply(SoNode *node)
74 This renders the passed scene graph, and also renders wireframe
75 boxes around selected objects as specified by the first SoSelection
76 node found in the scene graph.
77
78 void setVisible(SbBool b)
79 This provides a convenient mechansim for turning highlights off or
80 on. When FALSE is passed, subsequent calls to apply() render the
81 scene graph without rendering highlights. The application is respon‐
82 sible for forcing a redraw of the scene after changing this state.
83 The default visibility is on.
84
85 SbBool isVisible() const
86 Returns whether highlights will be rendered or not.
87
88 void setColor(const SbColor &c)
89 SbColor & getColor()
90 Set and get the color of the highlight. Default is red (1,0,0).
91 Application is responsible for forcing a redraw of the scene to see
92 the effects of this change.
93
94 void setLinePattern(unsigned short pattern)
95 unsigned short getLinePattern()
96 Set and get the line pattern of the highlight. Default is solid,
97 0xffff. The pattern of bits in the passed variable specifies the
98 pattern of the line. See SoDrawStyle for a description. Application
99 is responsible for forcing a redraw of the scene to see the effects
100 of this change.
101
102 void setLineWidth(float width)
103 float getLineWidth()
104 Set and get the line width of the highlight. Default is 3. Applica‐
105 tion is responsible for forcing a redraw of the scene to see the
106 effects of this change.
107
108
110 Here is an example of how a box highlight can be specified for a par‐
111 ticular selection node and render area.
112
113 SoXtRenderArea *myRenderArea;
114 SoSelection *mySelection;
115
116 // Set the highlight render action
117 myRenderArea->setGLRenderAction(
118 new SoBoxHighlightRenderAction());
119
120 // Automatic redraw on selection changes
121 myRenderArea->redrawOnSelectionChange(mySelection);
122
123
124
125
127 SoLineHighlightRenderAction, SoGLRenderAction, SoSelection, SoXtRender‐
128 Area, SoDrawStyle, SoInteraction
129
130
131
132
133 SoBoxHighlightRenderAction(3IV)()