| 1 |
NAME SoXtDirectionalLightEditor SoXtDirLtEd "" { |
| 2 |
component for editing directional lights |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE Xt/SoXtDirectionalLightEditor.h |
| 6 |
|
| 7 |
TYPEDEF void SoXtDirectionalLightEditorCB "(void *userData, const SoDirectionalLight *light)" |
| 8 |
|
| 9 |
DESC { |
| 10 |
This class is used to edit an \cSoDirectionalLight\. |
| 11 |
node (color, intensity, and direction are changed). In addition to |
| 12 |
directly editing directional light nodes, the editor can also be used |
| 13 |
with callbacks which will be called whenever the light is changed. The |
| 14 |
component consists of a render area and a value slider in the main window, |
| 15 |
with controls to display a color picker. In the render area there appears |
| 16 |
a sphere representing the world, and a directional light manipulator |
| 17 |
representing the direction of the light. Picking on the manipulator and |
| 18 |
moving the mouse provides direct manipulation of the light direction. The |
| 19 |
color picker is used to edit the color, and the value slider edits the |
| 20 |
intensity. |
| 21 |
|
| 22 |
\p |
| 23 |
The editor can currently be attached to only one light at a time. |
| 24 |
Attaching to two different lights will automatically detach the |
| 25 |
first one before attaching the second. |
| 26 |
} |
| 27 |
|
| 28 |
METHOD "" SoXtDirectionalLightEditor( |
| 29 |
Widget parent = NULL, |
| 30 |
const char *name = NULL, |
| 31 |
SbBool buildInsideParent = TRUE) {} |
| 32 |
METHOD "" ~SoXtDirectionalLightEditor() |
| 33 |
{ |
| 34 |
Constructor and destructor. |
| 35 |
} |
| 36 |
|
| 37 |
METHOD "" void attach(SoPath *pathToLight) {} |
| 38 |
METHOD "" void detach() |
| 39 |
{ |
| 40 |
Attach/detach the editor to/from a directional light. When attached, |
| 41 |
changes made in the editor directly affect the attached light. |
| 42 |
} |
| 43 |
|
| 44 |
METHOD "" SbBool isAttached() |
| 45 |
{ |
| 46 |
Returns TRUE if the editor is attached. |
| 47 |
} |
| 48 |
|
| 49 |
METHOD addLtChangedCB void addLightChangedCallback( |
| 50 |
SoXtDirectionalLightEditorCB *f, |
| 51 |
void *userData = NULL) {} |
| 52 |
METHOD removeLtChangedCB void removeLightChangedCallback( |
| 53 |
SoXtDirectionalLightEditorCB *f, |
| 54 |
void *userData = NULL) |
| 55 |
{ |
| 56 |
Additional way of using the directional light editor, by |
| 57 |
registering a callback and setting the light. |
| 58 |
} |
| 59 |
|
| 60 |
METHOD setLt void setLight(const SoDirectionalLight &newLight) {} |
| 61 |
METHOD getLt const SoDirectionalLight &getLight() const |
| 62 |
{ |
| 63 |
Set new light values, and get the current light values. |
| 64 |
} |
| 65 |
|
| 66 |
|
| 67 |
ALSO { SoXtComponent, SoDirectionalLight } |