Touch up the Plane docs
This commit is contained in:
parent
8fa0f67333
commit
c9573ad511
1 changed files with 6 additions and 4 deletions
|
@ -26,7 +26,7 @@ use vector::{Vector, EuclideanVector};
|
||||||
use partial_ord::PartOrdFloat;
|
use partial_ord::PartOrdFloat;
|
||||||
|
|
||||||
|
|
||||||
/// A 3-dimensional plane formed from the equation: `a*x + b*y + c*z - d = 0`.
|
/// A 3-dimensional plane formed from the equation: `A*x + B*y + C*z - D = 0`.
|
||||||
///
|
///
|
||||||
/// # Fields
|
/// # Fields
|
||||||
///
|
///
|
||||||
|
@ -38,8 +38,8 @@ use partial_ord::PartOrdFloat;
|
||||||
///
|
///
|
||||||
/// # Notes
|
/// # Notes
|
||||||
///
|
///
|
||||||
/// The `a*x + b*y + c*z - d = 0` form is preferred over the other common
|
/// The `A*x + B*y + C*z - D = 0` form is preferred over the other common
|
||||||
/// alternative, `a*x + b*y + c*z + d = 0`, because it tends to avoid
|
/// alternative, `A*x + B*y + C*z + D = 0`, because it tends to avoid
|
||||||
/// superfluous negations (see _Real Time Collision Detection_, p. 55).
|
/// superfluous negations (see _Real Time Collision Detection_, p. 55).
|
||||||
#[deriving(Clone, Eq)]
|
#[deriving(Clone, Eq)]
|
||||||
pub struct Plane<S> {
|
pub struct Plane<S> {
|
||||||
|
@ -49,7 +49,9 @@ pub struct Plane<S> {
|
||||||
|
|
||||||
impl<S: PartOrdFloat<S>>
|
impl<S: PartOrdFloat<S>>
|
||||||
Plane<S> {
|
Plane<S> {
|
||||||
/// Construct a plane from a normal vector and a scalar distance
|
/// Construct a plane from a normal vector and a scalar distance. The
|
||||||
|
/// plane will be perpendicular to `n`, and `d` units offset from the
|
||||||
|
/// origin.
|
||||||
pub fn new(n: Vector3<S>, d: S) -> Plane<S> {
|
pub fn new(n: Vector3<S>, d: S) -> Plane<S> {
|
||||||
Plane { n: n, d: d }
|
Plane { n: n, d: d }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue