Beispiel #1
0
        public override void getBroadphaseAabb(out VInt3 aabbMin, out VInt3 aabbMax)
        {
            DbvtAabbMm bounds = new DbvtAabbMm();

            if (!sets[DYNAMIC_SET].empty())
            {
                if (!sets[FIXED_SET].empty())
                {
                    DbvtAabbMm.Merge(sets[DYNAMIC_SET].root.volume, sets[FIXED_SET].root.volume, bounds);
                }
                else
                {
                    bounds = new DbvtAabbMm(sets[DYNAMIC_SET].root.volume);
                }
            }
            else if (!sets[FIXED_SET].empty())
            {
                bounds = new DbvtAabbMm(sets[FIXED_SET].root.volume);
            }
            else
            {
                DbvtAabbMm.FromCR(VInt3.zero, VFixedPoint.Zero, bounds);
            }
            aabbMin = bounds.Mins();
            aabbMax = bounds.Maxs();
        }
Beispiel #2
0
 private static DbvtAabbMm merge(DbvtAabbMm a, DbvtAabbMm b, DbvtAabbMm output)
 {
     DbvtAabbMm.Merge(a, b, output);
     return(output);
 }