| 1 |
NAME SoRotateSphericalDragger SoRotSphDrag "" { object you can rotate about a spherical surface by dragging with the mouse } |
| 2 |
|
| 3 |
INCLUDE draggers/SoRotateSphericalDragger.h |
| 4 |
|
| 5 |
DESC { \cSoRotateSphericalDragger\. |
| 6 |
is a simple dragger that rotates freely in all directions. |
| 7 |
The feel of the rotation is as if you were rolling a ball. |
| 8 |
The center of rotation is the origin of the local space, |
| 9 |
determined by the dragger's 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 \vrotation\. field which always reflects its orientation |
| 14 |
in local space. If you set the field, the dragger will rotate |
| 15 |
accordingly. You can also connect fields of other nodes or engines from |
| 16 |
this one to make them follow the dragger's orientation. |
| 17 |
\p |
| 18 |
This dragger contains four parts, \erotator\., \erotatorActive\., |
| 19 |
\efeedback\., and \efeedbackActive\.. |
| 20 |
\p |
| 21 |
Each of these is set by default from a resource described in the Dragger |
| 22 |
Resources section of the online reference page for this class. You can |
| 23 |
change the parts in any instance of this dragger using |
| 24 |
\m\+setPart()\.\-SoDraggerSetPart()\.\.. |
| 25 |
\p |
| 26 |
You can make your program use different default resources for the parts |
| 27 |
by copying the file |
| 28 |
\v/usr/share/data/draggerDefaults/rotateSphericalDragger.iv\. |
| 29 |
into your own directory, editing the file, and then |
| 30 |
setting the environment variable \vSO_DRAGGER_DIR\. to be a path to that directory. |
| 31 |
} |
| 32 |
|
| 33 |
METHOD "" SoRotateSphericalDragger() { |
| 34 |
Constructor. |
| 35 |
} |
| 36 |
|
| 37 |
FIELD rotation { Orientation of the dragger. } |
| 38 |
|
| 39 |
METHOD "setProj" void setProjector(SbSphereProjector *p) {} |
| 40 |
METHOD "getProj" const SbSphereProjector *getProjector() const { |
| 41 |
Set and get a different sphere projector. |
| 42 |
See the \cSbSphereProjector\. |
| 43 |
man pages to find out how each kind affects the feel of your dragger's motion. |
| 44 |
The default uses an |
| 45 |
\cSbSpherePlaneProjector\.. |
| 46 |
\p |
| 47 |
Passing in NULL will cause the default type of projector to be used. |
| 48 |
Any projector you pass in will be deleted by this dragger when |
| 49 |
this dragger is deleted. |
| 50 |
Note that the center and radius of the sphere are determined by the |
| 51 |
dragger, based on the origin of the local space and the distance between |
| 52 |
the initial mouse click and that origin. |
| 53 |
} |
| 54 |
|
| 55 |
METHOD getClassNkitCat static |
| 56 |
const SoNodekitCatalog *getClassNodekitCatalog() const |
| 57 |
{ Returns an \cSoNodekitCatalog\. for this class } |
| 58 |
|
| 59 |
METHOD "" static SoType getClassTypeId() { |
| 60 |
Returns type identifier for this class. |
| 61 |
} |
| 62 |
|
| 63 |
DRAGGER_RESOURCE { |
| 64 |
rotateSphericalRotator, |
| 65 |
rotator, |
| 66 |
"white sphere made of three intersecting circles. Each circle is |
| 67 |
in a different plane of local space", |
| 68 |
"picking this initiates rotation" |
| 69 |
} |
| 70 |
|
| 71 |
DRAGGER_RESOURCE { |
| 72 |
rotateSphericalRotatorActive, |
| 73 |
rotatorActive, |
| 74 |
"yellow version of rotator", |
| 75 |
"displayed while in motion instead of the rotator" |
| 76 |
} |
| 77 |
|
| 78 |
DRAGGER_RESOURCE { |
| 79 |
rotateSphericalFeedback, |
| 80 |
feedback, |
| 81 |
"thin purple 3-D crosshairs at origin", |
| 82 |
"shows center of rotation when not moving" |
| 83 |
} |
| 84 |
|
| 85 |
DRAGGER_RESOURCE { |
| 86 |
rotateSphericalFeedbackActive, |
| 87 |
feedbackActive, |
| 88 |
"thin, slightly brighter purple 3-D crosshairs at origin", |
| 89 |
"shows center of rotation when moving" |
| 90 |
} |
| 91 |
|
| 92 |
ALSO { |
| 93 |
SoInteractionKit, |
| 94 |
SoDragger, |
| 95 |
SoCenterballDragger, |
| 96 |
SoDirectionalLightDragger, |
| 97 |
SoDragPointDragger, |
| 98 |
SoHandleBoxDragger, |
| 99 |
SoJackDragger, |
| 100 |
SoPointLightDragger, |
| 101 |
SoRotateCylindricalDragger, |
| 102 |
SoRotateDiscDragger, |
| 103 |
SoScale1Dragger, |
| 104 |
SoScale2Dragger, |
| 105 |
SoScale2UniformDragger, |
| 106 |
SoScaleUniformDragger, |
| 107 |
SoSpotLightDragger, |
| 108 |
SoTabBoxDragger, |
| 109 |
SoTabPlaneDragger, |
| 110 |
SoTrackballDragger, |
| 111 |
SoTransformBoxDragger, |
| 112 |
SoTransformerDragger, |
| 113 |
SoTranslate1Dragger, |
| 114 |
SoTranslate2Dragger |
| 115 |
} |