#region CPL License
/*
Nuclex Framework
Copyright (C) 2002-2009 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#endregion
using System;
using Microsoft.Xna.Framework;
namespace Nuclex.Geometry.Areas {
/// Two-dimensional geometric body in 3D space
///
/// An area by definition and of course also in the context of this library is a
/// two-dimensional region. This region could a either be located in actual
/// 2D space (like drawn on a piece of paper) or be located in as a flat object
/// in 3D space (like the piece of paper located in the real world). This
/// class represents the latter case, a 2D object in 3D space.
///
public interface IArea3 {
/// Surface area that the shape contains
float Area { get; }
/// The total length of the area's circumference
float CircumferenceLength { get; }
/// The center of mass within the shape
Vector3 CenterOfMass { get; }
/// Smallest rectangle that encloses the shape in its entirety
Volumes.AxisAlignedBox3 BoundingBox { get; }
/// Locates the nearest point in the shape to some arbitrary location
/// Location to which the closest point is determined
/// The closest point in the shape to the specified location
Vector3 ClosestPointTo(Vector3 location);
/// Returns a random point on the area's perimeter
/// Random number generator that will be used
/// A random point on the area's perimeter
Vector3 RandomPointOnPerimeter(IRandom randomNumberGenerator);
/// Returns a random point inside the area
/// Random number generator that will be used
/// A random point inside the area
Vector3 RandomPointWithin(IRandom randomNumberGenerator);
}
} // namespace Nuclex.Geometry.Areas