Example #1
0
        private void ExpandVolume(Bounds_d bounds)
        {
            Bounds_d oldBox = Bounds;

            Bounds.ExpandToFit(bounds);

            if (!oldBox.Equals(Bounds) && Parent != null)
            {
                Parent.ExpandVolume(Bounds);
            }
        }
Example #2
0
        private bool RefitVolume(SSBVHNodeAdaptor <GO> nAda)
        {
            if (ContainedObjects.Count == 0)
            {
                throw new NotImplementedException();
            }             // TODO: fix this... we should never get called in this case...

            Bounds_d oldbox = Bounds;

            ComputeVolume(nAda);
            if (!Bounds.Equals(oldbox))
            {
                if (Parent != null)
                {
                    Parent.ChildRefit(nAda);
                }
                return(true);
            }

            return(false);
        }