[−][src]Struct amethyst_core::geometry::Plane
A plane which can be intersected by a ray.
Methods
impl<T> Plane<T> where
T: RealField,
[src]
T: RealField,
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]
point: &Point3<T>,
v1: &Vector3<T>,
v2: &Vector3<T>
) -> Self
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]
&self,
point: &Point3<T>,
direction: &Vector3<T>
) -> Option<T>
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]
T: RealField,
impl<T: PartialEq> PartialEq<Plane<T>> for Plane<T> where
T: RealField,
[src]
T: RealField,
impl<T: Copy> Copy for Plane<T> where
T: RealField,
[src]
T: RealField,
impl<T: Debug> Debug for Plane<T> where
T: RealField,
[src]
T: RealField,
impl<T> Serialize for Plane<T> where
T: RealField,
T: Serialize,
[src]
T: RealField,
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, T> Deserialize<'de> for Plane<T> where
T: RealField,
T: Deserialize<'de>,
[src]
T: RealField,
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<T> Send for Plane<T> where
T: Scalar,
T: Scalar,
impl<T> Unpin for Plane<T> where
T: Scalar + Unpin,
T: Scalar + Unpin,
impl<T> Sync for Plane<T> where
T: Scalar,
T: Scalar,
impl<T> UnwindSafe for Plane<T> where
T: Scalar + UnwindSafe,
T: Scalar + UnwindSafe,
impl<T> RefUnwindSafe for Plane<T> where
T: RefUnwindSafe + Scalar,
T: RefUnwindSafe + Scalar,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn is_in_subset(&self) -> bool
[src]
unsafe fn to_subset_unchecked(&self) -> SS
[src]
fn from_subset(element: &SS) -> SP
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Any + Debug,
[src]
T: Copy + PartialEq<T> + Any + Debug,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Resource for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> Any for T where
T: Any,
T: Any,