Struct kittycad_modeling_cmds::shared::Point3d
source · pub struct Point3d<T = f32> {
pub x: T,
pub y: T,
pub z: T,
}
Expand description
A point in 3D space
Fields§
§x: T
§y: T
§z: T
Implementations§
source§impl Point3d<LengthUnit>
impl Point3d<LengthUnit>
sourcepub fn to_millimeters(&self, from: UnitLength) -> Point3d<f64>
pub fn to_millimeters(&self, from: UnitLength) -> Point3d<f64>
Convert the point to millimeters.
source§impl Point3d<f64>
impl Point3d<f64>
sourcepub fn from_millimeters(&self, to: UnitLength) -> Point3d<LengthUnit>
pub fn from_millimeters(&self, to: UnitLength) -> Point3d<LengthUnit>
Convert the point from millimeters.
Trait Implementations§
source§impl<T> Add for Point3d<T>where
T: Add<Output = T>,
impl<T> Add for Point3d<T>where
T: Add<Output = T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§impl<T> AddAssign for Point3d<T>where
T: AddAssign<T>,
impl<T> AddAssign for Point3d<T>where
T: AddAssign<T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
+=
operation. Read moresource§impl<'de, T> Deserialize<'de> for Point3d<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Point3d<T>where
T: Deserialize<'de>,
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>,
source§impl<T> Div<T> for Point3d<T>
impl<T> Div<T> for Point3d<T>
Applies an arithmetic operation to each component, e.g. p * 3 = (p.x * 3, p.y * 3)
source§impl<T> Div for Point3d<T>where
T: Div<Output = T>,
impl<T> Div for Point3d<T>where
T: Div<Output = T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§impl<T> DivAssign<T> for Point3d<T>
impl<T> DivAssign<T> for Point3d<T>
Applies an arithmetic operation to each component, e.g. p * 3 = (p.x * 3, p.y * 3)
source§fn div_assign(&mut self, other: T)
fn div_assign(&mut self, other: T)
/=
operation. Read moresource§impl<T> DivAssign for Point3d<T>where
T: DivAssign<T>,
impl<T> DivAssign for Point3d<T>where
T: DivAssign<T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§fn div_assign(&mut self, other: Self)
fn div_assign(&mut self, other: Self)
/=
operation. Read moresource§impl<T: JsonSchema> JsonSchema for Point3d<T>
impl<T: JsonSchema> JsonSchema for Point3d<T>
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl<T> Mul<T> for Point3d<T>
impl<T> Mul<T> for Point3d<T>
Applies an arithmetic operation to each component, e.g. p * 3 = (p.x * 3, p.y * 3)
source§impl<T> Mul for Point3d<T>where
T: Mul<Output = T>,
impl<T> Mul for Point3d<T>where
T: Mul<Output = T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§impl<T> MulAssign<T> for Point3d<T>
impl<T> MulAssign<T> for Point3d<T>
Applies an arithmetic operation to each component, e.g. p * 3 = (p.x * 3, p.y * 3)
source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
*=
operation. Read moresource§impl<T> MulAssign for Point3d<T>where
T: MulAssign<T>,
impl<T> MulAssign for Point3d<T>where
T: MulAssign<T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
*=
operation. Read moresource§impl<T> Sub for Point3d<T>where
T: Sub<Output = T>,
impl<T> Sub for Point3d<T>where
T: Sub<Output = T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§impl<T> SubAssign for Point3d<T>where
T: SubAssign<T>,
impl<T> SubAssign for Point3d<T>where
T: SubAssign<T>,
Arithmetic between two points happens component-wise, e.g. p + q == (p.x + q.x, p.y + q.y)
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
-=
operation. Read moreimpl<T: Copy> Copy for Point3d<T>
impl<T> StructuralPartialEq for Point3d<T>
Auto Trait Implementations§
impl<T> Freeze for Point3d<T>where
T: Freeze,
impl<T> RefUnwindSafe for Point3d<T>where
T: RefUnwindSafe,
impl<T> Send for Point3d<T>where
T: Send,
impl<T> Sync for Point3d<T>where
T: Sync,
impl<T> Unpin for Point3d<T>where
T: Unpin,
impl<T> UnwindSafe for Point3d<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more