Example #1
0
        override public Capture BeginCapture(InputState input, CaptureSide eSide)
        {
            RadialMeasureTool tool =
                (context.ToolManager.ActiveRightTool as RadialMeasureTool);

            upate_hit_pos(tool, WorldRay(input));
            return(Capture.Begin(this, CaptureSide.Any));
        }
Example #2
0
        void upate_hit_pos(RadialMeasureTool tool, Ray3f ray)
        {
            SORayHit soHit;

            if (tool.Target.FindRayIntersection(ray, out soHit))
            {
                tool.UpdateMeasurePoint(soHit.hitPos);
            }
        }
Example #3
0
        override public Capture UpdateCapture(InputState input, CaptureData data)
        {
            RadialMeasureTool tool =
                (context.ToolManager.ActiveRightTool as RadialMeasureTool);

            if (Released(input))
            {
                return(Capture.End);
            }
            else
            {
                upate_hit_pos(tool, WorldRay(input));
                return(Capture.Continue);
            }
        }
Example #4
0
 override public CaptureRequest WantsCapture(InputState input)
 {
     if (context.ToolManager.ActiveRightTool == null || !(context.ToolManager.ActiveRightTool is RadialMeasureTool))
     {
         return(CaptureRequest.Ignore);
     }
     if (Pressed(input))
     {
         RadialMeasureTool tool =
             (context.ToolManager.ActiveRightTool as RadialMeasureTool);
         SORayHit soHit;
         if (tool.Target.FindRayIntersection(WorldRay(input), out soHit))
         {
             return(CaptureRequest.Begin(this));
         }
     }
     return(CaptureRequest.Ignore);
 }