Beispiel #1
0
        public void GetBodiesIntersecting(Ray ray, List <Body> components, CollisionManager.CollisionType type)
        {
            HashSet <Body> set = new HashSet <Body>();

            CollisionManager.GetObjectsIntersecting(ray, set, type);

            components.AddRange(set);
        }
        public void GetBodiesIntersecting(BoundingBox box, List <Body> components, CollisionManager.CollisionType type)
        {
            HashSet <IBoundedObject> set = new HashSet <IBoundedObject>();

            CollisionManager.GetObjectsIntersecting(box, set, type);

            components.AddRange(set.Where(o => o is Body).Select(o => o as Body));
        }
Beispiel #3
0
        public void GetBodiesIntersecting(BoundingFrustum frustrum, List <Body> components, CollisionManager.CollisionType type)
        {
            HashSet <Body> set = new HashSet <Body>();

            CollisionManager.GetObjectsIntersecting(frustrum, set, type);

            components.AddRange(set);
        }