Ejemplo n.º 1
0
/*
*interaction sur mouvement de souris -> bouge la KO
*/
void
KeyOrientation::onMotionInteraction(ArRef<AbstractInteractor> source, ArRef<Base3D> newLocation, bool begin, bool end) {
  _c3dof->globalToLocalLocation(newLocation);
  
  double x, y, z;
  newLocation->getPosition(x, y, z);
  Vector3d v(x, y, z);
  v.normalize();
  v *= _c3dof->getRadius();
  newLocation->setPosition(v.x(),v.y(), v.z());
  _c3dof->localToGlobalLocation(newLocation);
  
  Object3D::onMotionInteraction(source, ShapePart3D::nullRef(), 0, newLocation, begin, end);
}