Exemple #1
0
        /// <summary>
        /// Sample codes for tweaking tool settings
        /// </summary>
        public static void PostConfigureTools_Demo()
        {
            TwoPointBandToolBuilder planeBuilder =
                (TwoPointBandToolBuilder)OG.Context.ToolManager.FindToolTypeBuilder(BodyModelTools.CreateOffsetBandTool);

            if (planeBuilder != null)
            {
                // set a custom indicator factory that overrides some default properties
                planeBuilder.IndicatorBuilder = new TwoPointBandTool_IndicatorFactory();

                // set a custom hit-test that uses double radius
                planeBuilder.CustomHitTestF = (rayS, centerS, radiusS, id) => {
                    return(IntersectionUtil.RaySphere(ref rayS.Origin, ref rayS.Direction, ref centerS, 2 * radiusS));
                };
            }
        }
Exemple #2
0
 protected virtual LinearIntersection PointIntersectionTest(Ray3d rayS, Vector3d positionS, double radiusS, int pointID)
 {
     return(IntersectionUtil.RaySphere(ref rayS.Origin, ref rayS.Direction, ref positionS, radiusS));
 }