/// <summary>
        /// called on click-down
        /// </summary>
        override public void Begin(SceneObject so, Vector2d downPos, Ray3f downRay)
        {
            SORayHit hit;

            if (TargetSO.FindRayIntersection(downRay, out hit) == false)
            {
                return;
            }

            Vector3d scenePos = SceneTransforms.WorldToSceneP(this.Scene, hit.hitPos);

            CurrentHitPosS = new Frame3f(scenePos);

            float fObjectT = (CurrentHitPosS.Origin - ObjectFrameS.Origin).Dot(ObjectFrameS.Y);

            CurrentPlaneFrameS = ObjectFrameS.Translated(fObjectT, 1);

            if (have_set_plane == false)
            {
                sphereIndicator = IndicatorBuilder.MakeSphereIndicator(0, "hit_point",
                                                                       fDimension.Scene(sphere_indicator_size * 0.5),
                                                                       () => { return(CurrentHitPosS); },
                                                                       () => { return(Colorf.Orange); },
                                                                       () => { return(true); });
                Indicators.AddIndicator(sphereIndicator);
                sphereIndicator.RootGameObject.SetName("hit_point");

                planeIndicator = IndicatorBuilder.MakeSectionPlaneIndicator(1, "section_plane",
                                                                            fDimension.Scene(plane_indicator_width),
                                                                            () => { return(CurrentPlaneFrameS); },
                                                                            () => { return(new Colorf(Colorf.LightGreen, 0.5f)); },
                                                                            () => { return(true); });
                Indicators.AddIndicator(planeIndicator);
                planeIndicator.RootGameObject.SetName("section_plane");

                have_set_plane = true;
            }
        }
        public override void Setup()
        {
            StartPointID = AppendSurfacePoint("StartPoint", Colorf.Blue);
            EndPointID   = AppendSurfacePoint("EndPoint", Colorf.Green);

            //LineIndicator line = new LineIndicator() {
            //    LineWidth = fDimension.Scene(1.0f),
            //    SceneStartF = () => { return GizmoPoints[StartPointID].currentFrameS.Origin; },
            //    SceneEndF = () => { return GizmoPoints[EndPointID].currentFrameS.Origin; },
            //};
            //indicators.AddIndicator(line);
            //indicators.SetLayer(line, FPlatform.HUDOverlay);   // has to be hud overlay or it will be clipped by depth render

            Frame3f TargetFrameS = TargetSO.GetLocalFrame(CoordSpace.SceneCoords);

            TargetAxis = new Line3d(TargetFrameS.Origin, Vector3d.AxisY);

            SectionPlaneIndicator startPlane = IndicatorBuilder.MakeSectionPlaneIndicator(
                100, "startPlane",
                fDimension.Scene(plane_indicator_width),
                () => { return(new Frame3f(TargetAxis.ClosestPoint(GizmoPoints[StartPointID].currentFrameS.Origin))); },
                () => { return(new Colorf(Colorf.LightGreen, 0.5f)); },
                () => { return(true); }
                );

            Indicators.AddIndicator(startPlane);

            SectionPlaneIndicator endPlane = IndicatorBuilder.MakeSectionPlaneIndicator(
                101, "endPlane",
                fDimension.Scene(plane_indicator_width),
                () => { return(new Frame3f(TargetAxis.ClosestPoint(GizmoPoints[EndPointID].currentFrameS.Origin))); },
                () => { return(new Colorf(Colorf.LightGreen, 0.5f)); },
                () => { return(true); }
                );

            Indicators.AddIndicator(endPlane);
        }