1SoDirectionalLightDragger(3IV)() SoDirectionalLightDragger(3IV)()
2
3
4
6 SoDirectionalLightDragger — directional icon you rotate and translate
7 by dragging with the mouse
8
10 SoBase > SoFieldContainer > SoNode > SoBaseKit > SoInteractionKit >
11 SoDragger > SoDirectionalLightDragger
12
14 #include <Inventor/draggers/SoDirectionalLightDragger.h>
15
16 Fields from class SoDirectionalLightDragger:
17
18 SoSFRotation rotation
19 SoSFVec3f translation
20
21 Fields from class SoDragger:
22
23 SoSFBool isActive
24
25 Fields from class SoInteractionKit:
26
27 SoSFEnum renderCaching
28 SoSFEnum boundingBoxCaching
29 SoSFEnum renderCulling
30 SoSFEnum pickCulling
31
32 Parts from class SoBaseKit:
33
34 (SoNodeKitListPart) callbackList
35
36 Methods from class SoDirectionalLightDragger:
37
38 SoDirectionalLightDragger()
39 static const SoNodekitCatalog *
40 getClassNodekitCatalog() const
41 static SoType getClassTypeId()
42
43 Methods from class SoDragger:
44
45 void addStartCallback(SoDraggerCB *f, void *userData =
46 NULL)
47 void removeStartCallback(SoDraggerCB *f, void *userData =
48 NULL)
49 void addMotionCallback(SoDraggerCB *f, void *userData =
50 NULL)
51 void removeMotionCallback(SoDraggerCB *f, void *userData =
52 NULL)
53 void addFinishCallback(SoDraggerCB *f, void *userData =
54 NULL)
55 void removeFinishCallback(SoDraggerCB *f, void *userData =
56 NULL)
57 void addValueChangedCallback(SoDraggerCB *f, void *user‐
58 Data = NULL)
59 void removeValueChangedCallback(SoDraggerCB *f, void
60 *userData = NULL)
61 SbBool enableValueChangedCallbacks()
62 void setMinGesture(int pixels)
63 int getMinGesture() const
64 static void setMinScale(float newMinScale)
65 static float getMinScale()
66
67 Methods from class SoInteractionKit:
68
69 virtual SbBool setPartAsPath(const SbName &partName, SoPath *surro‐
70 gatePath )
71
72 Methods from class SoBaseKit:
73
74 virtual const SoNodekitCatalog *
75 getNodekitCatalog() const
76 virtual SoNode * getPart(const SbName &partName, SbBool
77 makeIfNeeded)
78 SbString getPartString(const SoBase *part)
79 virtual SoNodeKitPath * createPathToPart(const SbName &partName, SbBool
80 makeIfNeeded, const SoPath *pathToExtend =
81 NULL)
82 virtual SbBool setPart(const SbName &partName, SoNode *newPart)
83 SbBool set(char *partName, char *parameters)
84 SbBool set(char *nameValuePairs)
85 static SbBool isSearchingChildren()
86 static void setSearchingChildren(SbBool newVal)
87
88 Methods from class SoNode:
89
90 void setOverride(SbBool state)
91 SbBool isOverride() const
92 SoNode * copy(SbBool copyConnections = FALSE) const
93 virtual SbBool affectsState() const
94 static SoNode * getByName(const SbName &name)
95 static int getByName(const SbName &name, SoNodeList &list)
96
97 Methods from class SoFieldContainer:
98
99 void setToDefaults()
100 SbBool hasDefaultValues() const
101 SbBool fieldsAreEqual(const SoFieldContainer *fc) const
102 void copyFieldValues(const SoFieldContainer *fc, SbBool
103 copyConnections = FALSE)
104 void get(SbString &fieldDataString)
105 virtual int getFields(SoFieldList &resultList) const
106 virtual SoField * getField(const SbName &fieldName) const
107 SbBool getFieldName(const SoField *field, SbName &fieldName)
108 const
109 SbBool isNotifyEnabled() const
110 SbBool enableNotify(SbBool flag)
111
112 Methods from class SoBase:
113
114 void ref()
115 void unref() const
116 void unrefNoDelete() const
117 void touch()
118 virtual SoType getTypeId() const
119 SbBool isOfType(SoType type) const
120 virtual void setName(const SbName &name)
121 virtual SbName getName() const
122
123 Macros from class SoBaseKit:
124
125 SO_GET_PART(kit, partName, partClass)
126 SO_CHECK_PART(kit, partName, partClass)
127
128
130 SoDirectionalLightDragger is a composite dragger. It looks like a sun
131 with a large arrow coming out of it. The arrow can be rotated about the
132 sun by dragging with the mouse; its orientation is given by the rota‐
133 tion field. You can also drag the sun (and the arrow with it) through
134 3-space. The location is stored in the translation field.
135
136 The dragger uses an SoRotateSphericalDragger for changing the rotation.
137 Instead of using the default spherical geometry, this dragger uses an
138 arrow shape.
139
140 The sun is an SoDragPointDragger. Dragging it edits the translation
141 field; conversely, if you change the translation field the sun will
142 move to that new location, bringing the arrow with it. The sun looks
143 and behaves just like the sun in an SoPointLightDragger, as does the
144 material part. See the SoPointLightDragger man page for details.
145
146 Remember: This is not a light source! It just looks like one. If you
147 want to move a light with this dragger, you can either:
148
149 [a] Use an SoDirectionalLightManip, which is subclassed from SoLight.
150 It creates an SoDirectionalLightDragger and uses it as the interface to
151 change the direction of its light source (see the SoDirectionalLightMa‐
152 nip man page). The manipulator also edits the material part of this
153 dragger to match the color of light the manipulator is producing. How‐
154 ever, the directional light manipulator will ignore the translation
155 field, because a directional light has no location or translation
156 field. So in this case the translation dragger merely allows you to
157 move the physical arrow to wherever you'd like it to be.
158
159 [b] Put an SoTransform under an SoTransformSeparator. Add the SoDirec‐
160 tionalLight as the next child. Use a field-to-field connection between
161 the rotation fields of this dragger and the transform node to synchro‐
162 nize the light with this dragger.
163
164 [c] Use engines to connect the rotation field of this dragger to the
165 direction field of an SoDirectionalLight. Use the rotation as input to
166 an SoComposeMatrix engine. Then, use an SoTransformVec3f engine to
167 apply that matrix to (0,0,-1), the default light direction.
168
169 You can change the parts in any instance of this dragger using set‐
170 Part(). The default part geometries are defined as resources for this
171 SoDirectionalLightDragger class. They are detailed in the Dragger
172 Resources section of the online reference page for this class. You can
173 make your program use different default resources for the parts by
174 copying the file /usr/share/data/draggerDefaults/directionalLightDrag‐
175 ger.iv into your own directory, editing the file, and then setting the
176 environment variable SO_DRAGGER_DIR to be a path to that directory.
177
179 SoSFRotation rotation
180 Orientation of the rotating part (an arrow by default).
181
182 SoSFVec3f translation
183 Position of the origin of the directional light dragger.
184
185
187 SoDirectionalLightDragger()
188 Constructor.
189
190 static const SoNodekitCatalog *
191 getClassNodekitCatalog() const
192 Returns an SoNodekitCatalog for this class
193
194 static SoType getClassTypeId()
195 Returns type identifier for this class.
196
197
199 ┌───────────────────────────────────────────────────────────────────┐
200 │ All parts │
201 │ NULL by │
202 │Part Name Part Type Default Type Default │
203 │ │
204 │callbackList NodeKitListPart -- yes │
205 │material Material -- yes │
206 │translatorRotInv Rotation -- yes │
207 │translator DragPointDragger -- yes │
208 │rotator RotateSphericalDragger -- yes │
209 │ │
210 └───────────────────────────────────────────────────────────────────┘
211 ┌───────────────────────────────────────────────────────────────┐
212 │ Extra information for list parts from above table │
213 │ │
214 │Part Name Container Type Permissible Types │
215 │ │
216 │callbackList Separator Callback, EventCallback │
217 │ │
218 └───────────────────────────────────────────────────────────────┘
220 .in 0n+.5i
221 Resource: directionalLightRotatorRotator
222 .in 0n+.5i
223 Part: rotator.rotator
224 Appearance: white arrow that goes through the sun
225 Description: picking this begins rotation of the arrow about the
226 sun-shape
227
228 .in 0n+.5i
229 Resource: directionalLightRotatorRotatorActive
230 .in 0n+.5i
231 Part: rotator.rotatorActive
232 Appearance: yellow arrow that goes through the sun
233 Description: displayed while the arrow is being rotated
234
235 .in 0n+.5i
236 Resource: directionalLightRotatorFeedback
237 .in 0n+.5i
238 Part: rotator.feedback
239 Appearance: empty Separator
240 Description: this disables display of the axes that a rotateSpheri‐
241 cal dragger uses by default
242
243 .in 0n+.5i
244 Resource: directionalLightRotatorFeedbackActive
245 .in 0n+.5i
246 Part: rotator.feedbackActive
247 Appearance: empty Separator
248 Description: this disables display of the axes that a rotateSpheri‐
249 cal dragger uses by default
250
251 .in 0n+.5i
252 Resource: directionalLightOverallMaterial
253 .in 0n+.5i
254 Part: material
255 Appearance: white. half strength emissive, half strength diffuse
256 Description: sets material for the sun shape when stationary.
257 Resource for the moving sun, directionalLightTransla‐
258 torPlaneTranslatorActive, contains a yellow material
259 for highlighting.
260
261 .in 0n+.5i
262 Resource: directionalLightTranslatorPlaneTranslator
263 .in 0n+.5i
264 Parts: translator.yzTranslator.translator
265 translator.xzTranslator.translator
266 translator.xyTranslator.translator
267 Appearance: sun shape with no material
268 Description: picking these parts initiates dragging by the yz, xz,
269 and xy planar draggers respectively.
270
271 .in 0n+.5i
272 Resource: directionalLightTranslatorPlaneTranslatorActive
273 .in 0n+.5i
274 Parts: translator.yzTranslator.translatorActive
275 translator.xzTranslator.transla‐
276 torActive
277 translator.xyTranslator.transla‐
278 torActive
279 Appearance: yellow sun shape
280 Description: shown during planar dragging in the yz, xz, and xy
281 planes respectively.
282
283 .in 0n+.5i
284 Resource: directionalLightTranslatorLineTranslator
285 .in 0n+.5i
286 Parts: translator.xTranslator.translator
287 translator.yTranslator.translator
288 translator.zTranslator.translator
289 Appearance: white cylinder
290 Description: picking these parts initiates dragging in the x, y, and
291 z linear draggers respectively.
292
293 .in 0n+.5i
294 Resource: directionalLightTranslatorLineTranslatorActive
295 .in 0n+.5i
296 Parts: translator.xTranslator.translatorActive
297 translator.yTranslator.transla‐
298 torActive
299 translator.zTranslator.transla‐
300 torActive
301 Appearance: yellow cylinder
302 Description: shown during linear dragging in the x, y, and z direc‐
303 tions respectively.
304
305
307 DirectionalLightDragger {
308 renderCaching AUTO
309 boundingBoxCaching AUTO
310 renderCulling AUTO
311 pickCulling AUTO
312 isActive FALSE
313 translation 0 0 0
314 rotation 0 0 1 0
315 callbackList NULL
316 material <directionalLightOverallMaterial resource>
317 translatorRotInv NULL
318 translator DragPointDragger {
319 }
320
321 rotator RotateSphericalDragger {
322 }
323
324 rotator.rotator <directionalLightRotatorRotator resource>
325 rotator.rotatorActive <directionalLightRotatorRotatorActive resource>
326 rotator.feedback <directionalLightRotatorFeedback resource>
327 rotator.feedbackActive <directionalLightRotatorFeedbackActive resource>
328 translator.yzTranslator.translator <directionalLightTranslatorPlaneTranslator resource>
329 translator.xzTranslator.translator <directionalLightTranslatorPlaneTranslator resource>
330 translator.xyTranslator.translator <directionalLightTranslatorPlaneTranslator resource>
331 translator.yzTranslator.translatorActive <directionalLightTranslatorPlaneTranslatorActive resource>
332 translator.xzTranslator.translatorActive <directionalLightTranslatorPlaneTranslatorActive resource>
333 translator.xyTranslator.translatorActive <directionalLightTranslatorPlaneTranslatorActive resource>
334 translator.xTranslator.translator <directionalLightTranslatorLineTranslator resource>
335 translator.yTranslator.translator <directionalLightTranslatorLineTranslator resource>
336 translator.zTranslator.translator <directionalLightTranslatorLineTranslator resource>
337 translator.xTranslator.translatorActive <directionalLightTranslatorLineTranslatorActive resource>
338 translator.yTranslator.translatorActive <directionalLightTranslatorLineTranslatorActive resource>
339 translator.zTranslator.translatorActive <directionalLightTranslatorLineTranslatorActive resource>
340 }
341
343 SoInteractionKit, SoDragger, SoCenterballDragger, SoDragPointDragger,
344 SoHandleBoxDragger, SoJackDragger, SoPointLightDragger, SoRotateCylin‐
345 dricalDragger, SoRotateDiscDragger, SoRotateSphericalDragger,
346 SoScale1Dragger, SoScale2Dragger, SoScale2UniformDragger, SoScaleUni‐
347 formDragger, SoSpotLightDragger, SoTabBoxDragger, SoTabPlaneDragger,
348 SoTrackballDragger, SoTransformBoxDragger, SoTransformerDragger,
349 SoTranslate1Dragger, SoTranslate2Dragger
350
351
352
353
354 SoDirectionalLightDragger(3IV)()