using DevExpress.CodeParser;
|
using DevExpress.Mvvm.POCO;
|
|
namespace Yw.WinFrmUI.HydroL3d
|
{
|
/// <summary>
|
///
|
/// </summary>
|
[TypeConverter(typeof(PropertySorter))]
|
public class BoundingBox3d
|
{
|
/// <summary>
|
///
|
/// </summary>
|
public BoundingBox3d() { }
|
|
/// <summary>
|
///
|
/// </summary>
|
public BoundingBox3d(Point3d min, Point3d max)
|
{
|
this.Min = new Point3d(min);
|
this.Max = new Point3d(max);
|
}
|
|
/// <summary>
|
///
|
/// </summary>
|
[DisplayName("Min")]
|
[PropertyOrder(1)]
|
public Point3d Min { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
[DisplayName("Max")]
|
[PropertyOrder(2)]
|
public Point3d Max { get; set; }
|
|
/// <summary>
|
/// 获取中心
|
/// </summary>
|
public Point3d GetCenter()
|
{
|
return new Point3d()
|
{
|
X = (this.Min.X + this.Max.X) / 2f,
|
Y = (this.Min.Y + this.Max.Y) / 2f,
|
Z = (this.Min.Z + this.Max.Z) / 2f
|
};
|
}
|
}
|
}
|