Debian Codegraph @

doc/man/man3/ivm/draggers/SoTransformerDragger.ivm

raw
1 NAME SoTransformerDragger "" "" { box-like object you scale, rotate, and translate by dragging with the mouse }
2
3 INCLUDE draggers/SoTransformerDragger.h
4
5 DESC { \cSoTransformerDragger\.
6 is a dragger shaped like a box. It has small cubes at the corners and small
7 balls sticking out of the middle of each face.
8 Click and drag any face of the box for 2D translation in the plane of that face.
9 Drag any corner-cube to scale the box uniformly.
10 Pick any of the mid-face balls to rotate the whole dragger about
11 its center.
12 \p
13 The \cSoTransformerDragger\. uses locate highlighting, so you can tell which part
14 you are about to select before pressing the mouse button. By default, the
15 locate highlight color is gold.
16 \p
17 Click-drag any \eface\. to translate the dragger within the plane of that
18 face. The face you selected will highlight in yellow. While you drag,
19 yellow \efeedback arrows\. display the
20 two directions of motion. Press the \k<Shift>\. key and the arrows turn
21 orange; you may now pick between these two directions to
22 \econstrain\. the motion. The direction you move the cursor in will determine
23 which direction is chosen.
24 Press the \k<Control>\. key and the dragger will translate
25 \eperpendicular\. to that plane. The \vtranslation\. field is modified
26 as the face is dragged.
27 \p
28 Click a \ecorner\. to scale the dragger. The corner you selected will
29 turn yellow and radial lines will indicate that you may move toward and away
30 from the center of the box. Drag radially and you will perform uniform scale.
31 Press the \k<Control>\. key to scale about the opposite corner instead of the center
32 of the box.
33 \p
34 To stretch the dragger non-uniformly, press \k<Shift>\. when you drag the
35 corner cube. Now you will see three orange arrows indicating that your
36 gesture will determine which direction to choose. Move the cursor and
37 the selected arrow will turn yellow while the others disappear. Now the
38 dragger will stretch only in the direction you selected.
39 Pressing \k<Control>\. at the same time as \k<Shift>\. allows you to stretch the
40 dragger while keeping the opposite side pinned in place.
41 When you drag a corner, this modifies the \vscaleFactor\.
42 and possibly the \vtranslation\. field of the dragger.
43 \p
44 Click one of the \espherical knobs\. to rotate the
45 dragger. When you first click, you'll see two orange lines and two purple
46 circles. The purple circles indicate the two ways you can rotate. The
47 orange lines are, once again, the two choices for your mouse gesture.
48 Each line begins you moving around one of the two circles.
49 Once you move the cursor far enough, the selected line turns yellow and you
50 begin rotating the dragger about the selected circle. The other circle
51 and line will disappear.
52 \p
53 To perform unconstrained ("free") rotation, just press \k<Shift>\. while you
54 drag the spherical knob. There will be no choices; instead all three
55 purple circles will be displayed, forming a ball that you can roll around.
56 Regardless of how you rotate, dragging the spherical knobs will modify the
57 \vrotatation\. field of the dragger. Depending on how it is centered and
58 what transforms precede it in the scene graph, rotation is likely to affect
59 the \vtranslation\. and \vscaleFactor\. fields as well.
60 \p
61 Pressing the \k<Control>\. key will change the center of rotation in both the
62 constrained and unconstrained (\k<Shift>\.) case. By default, rotation
63 occurs about the center of the bounding box. With \k<Control>\. depressed,
64 rotation occurs about the middle of the opposite side of the bounding
65 box. The purple feedback will change to illustrate this; the feedback circles
66 increase in size and purple crosshairs sprout at the new rotational center.
67 \p
68 Ordinarily, the knobs of the dragger are unsquished upon readin from file and
69 when the mouse button is released at the end of a drag. If you want this to
70 happen more often, then you should call the method \munsquishKnobs\..
71 \p
72 As with all draggers, if you change the fields the dragger will
73 move to match the new settings.
74 \p
75 \aRemember:\. This is \enot\. an \cSoTransform!\..
76 If you want to move other objects with this dragger, you can either:
77 \p
78 [a] Use an \cSoTransformerManip\., which is subclassed from \cSoTransform\..
79 It creates one of
80 these draggers and uses it as the interface to change its fields.
81 (see the \cSoTransformerManip\. man page).
82 \p
83 [b] Use field-to-field connections to connect the fields of this dragger to
84 those of any \cSoTransformation\. node.
85 \p
86 You can change the parts in any instance of this dragger using
87 \m\+setPart()\.\-SoDraggerSetPart()\.\..
88 The default part geometries are defined as resources for this
89 \cSoTransformerDragger\. class. They are detailed in the
90 Dragger Resources section of the online reference page for this class.
91 You can make your program use different default resources for the parts
92 by copying the file
93 \v/usr/share/data/draggerDefaults/transformerDragger.iv\.
94 into your own directory, editing the file, and then
95 setting the environment variable \vSO_DRAGGER_DIR\. to be a path to that directory.
96 }
97
98 METHOD "" SoTransformerDragger() {
99 Constructor.
100 }
101
102 METHOD getClassNkitCat static
103 const SoNodekitCatalog *getClassNodekitCatalog() const
104 { Returns an \cSoNodekitCatalog\. for this class }
105
106 METHOD "" static SoType getClassTypeId() {
107 Returns type identifier for this class.
108 }
109
110 METHOD getClassNkitCat static
111 const SoNodekitCatalog *getClassNodekitCatalog() const
112 { Returns an \cSoNodekitCatalog\. for this class }
113
114 METHOD "" static SoType getClassTypeId() {
115 Returns type identifier for this class.
116 }
117
118 METHOD "" void setColinearThreshold( int newVal ) {}
119 METHOD "" int getColinearThreshold()
120 {
121 When picking a direction for constraining based on gesture, this
122 paramater determines how many pixels must separate two axes before they
123 are regarded as distinct. If they are deemed "the same" then the shorter
124 of the two will be discarded.
125 }
126
127 METHOD "" void setLocateHighlighting( SbBool onOff ) {}
128 METHOD "" SbBool isLocateHighlighting()
129 {
130 Controls whether or not locate highlighting is used.
131 Default is TRUE.
132 }
133
134 METHOD "" void unsquishKnobs() {
135 Tells the dragger to unsquish its rotation and scale knobs during the next
136 traversal.
137 Ordinarily, the knobs are only unsquished upon readin from file and when
138 the mouse button is released at the end of a drag. If you want this to
139 happen more often, then you should call this method.
140 }
141
142 FIELD rotation { Orientation of the dragger. }
143 FIELD translation { Position of the dragger. }
144 FIELD scaleFactor { Scale of the dragger. }
145 FIELD minDiscRotDot { Specifies the minimum dot product between eyeDir and rotPlane normal before switching from record-player-type rotation to rolling-pin-type rotation. This transition is made so that rotations don't get screwy when the circle is edge-on. Lies in range [0-1]. Best to leave this alone. }
146
147 DRAGGER_RESOURCE {
148 transformerLocateMaterial,
149 none,
150 "Gold diffuse and emissive color",
151 "Locate highlight color used for all parts."
152 }
153
154 DRAGGER_RESOURCE {
155 transformerOverallStyle,
156 overallStyle,
157 "White Low-Complexity lines",
158 "If nothing else specified, this is style of the part."
159 }
160
161 DRAGGER_RESOURCE {
162 transformerTranslator1,
163 translator1,
164 "White Line-Style Square",
165 "Top face of transformer. Picking this initiates translation in x-z plane."
166 }
167 DRAGGER_RESOURCE {
168 transformerTranslator2,
169 translator2,
170 "White Line-Style Square",
171 "Bottom face of transformer. Picking this initiates translation in x-z plane."
172 }
173 DRAGGER_RESOURCE {
174 transformerTranslator3,
175 translator3,
176 "White Line-Style Square",
177 "Left face of transformer. Picking this initiates translation in y-z plane."
178 }
179 DRAGGER_RESOURCE {
180 transformerTranslator4,
181 translator4,
182 "White Line-Style Square",
183 "Right face of transformer. Picking this initiates translation in y-z plane."
184 }
185 DRAGGER_RESOURCE {
186 transformerTranslator5,
187 translator5,
188 "White Line-Style Square",
189 "Front face of transformer. Picking this initiates translation in x-y plane."
190 }
191 DRAGGER_RESOURCE {
192 transformerTranslator6,
193 translator6,
194 "White Line-Style Square",
195 "Back face of transformer. Picking this initiates translation in x-y plane."
196 }
197
198 DRAGGER_RESOURCE {
199 transformerTranslator1Active,
200 translator1Active,
201 "Yellow version of transformerTranslator1",
202 "Replaces transformerTranslator1 during dragging."
203 }
204 DRAGGER_RESOURCE {
205 transformerTranslator2Active,
206 translator2Active,
207 "Yellow version of transformerTranslator2",
208 "Replaces transformerTranslator2 during dragging."
209 }
210 DRAGGER_RESOURCE {
211 transformerTranslator3Active,
212 translator3Active,
213 "Yellow version of transformerTranslator3",
214 "Replaces transformerTranslator3 during dragging."
215 }
216 DRAGGER_RESOURCE {
217 transformerTranslator4Active,
218 translator4Active,
219 "Yellow version of transformerTranslator4",
220 "Replaces transformerTranslator4 during dragging."
221 }
222 DRAGGER_RESOURCE {
223 transformerTranslator5Active,
224 translator5Active,
225 "Yellow version of transformerTranslator5",
226 "Replaces transformerTranslator5 during dragging."
227 }
228 DRAGGER_RESOURCE {
229 transformerTranslator6Active,
230 translator6Active,
231 "Yellow version of transformerTranslator6",
232 "Replaces transformerTranslator6 during dragging."
233 }
234
235 DRAGGER_RESOURCE {
236 transformerRotator1,
237 rotator1,
238 "Green Sphere at end of a stick",
239 "Top knob of transformer. Picking this initiates rotation."
240 }
241 DRAGGER_RESOURCE {
242 transformerRotator2,
243 rotator2,
244 "Green Sphere at end of a stick",
245 "Bottom knob of transformer. Picking this initiates rotation."
246 }
247 DRAGGER_RESOURCE {
248 transformerRotator3,
249 rotator3,
250 "Green Sphere at end of a stick",
251 "Left knob of transformer. Picking this initiates rotation."
252 }
253 DRAGGER_RESOURCE {
254 transformerRotator4,
255 rotator4,
256 "Green Sphere at end of a stick",
257 "Right knob of transformer. Picking this initiates rotation."
258 }
259 DRAGGER_RESOURCE {
260 transformerRotator5,
261 rotator5,
262 "Green Sphere at end of a stick",
263 "Front knob of transformer. Picking this initiates rotation."
264 }
265 DRAGGER_RESOURCE {
266 transformerRotator6,
267 rotator6,
268 "Green Sphere at end of a stick",
269 "Back knob of transformer. Picking this initiates rotation."
270 }
271
272 DRAGGER_RESOURCE {
273 transformerRotator1Active,
274 rotator1Active,
275 "Yellow version of transformerRotator1",
276 "Replaces transformerRotator1 during dragging."
277 }
278 DRAGGER_RESOURCE {
279 transformerRotator2Active,
280 rotator2Active,
281 "Yellow version of transformerRotator2",
282 "Replaces transformerRotator2 during dragging."
283 }
284 DRAGGER_RESOURCE {
285 transformerRotator3Active,
286 rotator3Active,
287 "Yellow version of transformerRotator3",
288 "Replaces transformerRotator3 during dragging."
289 }
290 DRAGGER_RESOURCE {
291 transformerRotator4Active,
292 rotator4Active,
293 "Yellow version of transformerRotator4",
294 "Replaces transformerRotator4 during dragging."
295 }
296 DRAGGER_RESOURCE {
297 transformerRotator5Active,
298 rotator5Active,
299 "Yellow version of transformerRotator5",
300 "Replaces transformerRotator5 during dragging."
301 }
302 DRAGGER_RESOURCE {
303 transformerRotator6Active,
304 rotator6Active,
305 "Yellow version of transformerRotator6",
306 "Replaces transformerRotator6 during dragging."
307 }
308
309
310 DRAGGER_RESOURCE {
311 transformerScale1,
312 scale1,
313 "Small white cube in (+x+y+z) corner of transformer",
314 "Picking this initiates scaling."
315 }
316 DRAGGER_RESOURCE {
317 transformerScale2,
318 scale2,
319 "Small white cube in (+x+y-z) corner of transformer",
320 "Picking this initiates scaling."
321 }
322 DRAGGER_RESOURCE {
323 transformerScale3,
324 scale3,
325 "Small white cube in (+x-y+z) corner of transformer",
326 "Picking this initiates scaling."
327 }
328 DRAGGER_RESOURCE {
329 transformerScale4,
330 scale4,
331 "Small white cube in (+x-y-z) corner of transformer",
332 "Picking this initiates scaling."
333 }
334 DRAGGER_RESOURCE {
335 transformerScale5,
336 scale5,
337 "Small white cube in (-x+y+z) corner of transformer",
338 "Picking this initiates scaling."
339 }
340 DRAGGER_RESOURCE {
341 transformerScale6,
342 scale6,
343 "Small white cube in (-x+y-z) corner of transformer",
344 "Picking this initiates scaling."
345 }
346 DRAGGER_RESOURCE {
347 transformerScale7,
348 scale7,
349 "Small white cube in (-x-y+z) corner of transformer",
350 "Picking this initiates scaling."
351 }
352
353 DRAGGER_RESOURCE {
354 transformerScale8,
355 scale8,
356 "Small white cube in (-x-y-z) corner of transformer",
357 "Picking this initiates scaling."
358 }
359
360 DRAGGER_RESOURCE {
361 transformerScale1Active,
362 scale1Active,
363 "Yellow version of transformerScale1Active",
364 "Replaces transformerScale1Active during dragging."
365 }
366 DRAGGER_RESOURCE {
367 transformerScale2Active,
368 scale2Active,
369 "Yellow version of transformerScale2Active",
370 "Replaces transformerScale2Active during dragging."
371 }
372 DRAGGER_RESOURCE {
373 transformerScale3Active,
374 scale3Active,
375 "Yellow version of transformerScale3Active",
376 "Replaces transformerScale3Active during dragging."
377 }
378 DRAGGER_RESOURCE {
379 transformerScale4Active,
380 scale4Active,
381 "Yellow version of transformerScale4Active",
382 "Replaces transformerScale4Active during dragging."
383 }
384 DRAGGER_RESOURCE {
385 transformerScale5Active,
386 scale5Active,
387 "Yellow version of transformerScale5Active",
388 "Replaces transformerScale5Active during dragging."
389 }
390 DRAGGER_RESOURCE {
391 transformerScale6Active,
392 scale6Active,
393 "Yellow version of transformerScale6Active",
394 "Replaces transformerScale6Active during dragging."
395 }
396 DRAGGER_RESOURCE {
397 transformerScale7Active,
398 scale7Active,
399 "Yellow version of transformerScale7Active",
400 "Replaces transformerScale7Active during dragging."
401 }
402 DRAGGER_RESOURCE {
403 transformerScale8Active,
404 scale8Active,
405 "Yellow version of transformerScale8Active",
406 "Replaces transformerScale8Active during dragging."
407 }
408
409
410 DRAGGER_RESOURCE {
411 transformerXAxisFeedbackActive,
412 xAxisFeedbackActive,
413 "Yellow arrow along X axis",
414 "Displayed when translating if X direction is permitted."
415 }
416 DRAGGER_RESOURCE {
417 transformerXAxisFeedbackSelect,
418 xAxisFeedbackSelect,
419 "Orange arrow along X axis",
420 "Displayed when awaiting gesture to pick between X axis and another direction(s)."
421 }
422
423
424 DRAGGER_RESOURCE {
425 transformerYAxisFeedbackActive,
426 yAxisFeedbackActive,
427 "Yellow arrow along Y axis",
428 "Displayed when translating if Y direction is permitted."
429 }
430 DRAGGER_RESOURCE {
431 transformerYAxisFeedbackSelect,
432 yAxisFeedbackSelect,
433 "Orange arrow along Y axis",
434 "Displayed when awaiting gesture to pick between Y axis and another direction(s)."
435 }
436
437
438 DRAGGER_RESOURCE {
439 transformerZAxisFeedbackActive,
440 zAxisFeedbackActive,
441 "Yellow arrow along Z axis",
442 "Displayed when translating if Z direction is permitted."
443 }
444 DRAGGER_RESOURCE {
445 transformerZAxisFeedbackSelect,
446 zAxisFeedbackSelect,
447 "Orange arrow along Z axis",
448 "Displayed when awaiting gesture to pick between Z axis and another direction(s)."
449 }
450
451 DRAGGER_RESOURCE {
452 transformerXCrosshairFeedback,
453 xCrosshairFeedback,
454 "Yellow crossHair in y-z plane",
455 "Displayed when translating perpendicular to y-z plane."
456 }
457 DRAGGER_RESOURCE {
458 transformerYCrosshairFeedback,
459 yCrosshairFeedback,
460 "Yellow crossHair in x-z plane",
461 "Displayed when translating perpendicular to x-z plane."
462 }
463 DRAGGER_RESOURCE {
464 transformerZCrosshairFeedback,
465 zCrosshairFeedback,
466 "Yellow crossHair in x-y plane",
467 "Displayed when translating perpendicular to x-y plane."
468 }
469
470
471 DRAGGER_RESOURCE {
472 transformerXCircleFeedback,
473 xCircleFeedback,
474 "Purple Unit Circle about X axis",
475 "Displayed when rotating about X axis"
476 }
477 DRAGGER_RESOURCE {
478 transformerYCircleFeedback,
479 yCircleFeedback,
480 "Purple Unit Circle about Y axis",
481 "Displayed when rotating about Y axis"
482 }
483 DRAGGER_RESOURCE {
484 transformerZCircleFeedback,
485 zCircleFeedback,
486 "Purple Unit Circle about Z axis",
487 "Displayed when rotating about Z axis"
488 }
489
490 DRAGGER_RESOURCE {
491 transformerRadialFeedback,
492 radialFeedback,
493 "Purple Rays emanating from center through corners",
494 "Displayed when scaling uniformly about center."
495 }
496 DRAGGER_RESOURCE {
497 transformerTranslateBoxFeedback,
498 translateBoxFeedback,
499 "Purple Box with one bright yellow side",
500 "Displayed when translating. Automatically oriented so yellow side matches selected face."
501 }
502
503 DRAGGER_RESOURCE {
504 transformerPosXWallFeedback,
505 posXWallFeedback,
506 "Purple Plane along Right side of transformer",
507 "Displayed when <Control> scaling and keeping right side fixed."
508 }
509 DRAGGER_RESOURCE {
510 transformerPosYWallFeedback,
511 posYWallFeedback,
512 "Purple Plane along Top side of transformer",
513 "Displayed when <Control> scaling and keeping top side fixed."
514 }
515 DRAGGER_RESOURCE {
516 transformerPosZWallFeedback,
517 posZWallFeedback,
518 "Purple Plane along Front side of transformer",
519 "Displayed when <Control> scaling and keeping front side fixed."
520 }
521 DRAGGER_RESOURCE {
522 transformerNegXWallFeedback,
523 negXWallFeedback,
524 "Purple Plane along Left side of transformer",
525 "Displayed when <Control> scaling and keeping left side fixed."
526 }
527 DRAGGER_RESOURCE {
528 transformerNegYWallFeedback,
529 negYWallFeedback,
530 "Purple Plane along Bottom side of transformer",
531 "Displayed when <Control> scaling and keeping bottom side fixed."
532 }
533 DRAGGER_RESOURCE {
534 transformerNegZWallFeedback,
535 negZWallFeedback,
536 "Purple Plane along Back side of transformer",
537 "Displayed when <Control> scaling and keeping back side fixed."
538 }
539
540
541 ALSO {
542 SoDragger,
543 SoInteractionKit,
544 SoLocateHighlight,
545 SoCenterballDragger,
546 SoDirectionalLightDragger,
547 SoDragPointDragger,
548 SoHandleBoxDragger,
549 SoJackDragger,
550 SoPointLightDragger,
551 SoRotateCylindricalDragger,
552 SoRotateDiscDragger,
553 SoRotateSphericalDragger,
554 SoScale1Dragger,
555 SoScale2Dragger,
556 SoScale2UniformDragger,
557 SoScaleUniformDragger,
558 SoSpotLightDragger,
559 SoTabBoxDragger,
560 SoTabPlaneDragger,
561 SoTrackballDragger,
562 SoTransformBoxDragger,
563 SoTranslate1Dragger,
564 SoTranslate2Dragger
565 }