Beispiel #1
0
        public override void ComputeAABB(ref Transform transform, int childIndex, out AABB aabb)
        {
            Debug.Assert(childIndex < Vertices.Count);

            int i1 = childIndex;
            int i2 = childIndex + 1;

            if (i2 == Vertices.Count)
            {
                i2 = 0;
            }

            Vector2 v1 = Vertices[i1];
            Vector2 v2 = Vertices[i2];

            AABBHelper.ComputeEdgeAABB(ref v1, ref v2, ref transform, out aabb);
        }
Beispiel #2
0
 public override void ComputeAABB(ref Transform transform, int childIndex, out AABB aabb)
 {
     AABBHelper.ComputeEdgeAABB(ref _vertex1, ref _vertex2, ref transform, out aabb);
 }