1SoTranslate2Dragger(3IV)()                          SoTranslate2Dragger(3IV)()
2
3
4

NAME

6       SoTranslate2Dragger  — object you can translate within a plane by drag‐
7       ging with the mouse
8

INHERITS FROM

10       SoBase > SoFieldContainer > SoNode >  SoBaseKit  >  SoInteractionKit  >
11       SoDragger > SoTranslate2Dragger
12

SYNOPSIS

14       #include <Inventor/draggers/SoTranslate2Dragger.h>
15
16          Fields from class SoTranslate2Dragger:
17
18     SoSFVec3f           translation
19
20          Fields from class SoDragger:
21
22     SoSFBool            isActive
23
24          Fields from class SoInteractionKit:
25
26     SoSFEnum            renderCaching
27     SoSFEnum            boundingBoxCaching
28     SoSFEnum            renderCulling
29     SoSFEnum            pickCulling
30
31          Parts from class SoBaseKit:
32
33     (SoNodeKitListPart)  callbackList
34
35          Methods from class SoTranslate2Dragger:
36
37                         SoTranslate2Dragger()
38     static const SoNodekitCatalog *
39                         getClassNodekitCatalog() const
40     static SoType       getClassTypeId()
41
42          Methods from class SoDragger:
43
44     void                addStartCallback(SoDraggerCB  *f,  void  *userData  =
45                              NULL)
46     void                removeStartCallback(SoDraggerCB *f, void *userData  =
47                              NULL)
48     void                addMotionCallback(SoDraggerCB  *f,  void  *userData =
49                              NULL)
50     void                removeMotionCallback(SoDraggerCB *f, void *userData =
51                              NULL)
52     void                addFinishCallback(SoDraggerCB  *f,  void  *userData =
53                              NULL)
54     void                removeFinishCallback(SoDraggerCB *f, void *userData =
55                              NULL)
56     void                addValueChangedCallback(SoDraggerCB  *f,  void *user‐
57                              Data = NULL)
58     void                removeValueChangedCallback(SoDraggerCB    *f,    void
59                              *userData = NULL)
60     SbBool              enableValueChangedCallbacks()
61     void                setMinGesture(int pixels)
62     int                 getMinGesture() const
63     static void         setMinScale(float newMinScale)
64     static float        getMinScale()
65
66          Methods from class SoInteractionKit:
67
68     virtual  SbBool      setPartAsPath(const SbName &partName, SoPath *surro‐
69                              gatePath )
70
71          Methods from class SoBaseKit:
72
73     virtual const SoNodekitCatalog *
74                              getNodekitCatalog() const
75     virtual   SoNode   *         getPart(const   SbName   &partName,   SbBool
76                                   makeIfNeeded)
77     SbString                 getPartString(const SoBase *part)
78     virtual  SoNodeKitPath *  createPathToPart(const SbName &partName, SbBool
79                                   makeIfNeeded, const SoPath *pathToExtend  =
80                                   NULL)
81     virtual SbBool           setPart(const SbName &partName, SoNode *newPart)
82     SbBool                   set(char *partName, char *parameters)
83     SbBool                   set(char *nameValuePairs)
84     static SbBool            isSearchingChildren()
85     static void              setSearchingChildren(SbBool newVal)
86
87          Methods from class SoNode:
88
89     void                setOverride(SbBool state)
90     SbBool              isOverride() const
91     SoNode *            copy(SbBool copyConnections = FALSE) const
92     virtual SbBool      affectsState() const
93     static SoNode *     getByName(const SbName &name)
94     static int          getByName(const SbName &name, SoNodeList &list)
95
96          Methods from class SoFieldContainer:
97
98     void                setToDefaults()
99     SbBool              hasDefaultValues() const
100     SbBool              fieldsAreEqual(const SoFieldContainer *fc) const
101     void                copyFieldValues(const  SoFieldContainer  *fc,  SbBool
102                              copyConnections = FALSE)
103     void                get(SbString &fieldDataString)
104     virtual int         getFields(SoFieldList &resultList) const
105     virtual SoField *   getField(const SbName &fieldName) const
106     SbBool              getFieldName(const SoField *field, SbName &fieldName)
107                              const
108     SbBool              isNotifyEnabled() const
109     SbBool              enableNotify(SbBool flag)
110
111          Methods from class SoBase:
112
113     void                ref()
114     void                unref() const
115     void                unrefNoDelete() const
116     void                touch()
117     virtual SoType      getTypeId() const
118     SbBool              isOfType(SoType type) const
119     virtual void        setName(const SbName &name)
120     virtual SbName      getName() const
121
122          Macros from class SoBaseKit:
123
124     SO_GET_PART(kit, partName, partClass)
125     SO_CHECK_PART(kit, partName, partClass)
126
127

DESCRIPTION

