Ejemplo n.º 1
0
 override public CaptureRequest WantsCapture(InputState input)
 {
     if (context.ToolManager.ActiveRightTool != tool)
     {
         return(CaptureRequest.Ignore);
     }
     if (Pressed(input))
     {
         int hit_pt_id = tool.FindNearestHitPoint(WorldRay(input));
         if (hit_pt_id >= 0)
         {
             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;
         if (context.ToolManager.GetActiveTool((int)eSide) == tool)
         {
             Ray3f worldRay  = (eSide == CaptureSide.Left) ? input.vLeftSpatialWorldRay : input.vRightSpatialWorldRay;
             int   hit_pt_id = tool.FindNearestHitPoint(worldRay);
             if (hit_pt_id >= 0)
             {
                 return(CaptureRequest.Begin(this, eSide));
             }
         }
     }
     return(CaptureRequest.Ignore);
 }