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

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

A plane which can be intersected by a ray.

Methods

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: PartialEq> PartialEq<Plane<T>> 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<T> Serialize for Plane<T> where
    T: RealField,
    T: Serialize
[src]

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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

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

impl<T> Any for T where
    T: Any