129       SoTranslate2Dragger  is  a simple dragger that translates in two dimen‐
130       sions when dragged with the mouse. It moves within the x-y plane of its
131       local space, determined by its location in the scene graph. Transforma‐
132       tion nodes placed before it will affect both the dragger and the direc‐
133       tion of motion.
134
135       Pressing the <Shift> key allows you to constrain motion to either the x
136       axis or the y axis. The direction is determined by your  initial  mouse
137       gesture  after  pressing  the  key.  Releasing the key removes the con‐
138       straint.
139
140       This node has a translation field which always reflects its position in
141       local  space.  If you set the field, the dragger will move accordingly.
142       You can also connect fields of other nodes or engines from this one  to
143       make them follow the dragger's motion.
144
145       This  dragger  contains  six parts, translator, translatorActive, feed‐
146       back, feedbackActive, xAxisFeedback, and yAxisFeedback.  The  last  two
147       parts  are  only displayed during motion, and only when their direction
148       of motion is enabled. (Pressing the <Shift> key and then dragging  dis‐
149       ables one of the two directions.)
150
151       Each  of these is set by default from a resource described in the Drag‐
152       ger Resources section of the online reference page for this class.  You
153       can change the parts in any instance of this dragger using setPart().
154
155       You can make your program use different default resources for the parts
156       by  copying  the  file  /usr/share/data/draggerDefaults/translate2Drag‐
157       ger.iv  into your own directory, editing the file, and then setting the
158       environment variable SO_DRAGGER_DIR to be a path to that directory.
159

FIELDS

161     SoSFVec3f           translation
162          Position of the dragger.
163
164

METHODS

166                         SoTranslate2Dragger()
167          Constructor.
168
169     static const SoNodekitCatalog *
170                         getClassNodekitCatalog() const
171          Returns an SoNodekitCatalog for this class
172
173     static SoType       getClassTypeId()
174          Returns type identifier for this class.
175
176

CATALOG PARTS

178       ┌────────────────────────────────────────────────────────────┐
179All parts                          
180NULL by 
181Part Name          Part Type         Default Type   Default 
182       │                                                            │
183       │callbackList       NodeKitListPart   --               yes   │
184       │translator         Separator         --               yes   │
185       │translatorActive   Separator         --               yes   │
186       │feedback           Separator         --               yes   │
187       │feedbackActive     Separator         --               yes   │
188       │xAxisFeedback      Separator         --               yes   │
189       │yAxisFeedback      Separator         --               yes   │
190       │                                                            │
191       └────────────────────────────────────────────────────────────┘
192       ┌───────────────────────────────────────────────────────────────┐
193Extra information for list parts from above table        
194       │                                                               │
195Part Name      Container Type   Permissible Types              
196       │                                                               │
197       │callbackList   Separator        Callback, EventCallback        │
198       │                                                               │
199       └───────────────────────────────────────────────────────────────┘

DRAGGER RESOURCES

201       .in 0n+.5i
202     Resource:         translate2Translator
203       .in 0n+.5i
204     Part:             translator
205     Appearance:       pair of white crossing arrows
206     Description:      picking this initiates translation
207
208                         .in 0n+.5i
209     Resource:         translate2TranslatorActive
210                         .in 0n+.5i
211     Part:             translatorActive
212     Appearance:       pair of yellow crossing arrows
213     Description:      displayed during translation instead of the translator
214
215                         .in 0n+.5i
216     Resource:         translate2Feedback
217                         .in 0n+.5i
218     Part:             feedback
219     Appearance:       empty Separator by default
220     Description:      feedback displayed when not moving
221
222                         .in 0n+.5i
223     Resource:         translate2FeedbackActive
224                         .in 0n+.5i
225     Part:             feedbackActive
226     Appearance:       empty Separator by default
227     Description:      feedback displayed when moving
228
229                         .in 0n+.5i
230     Resource:         translate2XAxisFeedback
231                         .in 0n+.5i
232     Part:             xAxisFeedback
233     Appearance:       thin purple line
234     Description:      Only shown if dragger is moving and the axis is a  per‐
235                         missable  direction of motion. When pressing <shift>,
236                         motion is constrained, and this is displayed only  if
237                         the primary motion is in the x direction.
238
239                         .in 0n+.5i
240     Resource:         translate2YAxisFeedback
241                         .in 0n+.5i
242     Part:             yAxisFeedback
243     Appearance:       thin purple line
244     Description:      Only  shown if dragger is moving and the axis is a per‐
245                         missable direction of motion. When pressing  <shift>,
246                         motion  is constrained, and this is displayed only if
247                         the primary motion is in the y direction.
248
249

FILE FORMAT/DEFAULTS

251       Translate2Dragger {
252          renderCaching       AUTO
253          boundingBoxCaching  AUTO
254          renderCulling       AUTO
255          pickCulling         AUTO
256          isActive            FALSE
257          translation         0 0 0
258          callbackList        NULL
259          translator          <translate2Translator resource>
260          translatorActive    <translate2TranslatorActive resource>
261          feedback            <translate2Feedback resource>
262          feedbackActive      <translate2FeedbackActive resource>
263          xAxisFeedback       <translate2XAxisFeedback resource>
264          yAxisFeedback       <translate2YAxisFeedback resource>
265     }
266

SEE ALSO

268       SoInteractionKit, SoDragger,  SoCenterballDragger,  SoDirectionalLight‐
269       Dragger,    SoDragPointDragger,    SoHandleBoxDragger,   SoJackDragger,
270       SoPointLightDragger,  SoRotateCylindricalDragger,  SoRotateDiscDragger,
271       SoRotateSphericalDragger,       SoScale1Dragger,       SoScale2Dragger,
272       SoScale2UniformDragger,   SoScaleUniformDragger,    SoSpotLightDragger,
273       SoTabBoxDragger, SoTabPlaneDragger, SoTrackballDragger, SoTransformBox‐
274       Dragger, SoTransformerDragger, SoTranslate1Dragger
275
276
277
278
279                                                    SoTranslate2Dragger(3IV)()
Impressum