[−][src]Struct gdnative::prelude::Plane
Plane in hessian form.
Fields
normal: Vector3D<f32, UnknownUnit>d: f32Implementations
impl Plane[src]
pub fn new(normal: Vector3D<f32, UnknownUnit>, d: f32) -> Plane[src]
Creates a new Plane from the 'Vector3' normal and the distance from the origin.
pub fn from_coordinates(a: f32, b: f32, c: f32, d: f32) -> Plane[src]
Creates a new Plane from four floats.
a, b, c are used for the normal 'Vector3'.
d is the distance from the origin.
pub fn from_points(
a: Vector3D<f32, UnknownUnit>,
b: Vector3D<f32, UnknownUnit>,
c: Vector3D<f32, UnknownUnit>
) -> Option<Plane>[src]
a: Vector3D<f32, UnknownUnit>,
b: Vector3D<f32, UnknownUnit>,
c: Vector3D<f32, UnknownUnit>
) -> Option<Plane>
Creates a new Plane from three Vector3, given in clockwise order.
If all three points are collinear, returns None.
pub fn center(&self) -> Vector3D<f32, UnknownUnit>[src]
Returns the center of the Plane.
pub fn distance_to(&self, point: Vector3D<f32, UnknownUnit>) -> f32[src]
Returns the shortest distance from the Plane to point.
pub fn has_point(&self, point: Vector3D<f32, UnknownUnit>, epsilon: f32) -> bool[src]
Returns true if point is inside the Plane.
epislon specifies the minimum threshold to be considered inside the Plane.
pub fn intersect_3(
&self,
b: Plane,
c: Plane
) -> Option<Vector3D<f32, UnknownUnit>>[src]
&self,
b: Plane,
c: Plane
) -> Option<Vector3D<f32, UnknownUnit>>
Returns the intersection point of the three planes b, c and this Plane.
Returns None if the 'Plane's don't intersect.
pub fn intersects_ray(
&self,
from: Vector3D<f32, UnknownUnit>,
dir: Vector3D<f32, UnknownUnit>
) -> Option<Vector3D<f32, UnknownUnit>>[src]
&self,
from: Vector3D<f32, UnknownUnit>,
dir: Vector3D<f32, UnknownUnit>
) -> Option<Vector3D<f32, UnknownUnit>>
Returns the intersection point of a ray consisting of the position from and the direction normal dir with this plane/
Returns None if the ray doesn't intersect.
pub fn intersects_segment(
&self,
begin: Vector3D<f32, UnknownUnit>,
end: Vector3D<f32, UnknownUnit>
) -> Option<Vector3D<f32, UnknownUnit>>[src]
&self,
begin: Vector3D<f32, UnknownUnit>,
end: Vector3D<f32, UnknownUnit>
) -> Option<Vector3D<f32, UnknownUnit>>
Returns the intersection point of a segment from begin to end with this Plane.
Returns None if the the segment doesn't intersect.
pub fn approx_eq(&self, other: Plane) -> bool[src]
Returns true if this Plane and other are approximately equal.
Determined by running approx_eq on both normal and d.
pub fn is_point_over(&self, point: Vector3D<f32, UnknownUnit>) -> bool[src]
Returns true if point is above the Plane.
pub fn normalize(self) -> Plane[src]
Returns the Plane normalized.
pub fn project(
&self,
point: Vector3D<f32, UnknownUnit>
) -> Vector3D<f32, UnknownUnit>[src]
&self,
point: Vector3D<f32, UnknownUnit>
) -> Vector3D<f32, UnknownUnit>
Returns the orthogonal projection of point into a point in the Plane.
Trait Implementations
impl Clone for Plane[src]
impl Copy for Plane[src]
impl Debug for Plane[src]
impl Export for Plane[src]
type Hint = ()
A type-specific hint type that is valid for the type being exported.
fn export_info(_hint: Option<<Plane as Export>::Hint>) -> ExportInfo[src]
impl FromVariant for Plane[src]
fn from_variant(variant: &Variant) -> Result<Plane, FromVariantError>[src]
impl PartialEq<Plane> for Plane[src]
impl StructuralPartialEq for Plane[src]
impl ToVariant for Plane[src]
fn to_variant(&self) -> Variant[src]
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> OwnedToVariant for T where
T: ToVariant, [src]
T: ToVariant,
fn owned_to_variant(self) -> Variant[src]
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>,