Struct truck_modeling::base::cgmath::Point3
pub struct Point3<S> {
pub x: S,
pub y: S,
pub z: S,
}
Expand description
A point in 3-dimensional space.
This type is marked as #[repr(C)]
.
Fields§
§x: S
§y: S
§z: S
Implementations§
§impl<S> Point3<S>where
S: BaseNum,
impl<S> Point3<S>where
S: BaseNum,
pub fn from_homogeneous(v: Vector4<S>) -> Point3<S>
pub fn to_homogeneous(self) -> Vector4<S>
Trait Implementations§
§impl<S> AbsDiffEq<Point3<S>> for Point3<S>where
S: BaseFloat,
impl<S> AbsDiffEq<Point3<S>> for Point3<S>where
S: BaseFloat,
§fn default_epsilon() -> <S as AbsDiffEq<S>>::Epsilon
fn default_epsilon() -> <S as AbsDiffEq<S>>::Epsilon
The default tolerance to use when testing values that are close together. Read more
§fn abs_diff_eq(
&self,
other: &Point3<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon
) -> bool
fn abs_diff_eq(
&self,
other: &Point3<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon
) -> bool
A test for equality that uses the absolute difference to compute the approximate
equality of two numbers.
§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
.§impl<S> AddAssign<Vector3<S>> for Point3<S>where
S: BaseNum + AddAssign<S>,
impl<S> AddAssign<Vector3<S>> for Point3<S>where
S: BaseNum + AddAssign<S>,
§fn add_assign(&mut self, vector: Vector3<S>)
fn add_assign(&mut self, vector: Vector3<S>)
Performs the
+=
operation. Read more§impl<S> Array for Point3<S>where
S: BaseNum,
impl<S> Array for Point3<S>where
S: BaseNum,
type Element = S
§fn from_value(scalar: S) -> Point3<S>
fn from_value(scalar: S) -> Point3<S>
Construct a vector from a single value, replicating it. Read more
§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.
§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 Point3<S>where
S: BaseFloat,
impl<S> ControlPoint<S> for Point3<S>where
S: BaseFloat,
§impl<'de, S> Deserialize<'de> for Point3<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for Point3<S>where
S: Deserialize<'de>,
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Point3<S>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Point3<S>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl<S> DivAssign<S> for Point3<S>where
S: BaseNum + DivAssign<S>,
impl<S> DivAssign<S> for Point3<S>where
S: BaseNum + DivAssign<S>,
§fn div_assign(&mut self, scalar: S)
fn div_assign(&mut self, scalar: S)
Performs the
/=
operation. Read more§impl<S> ElementWise<Point3<S>> for Point3<S>where
S: BaseNum,
impl<S> ElementWise<Point3<S>> for Point3<S>where
S: BaseNum,
fn add_element_wise(self, rhs: Point3<S>) -> Point3<S>
fn sub_element_wise(self, rhs: Point3<S>) -> Point3<S>
fn mul_element_wise(self, rhs: Point3<S>) -> Point3<S>
fn div_element_wise(self, rhs: Point3<S>) -> Point3<S>
fn rem_element_wise(self, rhs: Point3<S>) -> Point3<S>
fn add_assign_element_wise(&mut self, rhs: Point3<S>)
fn sub_assign_element_wise(&mut self, rhs: Point3<S>)
fn mul_assign_element_wise(&mut self, rhs: Point3<S>)
fn div_assign_element_wise(&mut self, rhs: Point3<S>)
fn rem_assign_element_wise(&mut self, rhs: Point3<S>)
§impl<S> ElementWise<S> for Point3<S>where
S: BaseNum,
impl<S> ElementWise<S> for Point3<S>where
S: BaseNum,
fn add_element_wise(self, rhs: S) -> Point3<S>
fn sub_element_wise(self, rhs: S) -> Point3<S>
fn mul_element_wise(self, rhs: S) -> Point3<S>
fn div_element_wise(self, rhs: S) -> Point3<S>
fn rem_element_wise(self, rhs: S) -> Point3<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)
§impl<S> EuclideanSpace for Point3<S>where
S: BaseNum,
impl<S> EuclideanSpace for Point3<S>where
S: BaseNum,
§impl<S> MetricSpace for Point3<S>where
S: BaseFloat,
impl<S> MetricSpace for Point3<S>where
S: BaseFloat,
§impl<S> MulAssign<S> for Point3<S>where
S: BaseNum + MulAssign<S>,
impl<S> MulAssign<S> for Point3<S>where
S: BaseNum + MulAssign<S>,
§fn mul_assign(&mut self, scalar: S)
fn mul_assign(&mut self, scalar: S)
Performs the
*=
operation. Read more§impl<S> RelativeEq<Point3<S>> for Point3<S>where
S: BaseFloat,
impl<S> RelativeEq<Point3<S>> for Point3<S>where
S: BaseFloat,
§fn default_max_relative() -> <S as AbsDiffEq<S>>::Epsilon
fn default_max_relative() -> <S as AbsDiffEq<S>>::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
§fn relative_eq(
&self,
other: &Point3<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_relative: <S as AbsDiffEq<S>>::Epsilon
) -> bool
fn relative_eq(
&self,
other: &Point3<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_relative: <S as AbsDiffEq<S>>::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
§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
.§impl<S> RemAssign<S> for Point3<S>where
S: BaseNum + RemAssign<S>,
impl<S> RemAssign<S> for Point3<S>where
S: BaseNum + RemAssign<S>,
§fn rem_assign(&mut self, scalar: S)
fn rem_assign(&mut self, scalar: S)
Performs the
%=
operation. Read more§impl<S> Serialize for Point3<S>where
S: Serialize,
impl<S> Serialize for Point3<S>where
S: Serialize,
§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
§impl<S> SubAssign<Vector3<S>> for Point3<S>where
S: BaseNum + SubAssign<S>,
impl<S> SubAssign<Vector3<S>> for Point3<S>where
S: BaseNum + SubAssign<S>,
§fn sub_assign(&mut self, vector: Vector3<S>)
fn sub_assign(&mut self, vector: Vector3<S>)
Performs the
-=
operation. Read more§impl<S> Transform<Point3<S>> for Matrix3<S>where
S: BaseFloat,
impl<S> Transform<Point3<S>> for Matrix3<S>where
S: BaseFloat,
§fn look_at(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix3<S>
fn look_at(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix3<S>
👎Deprecated: Use look_at_rh or look_at_lh
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.§fn look_at_lh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix3<S>
fn look_at_lh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix3<S>
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.§fn look_at_rh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix3<S>
fn look_at_rh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix3<S>
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.§fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>
fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>
Transform a vector using this transform.
§fn transform_point(&self, point: Point3<S>) -> Point3<S>
fn transform_point(&self, point: Point3<S>) -> Point3<S>
Transform a point using this transform.
§fn concat(&self, other: &Matrix3<S>) -> Matrix3<S>
fn concat(&self, other: &Matrix3<S>) -> Matrix3<S>
Combine this transform with another, yielding a new transformation
which has the effects of both.
§fn inverse_transform(&self) -> Option<Matrix3<S>>
fn inverse_transform(&self) -> Option<Matrix3<S>>
Create a transform that “un-does” this one.
§fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
Inverse transform a vector using this transform
§fn concat_self(&mut self, other: &Self)
fn concat_self(&mut self, other: &Self)
Combine this transform with another, in-place.
§impl<S> Transform<Point3<S>> for Matrix4<S>where
S: BaseFloat,
impl<S> Transform<Point3<S>> for Matrix4<S>where
S: BaseFloat,
§fn look_at(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>
fn look_at(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>
👎Deprecated: Use look_at_rh or look_at_lh
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.§fn look_at_lh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>
fn look_at_lh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.§fn look_at_rh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>
fn look_at_rh(eye: Point3<S>, center: Point3<S>, up: Vector3<S>) -> Matrix4<S>
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.§fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>
fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>
Transform a vector using this transform.
§fn transform_point(&self, point: Point3<S>) -> Point3<S>
fn transform_point(&self, point: Point3<S>) -> Point3<S>
Transform a point using this transform.
§fn concat(&self, other: &Matrix4<S>) -> Matrix4<S>
fn concat(&self, other: &Matrix4<S>) -> Matrix4<S>
Combine this transform with another, yielding a new transformation
which has the effects of both.
§fn inverse_transform(&self) -> Option<Matrix4<S>>
fn inverse_transform(&self) -> Option<Matrix4<S>>
Create a transform that “un-does” this one.
§fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
fn inverse_transform_vector(
&self,
vec: <P as EuclideanSpace>::Diff
) -> Option<<P as EuclideanSpace>::Diff>
Inverse transform a vector using this transform
§fn concat_self(&mut self, other: &Self)
fn concat_self(&mut self, other: &Self)
Combine this transform with another, in-place.