#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;
using Nuclex.Geometry.Volumes;
using Nuclex.Geometry.Areas;
namespace Nuclex.Geometry.Lines {
/// One-dimensional range situated in 3D space
///
/// This is the generalized interface to all kinds of lines (including rays and
/// line segments). Be careful not to mistake this for an infinite Line like it
/// is represented by the Line3 class.
///
public interface ILine3 {
/// Determines the closest point on the range to the specified location
/// Random location to which the closest point is determined
/// The closest point within the range
Vector3 ClosestPointTo(Vector3 location);
/// Determines where the range clips a sphere
/// Sphere that will be checked for intersection
/// The times at which the range enters or leaves the sphere
LineContacts FindContacts(Sphere3 sphere);
/// Determines where the range clips an axis aligned box
/// Box that will be checked for intersection
/// The times at which the range enters or leaves the box
LineContacts FindContacts(AxisAlignedBox3 box);
/// Determines where the range clips a box
/// Box that will be checked for intersection
/// The times at which the range enters or leaves the box
LineContacts FindContacts(Box3 box);
/// Determines where the range clips a plane
/// Plane that will be checked for intersection
/// The times at which the range touches the plane, if at all
LineContacts FindContacts(Plane3 plane);
/// Determines where the range clips a triangle
/// Triangle that will be checked for intersection
/// The times at which the range touches the triangle, if at all
LineContacts FindContacts(Triangle3 triangle);
}
} // namespace Nuclex.Geometry.Ranges