override public CaptureRequest WantsCapture(InputState input)
 {
     if (context.ToolManager.ActiveRightTool == null || !(context.ToolManager.ActiveRightTool is BaseSurfacePointTool))
     {
         return(CaptureRequest.Ignore);
     }
     if (Pressed(input))
     {
         SORayHit rayHit;
         if (context.Scene.FindSORayIntersection(WorldRay(input), out rayHit, ObjectFilterF))
         {
             BaseSurfacePointTool tool =
                 (context.ToolManager.ActiveRightTool as BaseSurfacePointTool);
             if (tool.WantCapture(rayHit.hitSO, ClickPoint(input), WorldRay(input)))
             {
                 return(CaptureRequest.Begin(this));
             }
         }
     }
     return(CaptureRequest.Ignore);
 }
Ejemplo n.º 2
0
 override public CaptureRequest WantsCapture(InputState input)
 {
     if (input.bLeftTriggerPressed ^ input.bRightTriggerPressed)
     {
         CaptureSide eSide = (input.bLeftTriggerPressed) ? CaptureSide.Left : CaptureSide.Right;
         ITool       itool = context.ToolManager.GetActiveTool((int)eSide);
         if (itool != null && itool is BaseSurfacePointTool)
         {
             Ray3f    worldRay = (eSide == CaptureSide.Left) ? input.vLeftSpatialWorldRay : input.vRightSpatialWorldRay;
             SORayHit rayHit;
             if (context.Scene.FindSORayIntersection(worldRay, out rayHit, ObjectFilterF))
             {
                 BaseSurfacePointTool tool = itool as BaseSurfacePointTool;
                 if (tool.WantCapture(rayHit.hitSO, Vector2d.Zero, worldRay))
                 {
                     return(CaptureRequest.Begin(this, eSide));
                 }
             }
         }
     }
     return(CaptureRequest.Ignore);
 }