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)); }
void upate_hit_pos(RadialMeasureTool tool, Ray3f ray) { SORayHit soHit; if (tool.Target.FindRayIntersection(ray, out soHit)) { tool.UpdateMeasurePoint(soHit.hitPos); } }
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); } }
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); }