コード例 #1
0
        override public Capture BeginCapture(InputState input, CaptureSide eSide)
        {
            Ray3f    worldRay = (eSide == CaptureSide.Left) ? input.vLeftSpatialWorldRay : input.vRightSpatialWorldRay;
            SORayHit rayHit;
            bool     bHit = context.Scene.FindSORayIntersection(worldRay, out rayHit, ObjectFilterF);

            if (bHit)
            {
                targetSO = rayHit.hitSO;
                BaseSurfacePointTool tool = context.ToolManager.GetActiveTool((int)eSide) as BaseSurfacePointTool;
                tool.Begin(targetSO, Vector2d.Zero, worldRay);

                return(Capture.Begin(this, eSide));
            }
            return(Capture.Ignore);
        }
コード例 #2
0
        override public Capture BeginCapture(InputState input, CaptureSide eSide)
        {
            SORayHit rayHit;
            bool     bHit = context.Scene.FindSORayIntersection(WorldRay(input), out rayHit, ObjectFilterF);

            if (bHit)
            {
                targetSO = rayHit.hitSO;
                BaseSurfacePointTool tool =
                    (context.ToolManager.ActiveRightTool as BaseSurfacePointTool);
                tool.Begin(targetSO, ClickPoint(input), WorldRay(input));

                return(Capture.Begin(this));
            }
            return(Capture.Ignore);
        }