-#if 0
- if (state == OSInactive)
- {
-//printf("Circle: pp = %lf, length = %lf, distance = %lf\n", parameterizedPoint, lineSegment.Magnitude(), distance);
-//printf(" v1.Magnitude = %lf, v2.Magnitude = %lf\n", v1.Magnitude(), v2.Magnitude());
-//printf(" point = %lf,%lf,%lf; p1 = %lf,%lf,%lf; p2 = %lf,%lf,%lf\n", point.x, point.y, point.z, position.x, position.y, position.z, endpoint.x, endpoint.y, endpoint.z);
-//printf(" \n", );
-//How to translate this into pixels from Document space???
-//Maybe we need to pass a scaling factor in here from the caller? That would make sense, as
-//the caller knows about the zoom factor and all that good kinda crap
- if (v1.Magnitude() < 10.0)
- {
- oldState = state;
- state = OSSelected;
- oldPoint = position; //maybe "position"?
- draggingHandle1 = true;
- return true;
- }
- else if ((v1.Magnitude() < radius + 2.0) && (v1.Magnitude() > radius - 2.0))
- {
- oldState = state;
- state = OSSelected;
- oldPoint = point;
- dragging = true;
- return true;
- }
- }
- else if (state == OSSelected)
- {
- // Here we test for collision with handles as well! (SOON!)
-/*
-Like so:
- if (v1.Magnitude() < 2.0) // Handle #1
- else if (v2.Magnitude() < 2.0) // Handle #2
-*/
- if ((v1.Magnitude() < radius + 2.0) && (v1.Magnitude() > radius - 2.0))
- {
- oldState = state;
-// state = OSInactive;
- oldPoint = point;
- dragging = true;
- return true;
- }
- }
-#else