1SoXtDirectionalLightEditor(3IV)() SoXtDirectionalLightEditor(3IV)()
2
3
4
6 SoXtDirectionalLightEditor — component for editing directional lights
7
9 SoXtComponent > SoXtDirectionalLightEditor
10
12 #include <Inventor/Xt/SoXtDirectionalLightEditor.h>
13
14 typedef void SoXtDirectionalLightEditorCB(void *userData, const
15 SoDirectionalLight *light)
16
17 Methods from class SoXtDirectionalLightEditor:
18
19 SoXtDirectionalLightEditor(Widget parent =
20 NULL, const char *name = NULL, SbBool
21 buildInsideParent = TRUE)
22 ~SoXtDirectionalLightEditor()
23 void attach(SoPath *pathToLight)
24 void detach()
25 SbBool isAttached()
26 void addLightChangedCallback(SoXtDirectional‐
27 LightEditorCB *f, void *userData = NULL)
28 void removeLightChangedCallback(SoXtDirectional‐
29 LightEditorCB *f, void *userData = NULL)
30 void setLight(const SoDirectionalLight &newLight)
31 const SoDirectionalLight & getLight() const
32
33 Methods from class SoXtComponent:
34
35 virtual void show()
36 virtual void hide()
37 SbBool isVisible()
38 Widget getWidget() const
39 SbBool isTopLevelShell() const
40 Widget getShellWidget() const
41 Widget getParentWidget() const
42 void setSize(const SbVec2s &size)
43 SbVec2s getSize()
44 Display * getDisplay()
45 void setTitle(const char *newTitle)
46 const char * getTitle() const
47 void setIconTitle(const char *newIconTitle)
48 const char * getIconTitle() const
49 void setWindowCloseCallback(SoXtComponentCB *func,
50 void *data = NULL)
51 static SoXtComponent * getComponent(Widget w)
52 const char * getWidgetName() const
53 const char * getClassName() const
54
55
57 This class is used to edit an SoDirectionalLight node (color, inten‐
58 sity, and direction are changed). In addition to directly editing
59 directional light nodes, the editor can also be used with callbacks
60 which will be called whenever the light is changed. The component con‐
61 sists of a render area and a value slider in the main window, with con‐
62 trols to display a color picker. In the render area there appears a
63 sphere representing the world, and a directional light manipulator rep‐
64 resenting the direction of the light. Picking on the manipulator and
65 moving the mouse provides direct manipulation of the light direction.
66 The color picker is used to edit the color, and the value slider edits
67 the intensity.
68
69 The editor can currently be attached to only one light at a time.
70 Attaching to two different lights will automatically detach the first
71 one before attaching the second.
72
74 SoXtDirectionalLightEditor(Widget parent =
75 NULL, const char *name = NULL, SbBool
76 buildInsideParent = TRUE)
77 ~SoXtDirectionalLightEditor()
78 Constructor and destructor.
79
80 void attach(SoPath *pathToLight)
81 void detach()
82 Attach/detach the editor to/from a directional light. When attached,
83 changes made in the editor directly affect the attached light.
84
85 SbBool isAttached()
86 Returns TRUE if the editor is attached.
87
88 void addLightChangedCallback(SoXtDirectional‐
89 LightEditorCB *f, void *userData = NULL)
90 void removeLightChangedCallback(SoXtDirectional‐
91 LightEditorCB *f, void *userData = NULL)
92 Additional way of using the directional light editor, by registering
93 a callback and setting the light.
94
95 void setLight(const SoDirectionalLight &newLight)
96 const SoDirectionalLight & getLight() const
97 Set new light values, and get the current light values.
98
99
101 SoXtComponent, SoDirectionalLight
102
103
104
105
106 SoXtDirectionalLightEditor(3IV)()