コード例 #1
0
        public bool Intersects(volume aabb)
        {
            var v       = Center - aabb.Center;
            var extents = Extents;

            return(Math.Abs(v.X) <= extents.X + aabb.Extents.X && Math.Abs(v.Y) <= extents.Y + aabb.Extents.Y && Math.Abs(v.Z) <= extents.Z + aabb.Extents.Z && Math.Abs(v.W) <= extents.W + aabb.Extents.W);
        }
コード例 #2
0
 public Obb4f(aabb aabb)
 {
     Center  = aabb.Center;
     Extents = aabb.Extents;
     Ax      = vector.AxisX;
     Ay      = vector.AxisY;
     Az      = vector.AxisZ;
     Aw      = vector.AxisW;
 }