#Inventor V2.1 ascii

# Standard common material definitions.

DEF ROTATESPHERICAL_INACTIVE_MATERIAL Material { diffuseColor 0.5 0.5 0.5  emissiveColor 0.5 0.5 0.5 }
DEF ROTATESPHERICAL_ACTIVE_MATERIAL Material { diffuseColor 0.5 0.5 0  emissiveColor 0.5 0.5 0 }
DEF ROTATESPHERICAL_FEEDBACK_MATERIAL Material { diffuseColor 0.5 0 0.5  emissiveColor 0.5 0 0.5 }


### Geometry definitions for the feedback axes ###############################

DEF ROTATESPHERICAL_FEEDBACK Group {
   Coordinate3 { point [ 1.3 0 0, -1.3 0 0, 0 1.3 0, 0 -1.3 0, 0 0 1.3, 0 0 -1.3 ] }
   IndexedLineSet { coordIndex [ 0, 1, -1, 2, 3, -1, 4, 5, -1 ] }
}

DEF rotateSphericalFeedback Separator {
   USE ROTATESPHERICAL_FEEDBACK_MATERIAL
   USE ROTATESPHERICAL_FEEDBACK
}
DEF rotateSphericalFeedbackActive Separator {
   USE ROTATESPHERICAL_FEEDBACK_MATERIAL
   USE ROTATESPHERICAL_FEEDBACK
}


### Geometry definitions for the ball ########################################

DEF ROTATESPHERICAL_RING Group {
   # As to why this node is necessary, see comments in
   # centerballDragger.iv, the CENTERBALL_STRIPE subgraph.
   ShapeHints {
      shapeType UNKNOWN_SHAPE_TYPE
      vertexOrdering UNKNOWN_ORDERING
   }

   DrawStyle { style LINES lineWidth 2 }
   Cylinder { parts SIDES height 0 }
}

DEF ROTATESPHERICAL_BALL Group {
   # Scale with sqrt(3), to make sure we're covering the full bounding
   # sphere of the geometry.
   Scale { scaleFactor 1.733 1.733 1.733 }

   # This is what we pick at.
   DrawStyle { style INVISIBLE }
   Sphere { }

   # The plane markers.
   USE ROTATESPHERICAL_RING
   Rotation { rotation 0 0 1 1.57 }
   USE ROTATESPHERICAL_RING
   Rotation { rotation 1 0 0  1.57 }
   USE ROTATESPHERICAL_RING
}

DEF rotateSphericalRotator Separator {
   USE ROTATESPHERICAL_INACTIVE_MATERIAL
   USE ROTATESPHERICAL_BALL
}

DEF rotateSphericalRotatorActive Separator {
   USE ROTATESPHERICAL_ACTIVE_MATERIAL
   USE ROTATESPHERICAL_BALL
}
