Open Inventor Reference
SoTransformerDragger.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * Further, this software is distributed without any warranty that it is
16  * free of the rightful claim of any third person regarding infringement
17  * or the like. Any license provided herein, whether implied or
18  * otherwise, applies only to this software file. Patent licenses, if
19  * any, provided herein do not apply to combinations of this program with
20  * other software, or any other product whatsoever.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27  * Mountain View, CA 94043, or:
28  *
29  * http://www.sgi.com
30  *
31  * For further information regarding this notice, see:
32  *
33  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34  *
35  */
36 
37 
38 /*
39  * Copyright (C) 1990,91 Silicon Graphics, Inc.
40  *
41  _______________________________________________________________________
42  ______________ S I L I C O N G R A P H I C S I N C . ____________
43  |
44  | Description:
45  | This file defines the SoTransformerDragger class.
46  |
47  | NOTE TO DEVELOPERS:
48  | For info about the structure of SoTransformerDragger:
49  | [1] compile: /usr/share/src/Inventor/samples/ivNodeKitStructure
50  | [2] type: ivNodeKitStructure SoTransformerDragger.
51  | [3] The program prints a diagram of the scene graph and a table with
52  | information about each part.
53  |
54  | The following parts in this dragger are created at construction time.
55  | 'ResourceName' corresponds to the name of the default geometry for the
56  | part. The dragger's constructor gets the scene graph for 'ResourceName'
57  | by querying the global dictionary ( SoDB::getByName("ResourceName"); ).
58  |
59  | Resource Name: Part Name:
60  |
61  | transformerOverallStyle - overallStyle
62  |
63  | NOTE: for the translators and rotators,
64  | numbering refers to a cube-face:
65  | 1=top,2=bot,3=lft,4=rit,5=fnt,6=bak
66  |
67  | transformerTranslator1 - translator1
68  | transformerTranslator1Active - translator1Active
69  | (ditto for translator2-translator6)
70  |
71  | transformerRotator1 - rotator1
72  | transformerRotator1Active - rotator1Active
73  | (ditto for rotator2-rotator6)
74  |
75  |
76  | NOTE: for the scalers,
77  | numbers refer to a corner:
78  | 1=+x+y+z, 2=+x+y-z, 3=+x-y+z,
79  | 4=+x-y-z, 5=-x+y+z, 6=-x+y-z,
80  | 7=-x-y+z, 8=-x-y-z
81  | transformerScale1 - scale1
82  | transformerScale1Active - scale1Active
83  | (ditto for scale2-scale8)
84  |
85  | Feedback for translation
86  | transformerTranslateBoxFeedback - translateBoxFeedback
87  |
88  | Feedback for scaling
89  | transformerScaleBoxFeedback - scaleBoxFeedback
90  |
91  | Feedback for <Control> + scaling
92  | transformerPosXWallFeedback - posXWallFeedback
93  | transformerPosYWallFeedback - posYWallFeedback
94  | transformerPosZWallFeedback - posZWallFeedback
95  | transformerNegXWallFeedback - negXWallFeedback
96  | transformerNegYWallFeedback - negYWallFeedback
97  | transformerNegZWallFeedback - negZWallFeedback
98  |
99  | Feedback for <Control> + rotating
100  | transformerPosXRoundWallFeedback - posXRoundWallFeedback
101  | transformerPosYRoundWallFeedback - posYRoundWallFeedback
102  | transformerPosZRoundWallFeedback - posZRoundWallFeedback
103  | transformerNegXRoundWallFeedback - negXRoundWallFeedback
104  | transformerNegYRoundWallFeedback - negYRoundWallFeedback
105  | transformerNegZRoundWallFeedback - negZRoundWallFeedback
106  |
107  | Feedback for translation and for 1D scaling
108  | transformerXAxisFeedbackActive - xAxisFeedbackActive
109  | transformerYAxisFeedbackActive - yAxisFeedbackActive
110  | transformerZAxisFeedbackActive - zAxisFeedbackActive
111  | transformerXAxisFeedbackSelect - xAxisFeedbackSelect
112  | transformerYAxisFeedbackSelect - yAxisFeedbackSelect
113  | transformerZAxisFeedbackSelect - zAxisFeedbackSelect
114  |
115  | Feedback for <Control> + translation:
116  | transformerXCrosshairFeedback - xCrosshairFeedback
117  | transformerYCrosshairFeedback - yCrosshairFeedback
118  | transformerZCrosshairFeedback - zCrosshairFeedback
119  |
120  | Feedback for uniform scaling
121  | transformerRadialFeedback - radialFeedback
122  |
123  | Feedback for 1D rotation
124  | transformerXCircleFeedback - xCircleFeedback
125  | transformerYCircleFeedback - yCircleFeedback
126  | transformerZCircleFeedback - zCircleFeedback
127  |
128  | Author(s): Paul Isaacs
129  |
130  ______________ S I L I C O N G R A P H I C S I N C . ____________
131  _______________________________________________________________________
132  */
133 
134 #ifndef _SO_TRANSFORMER_DRAGGER_
135 #define _SO_TRANSFORMER_DRAGGER_
136 
137 #include <Inventor/SoLists.h>
143 
144 class SbDict;
145 class SbPlaneProjector;
146 class SbLineProjector;
149 class SoFieldSensor;
150 
151 
154 
283 
285 
287 
288  SO_KIT_CATALOG_ENTRY_HEADER(overallStyle);
289 
291  SO_KIT_CATALOG_ENTRY_HEADER(surroundScale);
292 
293  SO_KIT_CATALOG_ENTRY_HEADER(translatorSep);
294  SO_KIT_CATALOG_ENTRY_HEADER(translator1Switch);
295  SO_KIT_CATALOG_ENTRY_HEADER(translator1LocateGroup);
296  SO_KIT_CATALOG_ENTRY_HEADER(translator1);
297  SO_KIT_CATALOG_ENTRY_HEADER(translator1Active);
298  SO_KIT_CATALOG_ENTRY_HEADER(translator2Switch);
299  SO_KIT_CATALOG_ENTRY_HEADER(translator2LocateGroup);
300  SO_KIT_CATALOG_ENTRY_HEADER(translator2);
301  SO_KIT_CATALOG_ENTRY_HEADER(translator2Active);
302  SO_KIT_CATALOG_ENTRY_HEADER(translator3Switch);
303  SO_KIT_CATALOG_ENTRY_HEADER(translator3LocateGroup);
304  SO_KIT_CATALOG_ENTRY_HEADER(translator3);
305  SO_KIT_CATALOG_ENTRY_HEADER(translator3Active);
306  SO_KIT_CATALOG_ENTRY_HEADER(translator4Switch);
307  SO_KIT_CATALOG_ENTRY_HEADER(translator4LocateGroup);
308  SO_KIT_CATALOG_ENTRY_HEADER(translator4);
309  SO_KIT_CATALOG_ENTRY_HEADER(translator4Active);
310  SO_KIT_CATALOG_ENTRY_HEADER(translator5Switch);
311  SO_KIT_CATALOG_ENTRY_HEADER(translator5LocateGroup);
312  SO_KIT_CATALOG_ENTRY_HEADER(translator5);
313  SO_KIT_CATALOG_ENTRY_HEADER(translator5Active);
314  SO_KIT_CATALOG_ENTRY_HEADER(translator6Switch);
315  SO_KIT_CATALOG_ENTRY_HEADER(translator6LocateGroup);
316  SO_KIT_CATALOG_ENTRY_HEADER(translator6);
317  SO_KIT_CATALOG_ENTRY_HEADER(translator6Active);
318 
319 
320  SO_KIT_CATALOG_ENTRY_HEADER(rotatorSep);
321  SO_KIT_CATALOG_ENTRY_HEADER(rotator1Switch);
322  SO_KIT_CATALOG_ENTRY_HEADER(rotator1LocateGroup);
323  SO_KIT_CATALOG_ENTRY_HEADER(rotator1);
324  SO_KIT_CATALOG_ENTRY_HEADER(rotator1Active);
325  SO_KIT_CATALOG_ENTRY_HEADER(rotator2Switch);
326  SO_KIT_CATALOG_ENTRY_HEADER(rotator2LocateGroup);
327  SO_KIT_CATALOG_ENTRY_HEADER(rotator2);
328  SO_KIT_CATALOG_ENTRY_HEADER(rotator2Active);
329  SO_KIT_CATALOG_ENTRY_HEADER(rotator3Switch);
330  SO_KIT_CATALOG_ENTRY_HEADER(rotator3LocateGroup);
331  SO_KIT_CATALOG_ENTRY_HEADER(rotator3);
332  SO_KIT_CATALOG_ENTRY_HEADER(rotator3Active);
333  SO_KIT_CATALOG_ENTRY_HEADER(rotator4Switch);
334  SO_KIT_CATALOG_ENTRY_HEADER(rotator4LocateGroup);
335  SO_KIT_CATALOG_ENTRY_HEADER(rotator4);
336  SO_KIT_CATALOG_ENTRY_HEADER(rotator4Active);
337  SO_KIT_CATALOG_ENTRY_HEADER(rotator5Switch);
338  SO_KIT_CATALOG_ENTRY_HEADER(rotator5LocateGroup);
339  SO_KIT_CATALOG_ENTRY_HEADER(rotator5);
340  SO_KIT_CATALOG_ENTRY_HEADER(rotator5Active);
341  SO_KIT_CATALOG_ENTRY_HEADER(rotator6Switch);
342  SO_KIT_CATALOG_ENTRY_HEADER(rotator6LocateGroup);
343  SO_KIT_CATALOG_ENTRY_HEADER(rotator6);
344  SO_KIT_CATALOG_ENTRY_HEADER(rotator6Active);
345 
346  SO_KIT_CATALOG_ENTRY_HEADER(scaleSep);
347  SO_KIT_CATALOG_ENTRY_HEADER(scale1Switch);
348  SO_KIT_CATALOG_ENTRY_HEADER(scale1LocateGroup);
350  SO_KIT_CATALOG_ENTRY_HEADER(scale1Active);
351  SO_KIT_CATALOG_ENTRY_HEADER(scale2Switch);
352  SO_KIT_CATALOG_ENTRY_HEADER(scale2LocateGroup);
354  SO_KIT_CATALOG_ENTRY_HEADER(scale2Active);
355  SO_KIT_CATALOG_ENTRY_HEADER(scale3Switch);
356  SO_KIT_CATALOG_ENTRY_HEADER(scale3LocateGroup);
358  SO_KIT_CATALOG_ENTRY_HEADER(scale3Active);
359  SO_KIT_CATALOG_ENTRY_HEADER(scale4Switch);
360  SO_KIT_CATALOG_ENTRY_HEADER(scale4LocateGroup);
362  SO_KIT_CATALOG_ENTRY_HEADER(scale4Active);
363  SO_KIT_CATALOG_ENTRY_HEADER(scale5Switch);
364  SO_KIT_CATALOG_ENTRY_HEADER(scale5LocateGroup);
366  SO_KIT_CATALOG_ENTRY_HEADER(scale5Active);
367  SO_KIT_CATALOG_ENTRY_HEADER(scale6Switch);
368  SO_KIT_CATALOG_ENTRY_HEADER(scale6LocateGroup);
370  SO_KIT_CATALOG_ENTRY_HEADER(scale6Active);
371  SO_KIT_CATALOG_ENTRY_HEADER(scale7Switch);
372  SO_KIT_CATALOG_ENTRY_HEADER(scale7LocateGroup);
374  SO_KIT_CATALOG_ENTRY_HEADER(scale7Active);
375  SO_KIT_CATALOG_ENTRY_HEADER(scale8Switch);
376  SO_KIT_CATALOG_ENTRY_HEADER(scale8LocateGroup);
378  SO_KIT_CATALOG_ENTRY_HEADER(scale8Active);
379 
380  SO_KIT_CATALOG_ENTRY_HEADER(axisFeedbackSep);
381  SO_KIT_CATALOG_ENTRY_HEADER(axisFeedbackLocation);
382  SO_KIT_CATALOG_ENTRY_HEADER(xAxisFeedbackSwitch);
383  SO_KIT_CATALOG_ENTRY_HEADER(xAxisFeedbackActive);
384  SO_KIT_CATALOG_ENTRY_HEADER(xAxisFeedbackSelect);
385  SO_KIT_CATALOG_ENTRY_HEADER(xCrosshairFeedback);
386  SO_KIT_CATALOG_ENTRY_HEADER(yAxisFeedbackSwitch);
387  SO_KIT_CATALOG_ENTRY_HEADER(yAxisFeedbackActive);
388  SO_KIT_CATALOG_ENTRY_HEADER(yAxisFeedbackSelect);
389  SO_KIT_CATALOG_ENTRY_HEADER(yCrosshairFeedback);
390  SO_KIT_CATALOG_ENTRY_HEADER(zAxisFeedbackSwitch);
391  SO_KIT_CATALOG_ENTRY_HEADER(zAxisFeedbackActive);
392  SO_KIT_CATALOG_ENTRY_HEADER(zAxisFeedbackSelect);
393  SO_KIT_CATALOG_ENTRY_HEADER(zCrosshairFeedback);
394 
395  SO_KIT_CATALOG_ENTRY_HEADER(translateBoxFeedbackSep);
396  SO_KIT_CATALOG_ENTRY_HEADER(translateBoxFeedbackSwitch);
397  SO_KIT_CATALOG_ENTRY_HEADER(translateBoxFeedbackRotation);
398  SO_KIT_CATALOG_ENTRY_HEADER(translateBoxFeedback);
399 
400  SO_KIT_CATALOG_ENTRY_HEADER(scaleBoxFeedbackSwitch);
401  SO_KIT_CATALOG_ENTRY_HEADER(scaleBoxFeedback);
402 
403  SO_KIT_CATALOG_ENTRY_HEADER(posXWallFeedbackSwitch);
404  SO_KIT_CATALOG_ENTRY_HEADER(posXWallFeedback);
405  SO_KIT_CATALOG_ENTRY_HEADER(posXRoundWallFeedback);
406  SO_KIT_CATALOG_ENTRY_HEADER(posYWallFeedbackSwitch);
407  SO_KIT_CATALOG_ENTRY_HEADER(posYWallFeedback);
408  SO_KIT_CATALOG_ENTRY_HEADER(posYRoundWallFeedback);
409  SO_KIT_CATALOG_ENTRY_HEADER(posZWallFeedbackSwitch);
410  SO_KIT_CATALOG_ENTRY_HEADER(posZWallFeedback);
411  SO_KIT_CATALOG_ENTRY_HEADER(posZRoundWallFeedback);
412  SO_KIT_CATALOG_ENTRY_HEADER(negXWallFeedbackSwitch);
413  SO_KIT_CATALOG_ENTRY_HEADER(negXWallFeedback);
414  SO_KIT_CATALOG_ENTRY_HEADER(negXRoundWallFeedback);
415  SO_KIT_CATALOG_ENTRY_HEADER(negYWallFeedbackSwitch);
416  SO_KIT_CATALOG_ENTRY_HEADER(negYWallFeedback);
417  SO_KIT_CATALOG_ENTRY_HEADER(negYRoundWallFeedback);
418  SO_KIT_CATALOG_ENTRY_HEADER(negZWallFeedbackSwitch);
419  SO_KIT_CATALOG_ENTRY_HEADER(negZWallFeedback);
420  SO_KIT_CATALOG_ENTRY_HEADER(negZRoundWallFeedback);
421 
422  SO_KIT_CATALOG_ENTRY_HEADER(radialFeedbackSwitch);
423  SO_KIT_CATALOG_ENTRY_HEADER(radialFeedback);
424 
425  SO_KIT_CATALOG_ENTRY_HEADER(circleFeedbackSep);
426  SO_KIT_CATALOG_ENTRY_HEADER(circleFeedbackTransformSwitch);
427  SO_KIT_CATALOG_ENTRY_HEADER(circleFeedbackAntiSquish);
428  SO_KIT_CATALOG_ENTRY_HEADER(circleFeedbackTransform);
429  SO_KIT_CATALOG_ENTRY_HEADER(xCircleFeedbackSwitch);
430  SO_KIT_CATALOG_ENTRY_HEADER(xCircleFeedback);
431  SO_KIT_CATALOG_ENTRY_HEADER(yCircleFeedbackSwitch);
432  SO_KIT_CATALOG_ENTRY_HEADER(yCircleFeedback);
433  SO_KIT_CATALOG_ENTRY_HEADER(zCircleFeedbackSwitch);
434  SO_KIT_CATALOG_ENTRY_HEADER(zCircleFeedback);
435 
436 
437  public:
438 
441 
446 
453 
456  bool isLocateHighlighting() { return locateHighlightOn; }
459  void setLocateHighlighting( bool onOff );
460 
462  static void setColinearThreshold(int newVal) { colinearThreshold = newVal; }
467  static int getColinearThreshold() { return colinearThreshold; }
468 
469  SoEXTENDER public:
470 
473  SbVec3f getBoxPointInWorldSpace( const SbVec3f &pointOnUnitBox );
474  SbVec3f getBoxDirInWorldSpace( const SbVec3f &dirOnUnitBox );
475  SbVec3f getWorldPointInBoxSpace( const SbVec3f &pointInWorldSpace );
477 
484  { return interactiveCenterInBoxSpace; }
485 
486  SoINTERNAL public:
487  static void initClass();
488 
489  enum State
491  RIT_X_ROTATE, TOP_Y_ROTATE, FNT_Z_ROTATE,
492  LFT_X_ROTATE, BOT_Y_ROTATE, BAK_Z_ROTATE,
493 
494  PX_PY_PZ_3D_SCALE, PX_PY_NZ_3D_SCALE, PX_NY_PZ_3D_SCALE,
495  PX_NY_NZ_3D_SCALE, NX_PY_PZ_3D_SCALE, NX_PY_NZ_3D_SCALE,
496  NX_NY_PZ_3D_SCALE, NX_NY_NZ_3D_SCALE,
497 
498  RIT_TRANSLATE, TOP_TRANSLATE, FNT_TRANSLATE,
499  LFT_TRANSLATE, BOT_TRANSLATE, BAK_TRANSLATE };
500 
501  State getCurrentState() { return currentState; }
502 
503  protected:
504 
506  static void startCB( void *, SoDragger * );
507  static void motionCB( void *, SoDragger * );
508  static void finishCB( void *, SoDragger * );
509 
513  static void fieldSensorCB( void *, SoSensor * );
514  static void valueChangedCB( void *, SoDragger * );
515 
517  static void metaKeyChangeCB( void *, SoDragger *);
518 
520  void dragStart();
521  void drag();
522  void dragFinish();
523 
526  void setAllPartSwitches( int scaleAssemblyWhich,
527  int rotateAssemblyWhich,
528  int translateAssemblyWhich );
529 
536  virtual bool setUpConnections( bool onOff, bool doItAlways = FALSE );
537 
539 
541 
546 
547  int getMouseGestureDirection(bool xAllowed, bool yAllowed,
548  bool zAllowed);
549 
550  static int getIgnoreAxis(SbVec2f axis[3][2], bool xAllowed,
551  bool yAllowed, bool zAllowed );
552 
554  SbVec2f axisEnds[3][2], int indexA, int indexB );
555 
556  static bool isColinear(SbVec2f a1[2], SbVec2f a2[2], int pixels);
557 
558  private:
559 
560  State currentState;
561  int currentDir;
566  bool rotatingAsDisc;
567 
568  SbPlaneProjector *planeProj;
569  SbLineProjector *lineProj;
570  SbSphereSectionProjector *sphereProj;
571  SbCylinderPlaneProjector *cylProj;
572 
573  State restartState;
574  SbVec3f worldRestartPt;
575 
576  SbMatrix prevMotionMatrix;
577  SbVec3f prevWorldHitPt;
578  SbVec3f interactiveCenterInBoxSpace;
579 
583  SbVec2f startNormalizedLocaterPosition;
584 
585  bool altDown, ctlDown, shftDown;
587  bool constraining;
588 
590  void setHighlights();
591  void setFeedback();
592  void setFeedbackForTranslate();
593  void setFeedbackForScale();
594  void setFeedbackForRotate();
595 
596  State getStateFromPick();
597  bool translateInit();
598  bool rotateInit();
599  bool scaleInit();
600 
601  bool translateDrag();
602  bool scaleDrag();
603 
604  bool rotateDrag();
605  bool rotateConstrainedDrag();
606  bool rotateConstrainedDiscDrag();
607  bool rotateConstrainedCylindricalDrag();
608 
609  void initSphereProjector();
610  void initDiscProjector();
611  void initCylinderProjector();
612 
613  bool getShouldRotateAsDisc();
614  int getConstrainedRotationAxis();
615 
617  static const unsigned char geomBuffer[];
618 
619  void setAllDefaultParts();
620 
621  bool locateHighlightOn;
622 
623  static int colinearThreshold;
624 
628  void makeCatalog();
629  void makeTranslaterCatalogParts();
630  void makeRotaterCatalogParts();
631  void makeScalerCatalogParts();
632  void makeAxisFeedbackCatalogParts();
633  void makeBoxFeedbackCatalogParts();
634  void makeWallFeedbackCatalogParts();
635  void makeRadialFeedbackCatalogParts();
636  void makeCircleFeedbackCatalogParts();
637 };
638 
639 #endif /* _SO_TRANSFORMER_DRAGGER_ */
#define SoEXTENDER
Provide inline template functions for abs, swap, min, max, and clamp.
Definition: SbBasic.h:154
#define FALSE
Definition: SbBasic.h:79
#define SoINTERNAL
Definition: SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition: SbSystem.h:81
#define SO_KIT_CATALOG_ENTRY_HEADER(partName)
This defines an SoSFNode field for the catalog part given.
Definition: SoSubKit.h:155
#define SO_KIT_HEADER(className)
Definition: SoSubKit.h:143
Cylinder-plane projector.
This is a dictionary mapping (size_t) integer keys to (void *) data pointers.
Definition: SbDict.h:101
Line projector.
4x4 matrix class.
Definition: SbLinear.h:823
Plane projector.
Sphere-section projector.
2D vector class.
Definition: SbLinear.h:246
3D vector class.
Definition: SbLinear.h:120
Base class for nodekits that move in response to click-drag-release mouse events.
Definition: SoDragger.h:225
Sensor class that can be attached to Inventor fields.
Definition: SoFieldSensor.h:80
Maintains a list of pointers to nodes.
Definition: SoLists.h:177
Field containing a floating-point value.
Definition: SoSFFloat.h:77
Field containing a rotation.
Definition: SoSFRotation.h:84
Field containing a three-dimensional vector.
Definition: SoSFVec3f.h:79
Abstract base class for Inventor sensors.
Definition: SoSensor.h:108
Box-like object you scale, rotate, and translate by dragging with the mouse.
static void initClass()
initialize the class
SoSFFloat minDiscRotDot
0-1, specifies minimum dot product
void updateAntiSquishList()
Finds all SoAntiSquish nodes in subgraph and puts them in list.
static void fieldSensorCB(void *, SoSensor *)
SoFieldSensor * scaleFieldSensor
virtual ~SoTransformerDragger()
static void startCB(void *, SoDragger *)
Callbacks for drag start, motion, and finish.
static void metaKeyChangeCB(void *, SoDragger *)
Callbacks for pressing and releasing the meta keys.
SoTransformerDragger()
Constructor.
static void motionCB(void *, SoDragger *)
SbVec3f getBoxPointInWorldSpace(const SbVec3f &pointOnUnitBox)
These convert points and directions from the space of the unit box to world space.
static int getIgnoreAxis(SbVec2f axis[3][2], bool xAllowed, bool yAllowed, bool zAllowed)
void unsquishKnobs()
Tells the dragger to unsquish its rotation and scale knobs during the next traversal.
void setAllPartSwitches(int scaleAssemblyWhich, int rotateAssemblyWhich, int translateAssemblyWhich)
Sets switch values for all parts in the scale, rotate, and translate assemblies.
SbVec3f getBoxDirInWorldSpace(const SbVec3f &dirOnUnitBox)
static void setColinearThreshold(int newVal)
SbVec2f getWorldPointInPixelSpace(const SbVec3f &thePoint)
virtual bool setUpConnections(bool onOff, bool doItAlways=FALSE)
detach/attach any sensors, callbacks, and/or field connections.
SoNodeList antiSquishList
Tells all nodes in the antiSquishList to recalculate next time through.
SbVec3f getWorldPointInBoxSpace(const SbVec3f &pointInWorldSpace)
void setLocateHighlighting(bool onOff)
Controls whether or not locate highlighting is used.
SoFieldSensor * translFieldSensor
bool isLocateHighlighting()
Controls whether or not locate highlighting is used.
void dragStart()
These really do the work during startCB, motionCB, and finishCB.
SoFieldSensor * rotateFieldSensor
int getMouseGestureDirection(bool xAllowed, bool yAllowed, bool zAllowed)
static bool isColinear(SbVec2f a1[2], SbVec2f a2[2], int pixels)
static int getColinearThreshold()
When picking a direction for constraining based on gesture, this paramater determines how many pixels...
SbVec3f getInteractiveCenterInBoxSpace()
Callbacks would like to know this sometimes.
static void makeMinorAxisPerpendicularIfColinear(SbVec2f origin, SbVec2f axisEnds[3][2], int indexA, int indexB)
virtual void setDefaultOnNonWritingFields()
Called by the SoBaseKit::write() method.
static void finishCB(void *, SoDragger *)
static void valueChangedCB(void *, SoDragger *)