[−][src]Struct ultraviolet::geometry::Plane
A plane which can be intersected by a ray.
Fields
normal: Vec3plane described as x,y,z normal
bias: f32dot product of the point and normal, representing the plane position
Implementations
impl Plane[src]
pub fn new(normal: Vec3, bias: f32) -> Self[src]
Create a new Plane.
pub fn from_point_normal(point: Vec3, normal: Vec3) -> Self[src]
Create a new Plane from a point normal representation. The normal parameter must already be normalized.
pub fn from_point_vectors(point: Vec3, v1: Vec3, v2: Vec3) -> Self[src]
Create a new Plane from a point normal representation
pub fn with_x(x: f32) -> Self[src]
Create a Plane which is facing along the X-Axis at the provided coordinate.
pub fn with_y(y: f32) -> Self[src]
Create a Plane which is facing along the Y-Axis at the provided coordinate.
pub fn with_z(z: f32) -> Self[src]
Create a Plane which is facing along the Z-Axis at the provided coordinate.
pub fn normal(&self) -> Vec3[src]
f32his Plane normal
pub fn normalize(&mut self)[src]
Normalized representation of this Plane
pub fn normalized(&self) -> Self[src]
Normalized representation of this Plane
pub fn dot_point(&self, point: Vec3) -> f32[src]
Returns the dot product of this Plane and a provided Vec3
pub fn dot(&self, point: Vec3) -> f32[src]
Returns the dot product of this Plane and a provided Vec3, assumed to be a normal, computed with this planes normal.
pub fn dot_plane(&self, plane: Plane) -> f32[src]
Returns the dot product of this Plane with another Plane. This is computed against the two plane normals.
pub fn intersect_line(&self, point: Vec3, direction: Vec3) -> Option<f32>[src]
Returns the intersection distance of the provided line given a point and direction, or None if none occurs.
Warning: These intersection methods do not check for the ray never intersecting. This is up to the user to confirm.
pub fn intersect_ray(&self, ray: Ray) -> Option<f32>[src]
Returns the intersection distance of the provided Ray, or None if none occurs.
Warning: These intersection methods do not check for the ray never intersecting. This is up to the user to confirm.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Plane
impl Send for Plane
impl Sync for Plane
impl Unpin for Plane
impl UnwindSafe for Plane
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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> 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>,