Beispiel #1
0
        private double GetSearchRadius(ITriangle dragPlane, double dragSpeed)
        {
            // Get the difference from the camera to the drag plane, this will determine how far out to look for items
            // Use plane distance as a rough estimate of how far the camera can see side to side
            double planeDistance = Math.Abs(Math3D.DistanceFromPlane(dragPlane, _camera.Position));

            planeDistance *= .5d;

            // Drag speed is tiny, so just return what the camera can see
            return(planeDistance);



            //double dragScale = dragSpeed * 10;

            //if (dragScale < planeDistance)
            //{
            //    // They are dragging slowly, don't project too far
            //    return dragScale;
            //}
            //else
            //{
            //    // Doesn't matter how fast they're dragging.  Don't project farther than they can see
            //    return planeDistance;
            //}
        }