| 1 |
NAME SoScale2Dragger SoScale2Drag "" { object you can scale in two dimensions by dragging with the mouse } |
| 2 |
|
| 3 |
INCLUDE draggers/SoScale2Dragger.h |
| 4 |
|
| 5 |
DESC { \cSoScale2Dragger\. |
| 6 |
is a simple dragger that scales |
| 7 |
freely and independently in two dimensions when dragged with the mouse. |
| 8 |
It moves within the x-y plane of its local space, as determined by its |
| 9 |
location in the scene graph. |
| 10 |
Transformation nodes placed before it will |
| 11 |
affect both the dragger and the plane of motion. |
| 12 |
\p |
| 13 |
This node has a \vscaleFactor\. field |
| 14 |
which always reflects |
| 15 |
its size in local space. |
| 16 |
If you set the field, the dragger will change 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, \escaler\., \escalerActive\., |
| 22 |
\efeedback\., and \efeedbackActive\.. |
| 23 |
\p |
| 24 |
Each of these is set by default from a resource described in the |
| 25 |
Dragger Resources section of the online reference page for this |
| 26 |
class. You can change the parts in any instance of this |
| 27 |
dragger using \m\+setPart()\.\-SoDraggerSetPart()\.\.. |
| 28 |
\p |
| 29 |
You can make your program use different default resources for the parts |
| 30 |
by copying the file |
| 31 |
\v/usr/share/data/draggerDefaults/scale2Dragger.iv\. |
| 32 |
into your own directory, editing the file, and then |
| 33 |
setting the environment variable \vSO_DRAGGER_DIR\. to be a path to that directory. |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
METHOD "" SoScale2Dragger() { |
| 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 scaleFactor { Scale factor affecting the dragger. } |
| 50 |
|
| 51 |
DRAGGER_RESOURCE { |
| 52 |
scale2Scaler, |
| 53 |
scaler, |
| 54 |
"white photo-corners at corners of 2-by-2 square in plane of motion", |
| 55 |
"picking this initiates the scaling" |
| 56 |
} |
| 57 |
|
| 58 |
DRAGGER_RESOURCE { |
| 59 |
scale2ScalerActive, |
| 60 |
scalerActive, |
| 61 |
"yellow version of scaler, but with an extra yellow box", |
| 62 |
"displayed instead of scaler while in motion" |
| 63 |
} |
| 64 |
|
| 65 |
DRAGGER_RESOURCE { |
| 66 |
scale2Feedback, |
| 67 |
feedback, |
| 68 |
"thin purple 3-D crosshair", |
| 69 |
"shows center of scale when still" |
| 70 |
} |
| 71 |
|
| 72 |
DRAGGER_RESOURCE { |
| 73 |
scale2FeedbackActive, |
| 74 |
feedbackActive, |
| 75 |
"thin, slightly brighter purple 3-D crosshair", |
| 76 |
"shows center of scale while in motion" |
| 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 |
SoScale2UniformDragger, |
| 93 |
SoScaleUniformDragger, |
| 94 |
SoSpotLightDragger, |
| 95 |
SoTabBoxDragger, |
| 96 |
SoTabPlaneDragger, |
| 97 |
SoTrackballDragger, |
| 98 |
SoTransformBoxDragger, |
| 99 |
SoTransformerDragger, |
| 100 |
SoTranslate1Dragger, |
| 101 |
SoTranslate2Dragger |
| 102 |
} |
| 103 |
|