Example #1
0
        //--------------------------------------------------------------------------------------------------
        public static bool TrackEdgeAxis(ref int axis, int n, double s, ref double sMax, Vec3 normal, ref Vec3 axisNormal)
        {
            if (s > 0)
            {
                return(true);
            }

            double l = 1 / Vec3.Length(normal);

            s *= l;

            if (s > sMax)
            {
                sMax       = s;
                axis       = n;
                axisNormal = normal * l;
            }

            return(false);
        }