Add IModel.AggregateBounds and ModelAnimation.ScreenBounds.

The bounds define the smallest Rectangle that covers all
rotations of all frames within a model sequence.
This commit is contained in:
Paul Chote
2017-12-05 17:20:49 +00:00
committed by reaperrr
parent 506b677527
commit 29255c8e01
3 changed files with 47 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
#endregion
using System;
using System.Drawing;
using OpenRA.FileSystem;
namespace OpenRA.Graphics
@@ -23,6 +24,9 @@ namespace OpenRA.Graphics
float[] Size { get; }
float[] Bounds(uint frame);
ModelRenderData RenderData(uint section);
/// <summary>Returns the smallest rectangle that covers all rotations of all frames in a model</summary>
Rectangle AggregateBounds { get; }
}
public struct ModelRenderData