Example #1
0
        public List <Arc> block_collision(PlanetariaShape other, Quaternion shift_from_self_to_other) // TODO: AABB-equivalent would be nice here
        {
            List <Arc> union = new List <Arc>();

            for (int other_index = 0; other_index < other.block_list.Length; ++other_index)
            {
                PlanetariaArcCollider other_collider = other.block_list[other_index];
                foreach (PlanetariaArcCollider this_collider in this.block_list)
                {
                    if (other_collider.collides_with(this_collider, shift_from_self_to_other))
                    {
                        union.Add(other.arc_list[other_index]);
                        break; // try to see if the next arc collides (because we know this one does)
                    }
                }
            }
            return(union);
        }