コード例 #1
0
        // compute FWN cache for all points underneath this box
        protected void make_box_fast_winding_cache(int iBox, IEnumerable <int> pointIndices)
        {
            Util.gDevAssert(FastWindingCache.ContainsKey(iBox) == false);

            // construct cache
            var cacheInfo = new FWNInfo();

            FastPointWinding.ComputeCoeffs(points, pointIndices, FastWindingAreaCache,
                                           ref cacheInfo.Center, ref cacheInfo.R, ref cacheInfo.Order1Vec, ref cacheInfo.Order2Mat);

            FastWindingCache[iBox] = cacheInfo;
        }
コード例 #2
0
        // evaluate the FWN cache for iBox
        protected double evaluate_box_fast_winding_cache(int iBox, ref Vector3d q)
        {
            FWNInfo cacheInfo = FastWindingCache[iBox];

            if (FWNApproxOrder == 2)
            {
                return(FastPointWinding.EvaluateOrder2Approx(ref cacheInfo.Center, ref cacheInfo.Order1Vec, ref cacheInfo.Order2Mat, ref q));
            }
            else
            {
                return(FastPointWinding.EvaluateOrder1Approx(ref cacheInfo.Center, ref cacheInfo.Order1Vec, ref q));
            }
        }