| 1 |
NAME SoTranslate1Dragger SoXlate1Drag "" { object you can translate along a line by dragging With the mouse } |
| 2 |
|
| 3 |
INCLUDE draggers/SoTranslate1Dragger.h |
| 4 |
|
| 5 |
DESC { \cSoTranslate1Dragger\. |
| 6 |
is a simple dragger that translates |
| 7 |
in one dimension when dragged with the mouse. |
| 8 |
It moves along the x axis of its local space, determined by its |
| 9 |
location in the scene graph. |
| 10 |
Transformation nodes placed before it will |
| 11 |
affect both the dragger and the direction of motion. |
| 12 |
\p |
| 13 |
This node has a \vtranslation\. field |
| 14 |
which always reflects |
| 15 |
its position in local space. |
| 16 |
If you set the field, the dragger will move accordingly. |
| 17 |
You can also connect fields of other nodes or engines from |
| 18 |
this one |
| 19 |
to make them follow the dragger's motion. |
| 20 |
\p |
| 21 |
This dragger contains four parts, \etranslator\., \etranslatorActive\., |
| 22 |
\efeedback\., and \efeedbackActive\.. |
| 23 |
\p |
| 24 |
Each of these is set by default from |
| 25 |
a resource described in the \kDragger Resources\. section of the online |
| 26 |
reference page for this class. You |
| 27 |
can change the parts in any instance of this dragger using |
| 28 |
\m\+setPart()\.\-SoDraggerSetPart()\.\.. |
| 29 |
\p |
| 30 |
You can make your program use different default resources for the parts |
| 31 |
by copying the file |
| 32 |
\v/usr/share/data/draggerDefaults/translate1Dragger.iv\. |
| 33 |
into your own directory, editing the file, and then |
| 34 |
setting the environment variable \vSO_DRAGGER_DIR\. to be a path to that directory. |
| 35 |
} |
| 36 |
|
| 37 |
METHOD "" SoTranslate1Dragger() { |
| 38 |
Constructor. |
| 39 |
} |
| 40 |
|
| 41 |
METHOD getClassNkitCat static |
| 42 |
const SoNodekitCatalog *getClassNodekitCatalog() const |
| 43 |
{ Returns an \cSoNodekitCatalog\. for this class } |
| 44 |
|
| 45 |
METHOD "" static SoType getClassTypeId() { |
| 46 |
Returns type identifier for this class. |
| 47 |
} |
| 48 |
|
| 49 |
FIELD translation { Position of the dragger. } |
| 50 |
|
| 51 |
DRAGGER_RESOURCE { |
| 52 |
translate1Translator, |
| 53 |
translator, |
| 54 |
"white arrow", |
| 55 |
"picking this initiates translation" |
| 56 |
} |
| 57 |
|
| 58 |
DRAGGER_RESOURCE { |
| 59 |
translate1TranslatorActive, |
| 60 |
translatorActive, |
| 61 |
"yellow arrow", |
| 62 |
"displayed during translation instead of the translator" |
| 63 |
} |
| 64 |
|
| 65 |
DRAGGER_RESOURCE { |
| 66 |
translate1Feedback, |
| 67 |
feedback, |
| 68 |
"empty Separator by default", |
| 69 |
"feedback displayed when not in motion" |
| 70 |
} |
| 71 |
|
| 72 |
DRAGGER_RESOURCE { |
| 73 |
translate1FeedbackActive, |
| 74 |
feedbackActive, |
| 75 |
"empty Separator by default", |
| 76 |
"feedback displayed while moving" |
| 77 |
} |
| 78 |
|
| 79 |
ALSO { |
| 80 |
SoInteractionKit, |
| 81 |
SoDragger, |
| 82 |
SoCenterballDragger, |
| 83 |
SoDirectionalLightDragger, |
| 84 |
SoDragPointDragger, |
| 85 |
SoHandleBoxDragger, |
| 86 |
SoJackDragger, |
| 87 |
SoPointLightDragger, |
| 88 |
SoRotateCylindricalDragger, |
| 89 |
SoRotateDiscDragger, |
| 90 |
SoRotateSphericalDragger, |
| 91 |
SoScale1Dragger, |
| 92 |
SoScale2Dragger, |
| 93 |
SoScale2UniformDragger, |
| 94 |
SoScaleUniformDragger, |
| 95 |
SoSpotLightDragger, |
| 96 |
SoTabBoxDragger, |
| 97 |
SoTabPlaneDragger, |
| 98 |
SoTrackballDragger, |
| 99 |
SoTransformBoxDragger, |
| 100 |
SoTransformerDragger, |
| 101 |
SoTranslate2Dragger |
| 102 |
} |
| 103 |
|