示例#1
0
        private static bool TryGetPlaneVectors(WKSPointZ normal, WKSPointZ vector,
                                               out WKSPointZ planeVector1,
                                               out WKSPointZ planeVector2)
        {
            planeVector1 = WKSPointZUtils.GetVectorProduct(normal, vector);

            const double e = 0.1;

            if (GetLength2(planeVector1) < e)
            {
                planeVector2 = new WKSPointZ();
                return(false);
            }

            planeVector1 = WKSPointZUtils.GetNormed(planeVector1);

            planeVector2 = WKSPointZUtils.GetVectorProduct(normal, planeVector1);

            return(GetLength2(planeVector2) >= e);
        }
示例#2
0
        private static bool TryGetNormal(WKSPointZ v0, WKSPointZ v1, out WKSPointZ normal)
        {
            normal = WKSPointZUtils.GetVectorProduct(v0, v1);

            return(GetLength2(normal) > 0.1);
        }