public static IBoundingBox ToBoundingBox(this Rectangle rectangle) { var bb = new BoundingBox { Width = rectangle.Width, Height = rectangle.Height }; bb.Transform.Assign(new DefaultTransform { LocalPosition = new Vector3(rectangle.X, rectangle.Y, 0) }); return bb; }