Struct truck_geometry::base::cgmath::Vector3
source · #[repr(C)]pub struct Vector3<S> {
pub x: S,
pub y: S,
pub z: S,
}
Expand description
A 3-dimensional vector.
This type is marked as #[repr(C)]
.
Fields§
§x: S
The x component of the vector.
y: S
The y component of the vector.
z: S
The z component of the vector.
Implementations§
source§impl<S> Vector3<S>
impl<S> Vector3<S>
Trait Implementations§
source§impl<S> AbsDiffEq for Vector3<S>where
S: BaseFloat,
impl<S> AbsDiffEq for Vector3<S>where
S: BaseFloat,
source§fn default_epsilon() -> <S as AbsDiffEq>::Epsilon
fn default_epsilon() -> <S as AbsDiffEq>::Epsilon
The default tolerance to use when testing values that are close together. Read more
source§fn abs_diff_eq(
&self,
other: &Vector3<S>,
epsilon: <S as AbsDiffEq>::Epsilon,
) -> bool
fn abs_diff_eq( &self, other: &Vector3<S>, epsilon: <S as AbsDiffEq>::Epsilon, ) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
source§fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
The inverse of
AbsDiffEq::abs_diff_eq
.source§impl<S> AddAssign<Vector3<S>> for Point3<S>
impl<S> AddAssign<Vector3<S>> for Point3<S>
source§fn add_assign(&mut self, vector: Vector3<S>)
fn add_assign(&mut self, vector: Vector3<S>)
Performs the
+=
operation. Read moresource§impl<S> AddAssign for Vector3<S>
impl<S> AddAssign for Vector3<S>
source§fn add_assign(&mut self, other: Vector3<S>)
fn add_assign(&mut self, other: Vector3<S>)
Performs the
+=
operation. Read moresource§impl<S> Array for Vector3<S>where
S: Copy,
impl<S> Array for Vector3<S>where
S: Copy,
type Element = S
source§fn from_value(scalar: S) -> Vector3<S>
fn from_value(scalar: S) -> Vector3<S>
Construct a vector from a single value, replicating it. Read more
source§fn as_mut_ptr(&mut self) -> *mut Self::Element
fn as_mut_ptr(&mut self) -> *mut Self::Element
Get a mutable pointer to the first element of the array.
source§fn swap_elements(&mut self, i: usize, j: usize)
fn swap_elements(&mut self, i: usize, j: usize)
Swap the elements at indices
i
and j
in-place.source§impl<S> ControlPoint<S> for Vector3<S>where
S: BaseFloat,
impl<S> ControlPoint<S> for Vector3<S>where
S: BaseFloat,
source§impl<'de, S> Deserialize<'de> for Vector3<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Vector3<S>where
S: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Vector3<S>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Vector3<S>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<S> DivAssign<S> for Vector3<S>
impl<S> DivAssign<S> for Vector3<S>
source§fn div_assign(&mut self, scalar: S)
fn div_assign(&mut self, scalar: S)
Performs the
/=
operation. Read moresource§impl<S> ElementWise<S> for Vector3<S>where
S: BaseNum,
impl<S> ElementWise<S> for Vector3<S>where
S: BaseNum,
fn add_element_wise(self, rhs: S) -> Vector3<S>
fn sub_element_wise(self, rhs: S) -> Vector3<S>
fn mul_element_wise(self, rhs: S) -> Vector3<S>
fn div_element_wise(self, rhs: S) -> Vector3<S>
fn rem_element_wise(self, rhs: S) -> Vector3<S>
fn add_assign_element_wise(&mut self, rhs: S)
fn sub_assign_element_wise(&mut self, rhs: S)
fn mul_assign_element_wise(&mut self, rhs: S)
fn div_assign_element_wise(&mut self, rhs: S)
fn rem_assign_element_wise(&mut self, rhs: S)
source§impl<S> ElementWise for Vector3<S>where
S: BaseNum,
impl<S> ElementWise for Vector3<S>where
S: BaseNum,
fn add_element_wise(self, rhs: Vector3<S>) -> Vector3<S>
fn sub_element_wise(self, rhs: Vector3<S>) -> Vector3<S>
fn mul_element_wise(self, rhs: Vector3<S>) -> Vector3<S>
fn div_element_wise(self, rhs: Vector3<S>) -> Vector3<S>
fn rem_element_wise(self, rhs: Vector3<S>) -> Vector3<S>
fn add_assign_element_wise(&mut self, rhs: Vector3<S>)
fn sub_assign_element_wise(&mut self, rhs: Vector3<S>)
fn mul_assign_element_wise(&mut self, rhs: Vector3<S>)
fn div_assign_element_wise(&mut self, rhs: Vector3<S>)
fn rem_assign_element_wise(&mut self, rhs: Vector3<S>)
source§impl<S> Homogeneous<S> for Vector3<S>where
S: BaseFloat,
impl<S> Homogeneous<S> for Vector3<S>where
S: BaseFloat,
source§fn from_point(point: <Vector3<S> as Homogeneous<S>>::Point) -> Vector3<S>
fn from_point(point: <Vector3<S> as Homogeneous<S>>::Point) -> Vector3<S>
Returns homogeneous coordinate.
source§fn from_point_weight(point: Self::Point, weight: S) -> Self
fn from_point_weight(point: Self::Point, weight: S) -> Self
Returns homogeneous coordinate from point and weight.
source§fn to_point(self) -> Self::Point
fn to_point(self) -> Self::Point
Returns the projection to the plane whose the last component is
1.0
.source§fn rat_der(self, der: Self) -> <Self::Point as EuclideanSpace>::Diff
fn rat_der(self, der: Self) -> <Self::Point as EuclideanSpace>::Diff
Returns the derivation of the rational curve. Read more
source§fn rat_der2(
self,
der: Self,
der2: Self,
) -> <Self::Point as EuclideanSpace>::Diff
fn rat_der2( self, der: Self, der2: Self, ) -> <Self::Point as EuclideanSpace>::Diff
Returns the 2nd-ord derivation of the rational curve. Read more
source§fn rat_cross_der(
&self,
uder: Self,
vder: Self,
uvder: Self,
) -> <Self::Point as EuclideanSpace>::Diff
fn rat_cross_der( &self, uder: Self, vder: Self, uvder: Self, ) -> <Self::Point as EuclideanSpace>::Diff
Returns the cross derivation of the rational surface. Read more
source§impl<S> InnerSpace for Vector3<S>where
S: BaseNum,
impl<S> InnerSpace for Vector3<S>where
S: BaseNum,
source§fn angle(self, other: Vector3<S>) -> Rad<S>where
S: BaseFloat,
fn angle(self, other: Vector3<S>) -> Rad<S>where
S: BaseFloat,
Returns the angle between two vectors in radians.
source§fn magnitude2(self) -> Self::Scalar
fn magnitude2(self) -> Self::Scalar
Returns the squared magnitude. Read more
source§fn project_on(self, other: Self) -> Self
fn project_on(self, other: Self) -> Self
Returns the
vector projection
of the current inner space projected onto the supplied argument.
source§impl<S> MetricSpace for Vector3<S>where
S: BaseNum,
impl<S> MetricSpace for Vector3<S>where
S: BaseNum,
source§impl<S> MulAssign<S> for Vector3<S>
impl<S> MulAssign<S> for Vector3<S>
source§fn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
Performs the
*=
operation. Read moresource§impl<S> RelativeEq for Vector3<S>where
S: BaseFloat,
impl<S> RelativeEq for Vector3<S>where
S: BaseFloat,
source§fn default_max_relative() -> <S as AbsDiffEq>::Epsilon
fn default_max_relative() -> <S as AbsDiffEq>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
source§fn relative_eq(
&self,
other: &Vector3<S>,
epsilon: <S as AbsDiffEq>::Epsilon,
max_relative: <S as AbsDiffEq>::Epsilon,
) -> bool
fn relative_eq( &self, other: &Vector3<S>, epsilon: <S as AbsDiffEq>::Epsilon, max_relative: <S as AbsDiffEq>::Epsilon, ) -> bool
A test for equality that uses a relative comparison if the values are far apart.
source§fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon,
) -> bool
fn relative_ne( &self, other: &Rhs, epsilon: Self::Epsilon, max_relative: Self::Epsilon, ) -> bool
The inverse of
RelativeEq::relative_eq
.source§impl<S> RemAssign<S> for Vector3<S>
impl<S> RemAssign<S> for Vector3<S>
source§fn rem_assign(&mut self, scalar: S)
fn rem_assign(&mut self, scalar: S)
Performs the
%=
operation. Read moresource§impl<S> Serialize for Vector3<S>where
S: Serialize,
impl<S> Serialize for Vector3<S>where
S: Serialize,
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl<S> SubAssign<Vector3<S>> for Point3<S>
impl<S> SubAssign<Vector3<S>> for Point3<S>
source§fn sub_assign(&mut self, vector: Vector3<S>)
fn sub_assign(&mut self, vector: Vector3<S>)
Performs the
-=
operation. Read moresource§impl<S> SubAssign for Vector3<S>
impl<S> SubAssign for Vector3<S>
source§fn sub_assign(&mut self, other: Vector3<S>)
fn sub_assign(&mut self, other: Vector3<S>)
Performs the
-=
operation. Read moresource§impl<S> TangentSpace<S> for Vector3<S>where
S: BaseFloat,
impl<S> TangentSpace<S> for Vector3<S>where
S: BaseFloat,
source§impl<S> UlpsEq for Vector3<S>where
S: BaseFloat,
impl<S> UlpsEq for Vector3<S>where
S: BaseFloat,
source§fn default_max_ulps() -> u32
fn default_max_ulps() -> u32
The default ULPs to tolerate when testing values that are far-apart. Read more
source§impl<S> VectorSpace for Vector3<S>where
S: BaseNum,
impl<S> VectorSpace for Vector3<S>where
S: BaseNum,
impl<S> Copy for Vector3<S>where
S: Copy,
impl<S> Eq for Vector3<S>where
S: Eq,
impl<S> StructuralPartialEq for Vector3<S>
Auto Trait Implementations§
impl<S> Freeze for Vector3<S>where
S: Freeze,
impl<S> RefUnwindSafe for Vector3<S>where
S: RefUnwindSafe,
impl<S> Send for Vector3<S>where
S: Send,
impl<S> Sync for Vector3<S>where
S: Sync,
impl<S> Unpin for Vector3<S>where
S: Unpin,
impl<S> UnwindSafe for Vector3<S>where
S: UnwindSafe,
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)