override public Capture UpdateCapture(InputState input, CaptureData data) { DrawCurveTool tool = (context.ToolManager.ActiveRightTool as DrawCurveTool); tool.UpdateDraw_Ray(WorldRay(input)); if (Released(input)) { tool.EndDraw(); return(Capture.End); } else { return(Capture.Continue); } }
override public Capture UpdateCapture(InputState input, CaptureData data) { DrawCurveTool tool = context.ToolManager.GetActiveTool((int)data.which) as DrawCurveTool; // [RMS] this is a hack for trigger+shoulder grab gesture...really need some way // to interrupt captures!! if ((data.which == CaptureSide.Left && input.bLeftShoulderPressed) || (data.which == CaptureSide.Right && input.bRightShoulderPressed)) { tool.CancelDraw(); return(Capture.End); } Vector2f vStick = (data.which == CaptureSide.Left) ? input.vLeftStickDelta2D : input.vRightStickDelta2D; if (vStick[1] != 0) { tool.Width = tool.Width + vStick[1] * 0.01f; } Ray3f sideRay = (data.which == CaptureSide.Left) ? input.vLeftSpatialWorldRay : input.vRightSpatialWorldRay; Frame3f sideHandF = (data.which == CaptureSide.Left) ? input.LeftHandFrame : input.RightHandFrame; tool.UpdateDraw_Spatial(sideRay, sideHandF); bool bReleased = (data.which == CaptureSide.Left) ? input.bLeftTriggerReleased : input.bRightTriggerReleased; if (bReleased) { tool.EndDraw(); return(Capture.End); } else { return(Capture.Continue); } }