Debian Codegraph @

doc/man/man3/ivm/components/SoXtMaterialEditor.ivm

raw
1 NAME SoXtMaterialEditor SoXtMtlEd SO_XT_MTL_ED_ {
2 Component which lets you edit a material interactively
3 }
4
5 TYPEDEF void SoXtMaterialEditorCB "(void *userData, const SoMaterial *mtl)"
6
7 ENUM UpdateFrequency {
8 CONTINUOUS "send updates with every mouse motion",
9 AFTER_ACCEPT "only send updates after user hits accept button"
10 }
11
12 INCLUDE Xt/SoXtMaterialEditor.h
13
14 DESC {
15 This class is used to edit the material properties of an
16 \cSoMaterial\.
17 node. The editor can also directly be used using callbacks instead of
18 attaching it to a node. The component consists of a render area
19 displaying a test sphere, some sliders, a set of radio buttons, and a
20 menu. The sphere displays the current material being edited. There is one
21 slider for each material coefficient. Those fields are ambient, diffuse,
22 specular, emissive (all of which are colors); and transparency and
23 shininess (which are scalar values). A color editor can be opened to edit
24 the color slider base color. A material list displays palettes of
25 predefined materials from which to choose.
26
27 \p
28 The editor can currently be attached to only one material at a time.
29 Attaching two different materials will automatically detach the first one
30 before attaching the second.
31 }
32
33 METHOD "" SoXtMaterialEditor(
34 Widget parent = NULL,
35 const char *name = NULL,
36 SbBool buildInsideParent = TRUE) {}
37 METHOD "" ~SoXtMaterialEditor()
38 {
39 Constructor and destructor.
40 }
41
42 METHOD "" void attach(SoMaterial *material, int index = 0) {}
43 METHOD "" void detach()
44 {
45 Attach/detach the editor to a material node and edit the material
46 of the given index.
47 }
48
49 METHOD "" SbBool isAttached()
50 {
51 Returns TRUE if the editor is attached.
52 }
53
54 METHOD addMtlChangedCB void addMaterialChangedCallback(
55 SoXtMaterialEditorCB *f,
56 void *userData = NULL) {}
57 METHOD removeMtlChangedCB void removeMaterialChangedCallback(
58 SoXtMaterialEditorCB *f,
59 void *userData = NULL)
60 {
61 Additional way of using the material editor, by registering a callback
62 which will be called whenever the material changes (check the
63 \vUpdateFrequency\.
64 to find when the callbacks will be called).
65 }
66
67 METHOD setUpdateFreq void setUpdateFrequency(SoXtMaterialEditor::UpdateFrequency freq) {}
68 METHOD getUpdateFreq SoXtMaterialEditor::UpdateFrequency getUpdateFrequency()
69 {
70 Sets/gets the update frequency. See the \vUpdateFrequency\. enum declaration.
71 }
72
73 METHOD setMtl void setMaterial(const SoMaterial &mtl) {}
74 METHOD getMtl const SoMaterial & getMaterial() const
75 {
76 Set a new material value, and get the current material value.
77 }
78
79 MISC RESOURCES {
80 \b
81 *SoXtMaterialEditor.tile1Color: #4c4c4c (color name or hex value)
82 *SoXtMaterialEditor.tile2Color: #999999 (color name or hex value)
83 *SoXtMaterialEditor.light1Color: white (color name or hex value)
84 *SoXtMaterialEditor.light2Color: white (color name or hex value)
85 *SoXtMaterialEditor.updateFrequency: continuous (continuous | manual)\.
86 }
87
88 ALSO { SoXtComponent, SoXtMaterialList,
89 SoXtDirLightEditor, SoMaterial }