[][src]Struct amethyst_core::geometry::Plane

pub struct Plane<T> where
    T: RealField, 
{ /* fields omitted */ }

A plane which can be intersected by a ray.

Implementations

impl<T> Plane<T> where
    T: RealField, 
[src]

pub fn new(normal: Vector3<T>, bias: T) -> Self[src]

Create a new Plane.

pub fn from_point_normal(point: &Point3<T>, normal: &Vector3<T>) -> Self[src]

Create a new Plane from a point normal representation

pub fn from_point_vectors(
    point: &Point3<T>,
    v1: &Vector3<T>,
    v2: &Vector3<T>
) -> Self
[src]

Create a new Plane from a point normal representation

pub fn with_x(x: T) -> Self[src]

Create a Plane which is facing along the X-Axis at the provided coordinate.

pub fn with_y(y: T) -> Self[src]

Create a Plane which is facing along the Y-Axis at the provided coordinate.

pub fn with_z(z: T) -> Self[src]

Create a Plane which is facing along the Z-Axis at the provided coordinate.

pub fn normal(&self) -> &Vector3<T>[src]

This Plane normal

pub fn normalize(&self) -> Self[src]

Normalized representation of this Plane

pub fn dot_point(&self, point: &Point3<T>) -> T[src]

Returns the dot product of this Plane and a provided Point3

pub fn dot(&self, point: &Vector3<T>) -> T[src]

Returns the dot product of this Plane and a provided Vector3

pub fn dot_plane(&self, plane: &Plane<T>) -> T[src]

Returns the dot product of this Plane with another Plane

pub fn intersect_line(
    &self,
    point: &Point3<T>,
    direction: &Vector3<T>
) -> Option<T>
[src]

Returns the intersection distance of the provided line given a point and direction, or None if none occurs.

pub fn intersect_ray(&self, ray: &Ray<T>) -> Option<T>[src]

Returns the intersection distance of the provided Ray, or None if none occurs.

Trait Implementations

impl<T: Clone> Clone for Plane<T> where
    T: RealField, 
[src]

impl<T: Copy> Copy for Plane<T> where
    T: RealField, 
[src]

impl<T: Debug> Debug for Plane<T> where
    T: RealField, 
[src]

impl<'de, T> Deserialize<'de> for Plane<T> where
    T: RealField,
    T: Deserialize<'de>, 
[src]

impl<T: PartialEq> PartialEq<Plane<T>> for Plane<T> where
    T: RealField, 
[src]

impl<T> Serialize for Plane<T> where
    T: RealField,
    T: Serialize
[src]

impl<T> StructuralPartialEq for Plane<T> where
    T: RealField, 
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Plane<T> where
    T: RefUnwindSafe + Scalar

impl<T> Send for Plane<T> where
    T: Scalar

impl<T> Sync for Plane<T> where
    T: Scalar

impl<T> Unpin for Plane<T> where
    T: Scalar + Unpin

impl<T> UnwindSafe for Plane<T> where
    T: Scalar + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Event for T where
    T: Send + Sync + 'static, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Resource for T where
    T: Any + Send + Sync

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,