Purpose

A dragger that does a ball rotation and uses Managed Interaction.

Usage

See SoMIBaseDragger.

Details

Depending on Projector Type, either SbSphereSectionProjector, SbSpherePlaneProjector or SbSphereSheetProjector is used to project the mouse location onto a virtual sphere. The radius of the sphere is determined based on the initial click point on the child geometry. Two projected points can produce a rotation about the sphere’s center. The three projector types mainly differ in the way in which they treat projection outside the sphere.

SbSphereSectionProjector and SbSpherePlaneProjector both intersect the sphere with a view aligned plane. The position of the plane along the radius of the sphere is determined based on Edge Tolerance. If the mouse position is mapped onto the plane instead of the sphere, the interpretation of the position varies between both. SbSphereSectionProjector derives tangential (moving in a circle around the sphere) and radial (moving toward or away from the center) motion from the projected positions. The tangential motion will always map to a rotation around the center, (like the hands of a clock). The radial motion, depending on Radial Factor, makes the sphere rotate as if the mouse pulled on a wire wrapped around the sphere. SbSpherePlaneProjector instead uses the mouse motion to move the virtual plane. The sphere is then rotated as if it were rolling on that moving plane. Using that metaphor, it is not possible to rotate around the center.

SbSphereSheetProjector combines a sphere an a hyperbolic sheet. At 45° the sphere is cut off and the sheet is used instead. This allows smooth transitions onto and off of the sphere. The mapping on the sheet resembles that of SbSphereSectionProjector and allows tangential and radial motion. However, this projector cannot be parametrized any further.

../../../Modules/Inventor/SoManagedInteractionDraggers/mhelp/Images/sphericalProjectorTypes.png

Tips

Use Projector Type Section (SPHERE_SECTION) and a Radial Factor of 0.0 to avoid interaction outside the sphere completely. If set to higher values, the rotation continues while dragging the mouse further away (even outside the viewport), which might even lead to multiple turns. This behavior might be confusing to the user. Values of Radial Factor between 0.0 and 1.0 might lead to a drift of the geometry under the pointer if the mouse is moved outside the spherical region and then back into it resulting from the damping of the radial motion.

Use an Edge Tolerance below 0.9 to avoid a snapping-like behavior in the transition zone between sphere and plane.

Windows

Default Panel

../../../Modules/Inventor/SoManagedInteractionDraggers/mhelp/Images/Screenshots/SoMIRotateSphericalDragger._default.png

Input Fields

child

name: child, type: SoNode

see SoMIBaseDragger.child

Output Fields

self

name: self, type: SoNode

see SoMIBaseDragger.self

Parameter Fields

Field Index

Cursor Shape: Enum
Dragging: Bool
Edge Tolerance: Float
Enabled: Bool
Highlighted: Bool
interactionProviderID: String
Projector Type: Enum
Radial Factor: Float

Visible Fields

Enabled

name: enabled, type: Bool, default: TRUE

see SoMIBaseDragger.enabled

Highlighted

name: highlighted, type: Bool, persistent: no

see SoMIBaseDragger.highlighted

Dragging

name: dragging, type: Bool, persistent: no

see SoMIBaseDragger.dragging

Cursor Shape

name: cursorShape, type: Enum, default: ROTATE_XY_CURSOR

see SoMIBaseDragger.cursorShape

Projector Type

name: projectorType, type: Enum, default: SPHERE_SECTION

Select the projector that is used to map the 2D screen space mouse coordinate to a 3D point.

Values:

Title Name Description
Section SPHERE_SECTION Internally, a SbSphereSectionProjector is used. See Details for more information.
Plane SPHERE_PLANE Internally, a SbSpherePlaneProjector is used. See Details for more information.
Sheet SPHERE_SHEET Internally, a SbSphereSheetProjector is used. See Details for more information.

Edge Tolerance

name: edgeTolerance, type: Float, default: 0.89999998, minimum: 0, maximum: 1

Sets the edge tolerance as a fraction of the radius of the sphere. If this is 1.0, the projector is using the full camera-facing hemisphere, and outside the planar interaction as described in Details. Otherwise, a smaller fraction of the sphere is used. Only applicable if Projector Type is Section or Plane.

Radial Factor

name: radialFactor, type: Float, default: 0.85000002, minimum: 0, maximum: 1

Sets the strength of radial motion on the plane outside the circle defined by Edge Tolerance. If set to 0.0, the distance of the mouse to the center of the dragger doesn’t matter if th emouse is outside the circle defined by Edge Tolerance. Only tangential motion is used then. If set to values greater than 0.0 the distance is used to roll the virtual sphere in the direction of the mouse. If Radial Factor = 1.0, then pulling has a ‘normal’ feel(that is, the mouse motion causes the same amount of rotation as if you had rotated by hitting the actual surface of the sphere). That way, there is no noticeable transition between spherical and planar interaction.

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoMIBaseDragger.interactionProviderID