pub struct Plane<S> {
pub n: Vector3<S>,
pub d: S,
}
A 3-dimensional plane formed from the equation: A*x + B*y + C*z - D = 0
.
n
: a unit vector representing the normal of the plane where:
n.x
: corresponds to A
in the plane equation
n.y
: corresponds to B
in the plane equation
n.z
: corresponds to C
in the plane equation
d
: the distance value, corresponding to D
in the plane equation
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
superfluous negations (see Real Time Collision Detection, p. 55).
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.
a
: the x
component of the normal
b
: the y
component of the normal
c
: the z
component of the normal
d
: the plane's distance value
Construct a plane from the components of a four-dimensional vector
Construct a plane from the components of a four-dimensional vector
Assuming alternative representation: A*x + B*y + C*z + D = 0
Constructs a plane that passes through the the three points a
, b
and c
Construct a plane from a point and a normal vector.
The plane will contain the point p
and be perpendicular to n
.
Result returned by the intersection test
See Real-Time Collision Detection, p. 210
Result returned by the intersection test
See Real-Time Collision Detection, p. 212 - 214
Result returned by the intersection test
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Used for specifying relative comparisons.
The default tolerance to use when testing values that are close together. Read more
The default relative tolerance for testing values that are far-apart. Read more
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
A test for equality that uses units in the last place (ULP) if the values are far apart.
The inverse of ApproxEq::relative_eq
.
The inverse of ApproxEq::ulps_eq
.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static