public Ray3f WorldRay(InputState input) { if (input.IsForDevice(InputDevice.Mouse)) { return(input.vMouseWorldRay); } else if (input.IsForDevice(InputDevice.TabletFingers)) { return(input.vTouchWorldRay); } return(new Ray3f(Vector3f.Zero, Vector3f.AxisY));; }
public Vector2f ClickPoint(InputState input) { if (input.IsForDevice(InputDevice.Mouse)) { return(input.vMousePosition2D); } else if (input.IsForDevice(InputDevice.TabletFingers)) { return(input.vTouchPosition2D); } return(Vector2f.Zero); }
public bool Released(InputState input) { if (input.IsForDevice(InputDevice.Mouse)) { return(input.bLeftMouseReleased); } else if (input.IsForDevice(InputDevice.TabletFingers)) { return(input.bTouchReleased); } return(false); }
public bool Down(InputState input) { if (input.IsForDevice(InputDevice.Mouse)) { return(input.bLeftMouseDown); } else if (input.IsForDevice(InputDevice.TabletFingers)) { return(input.bTouchDown); } return(false); }
public bool Pressed(ref InputState input) { if (input.IsForDevice(InputDevice.Mouse)) { using_mouse = true; return(input.bLeftMousePressed); } else if (input.IsForDevice(InputDevice.TabletFingers)) { using_mouse = false; return(input.bTouchPressed); } return(false); }
public Ray3f SceneRay(ref InputState input, FScene scene) { if (input.IsForDevice(InputDevice.Mouse)) { using_mouse = true; return(scene.ToSceneRay(input.vMouseWorldRay)); } else if (input.IsForDevice(InputDevice.TabletFingers)) { using_mouse = false; return(scene.ToSceneRay(input.vTouchWorldRay)); } return(new Ray3f(Vector3f.Zero, Vector3f.AxisY));; }
float resize_speed(ref InputState input) { if (input.IsForDevice(InputDevice.HTCViveWands)) { return(0.0025f); } else { return(0.01f); } }
override public Capture BeginCapture(InputState input, CaptureSide eSide) { update_last_hit(tool, WorldRay(ref input)); if (input.IsForDevice(InputDevice.Mouse)) { tool.Invert = input.bCtrlKeyDown; tool.UseSecondary = input.bShiftKeyDown; } tool.BeginBrushStroke(lastHitFrameW, lastHitTID); return(Capture.Begin(this, CaptureSide.Any)); }
public override Capture UpdateCapture(InputState input, CaptureData data) { if (input.IsForDevice(InputDevice.Mouse)) { if (input.bLeftMousePressed || input.bMiddleMousePressed || input.bRightMousePressed) { if (PopupHitTestF(input.vMouseOrthoWorldRay) == false) { DismissF(); } } } else if (input.IsForDevice(InputDevice.TabletFingers)) { if (input.bTouchPressed) { if (PopupHitTestF(input.vTouchOrthoWorldRay) == false) { DismissF(); } } } else if (input.IsForDevice(InputDevice.AnySpatialDevice)) { if (input.bLeftTriggerPressed && PopupHitTestF(input.vLeftSpatialWorldRay) == false) { DismissF(); } else if (input.bRightTriggerPressed && PopupHitTestF(input.vRightSpatialWorldRay) == false) { DismissF(); } } return(Capture.Continue); }
public override Capture UpdateCapture(InputState input, CaptureData data) { if (input.fMouseWheel == 0) { return(Capture.Continue); } if (input.IsForDevice(InputDevice.Mouse)) { if (RegionHitTest(input.vMouseOrthoWorldRay)) { MouseWheelF(input.fMouseWheel); return(Capture.End); } } return(Capture.Continue); }