#[repr(C)]pub struct NavVec3 {
pub x: Scalar,
pub y: Scalar,
pub z: Scalar,
}Fields§
§x: Scalar§y: Scalar§z: ScalarImplementations§
pub fn new(x: Scalar, y: Scalar, z: Scalar) -> Self
pub fn sqr_magnitude(self) -> Scalar
pub fn magnitude(self) -> Scalar
pub fn cross(self, other: Self) -> Self
pub fn dot(self, other: Self) -> Scalar
pub fn normalize(self) -> Self
pub fn project(self, from: Self, to: Self) -> Scalar
pub fn unproject(from: Self, to: Self, t: Scalar) -> Self
pub fn is_above_plane(self, origin: Self, normal: Self) -> bool
pub fn project_on_plane(self, origin: Self, normal: Self) -> Self
pub fn raycast_plane( from: Self, to: Self, origin: Self, normal: Self, ) -> Option<Self>
pub fn raycast_line( from: Self, to: Self, a: Self, b: Self, normal: Self, ) -> Option<Self>
pub fn is_line_between_points( from: Self, to: Self, a: Self, b: Self, normal: Self, ) -> bool
Trait Implementations§
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§fn dimensions() -> usize
fn dimensions() -> usize
The (fixed) number of dimensions of this point type.
Source§fn nth_mut(&mut self, index: usize) -> &mut Self::Scalar
fn nth_mut(&mut self, index: usize) -> &mut Self::Scalar
Returns a mutable reference to the nth element of this point.
Source§fn from_value(value: Self::Scalar) -> Self
fn from_value(value: Self::Scalar) -> Self
Creates a new point with all components set to a certain value.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Erased for T
impl<T> Event for T
Source§impl<V> HasPosition for Vwhere
V: PointN,
impl<V> HasPosition for Vwhere
V: PointN,
impl<T> Resource for T
Source§impl<S> SpatialObject for Swhere
S: HasPosition,
impl<S> SpatialObject for Swhere
S: HasPosition,
Source§type Point = <S as HasPosition>::Point
type Point = <S as HasPosition>::Point
The object’s point type.
Source§fn mbr(&self) -> BoundingRect<<S as HasPosition>::Point>
fn mbr(&self) -> BoundingRect<<S as HasPosition>::Point>
Returns the object’s minimal bounding rectangle. Read more
Source§fn distance2(
&self,
point: &<S as HasPosition>::Point,
) -> <<S as HasPosition>::Point as PointN>::Scalar
fn distance2( &self, point: &<S as HasPosition>::Point, ) -> <<S as HasPosition>::Point as PointN>::Scalar
Returns the squared euclidean distance from the object’s contour.
Returns a value samller than zero if the point is contained within the object.
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T> TryDefault for Twhere
T: Default,
impl<T> TryDefault for Twhere
T: Default,
Source§fn try_default() -> Result<T, String>
fn try_default() -> Result<T, String>
Tries to create the default.
Source§fn unwrap_default() -> Self
fn unwrap_default() -> Self
Calls
try_default and panics on an error case.