pub struct CartesianPoint(/* private fields */);
Expand description
Represents a point using the Cartesian system of coordinates.
Implementations§
Source§impl CartesianPoint
impl CartesianPoint
pub fn new(x: f64, y: f64, z: f64) -> Self
Sourcepub fn from_geographic(point: &GeographicPoint) -> Self
pub fn from_geographic(point: &GeographicPoint) -> Self
Returns the equivalent CartesianPoint
of the given GeographicPoint
pub fn x(&self) -> f64
pub fn set_x(&mut self, x: f64)
pub fn y(&self) -> f64
pub fn set_y(&mut self, y: f64)
pub fn z(&self) -> f64
pub fn set_z(&mut self, z: f64)
Sourcepub fn distance(&self, other: &CartesianPoint) -> f64
pub fn distance(&self, other: &CartesianPoint) -> f64
Returns the distance between self and the given point.
Sourcepub fn cross(&self, other: &CartesianPoint) -> Self
pub fn cross(&self, other: &CartesianPoint) -> Self
Performs the cartesian product between self and the given point.
Trait Implementations§
Source§impl Clone for CartesianPoint
impl Clone for CartesianPoint
Source§fn clone(&self) -> CartesianPoint
fn clone(&self) -> CartesianPoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CartesianPoint
impl Debug for CartesianPoint
Source§impl Default for CartesianPoint
impl Default for CartesianPoint
Source§fn default() -> CartesianPoint
fn default() -> CartesianPoint
Returns the “default value” for a type. Read more
Source§impl From<CartesianPoint> for GeographicPoint
impl From<CartesianPoint> for GeographicPoint
Source§fn from(value: CartesianPoint) -> Self
fn from(value: CartesianPoint) -> Self
Converts to this type from the input type.
Source§impl From<CartesianPoint> for JsValue
impl From<CartesianPoint> for JsValue
Source§fn from(value: CartesianPoint) -> Self
fn from(value: CartesianPoint) -> Self
Converts to this type from the input type.
Source§impl From<GeographicPoint> for CartesianPoint
impl From<GeographicPoint> for CartesianPoint
Source§fn from(value: GeographicPoint) -> Self
fn from(value: GeographicPoint) -> Self
Converts to this type from the input type.
Source§impl From<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>> for CartesianPoint
impl From<Matrix<f64, Const<3>, Const<1>, ArrayStorage<f64, 3, 1>>> for CartesianPoint
Source§impl FromWasmAbi for CartesianPoint
impl FromWasmAbi for CartesianPoint
Source§impl Index<usize> for CartesianPoint
impl Index<usize> for CartesianPoint
Source§impl IndexMut<usize> for CartesianPoint
impl IndexMut<usize> for CartesianPoint
Source§impl IntoWasmAbi for CartesianPoint
impl IntoWasmAbi for CartesianPoint
Source§impl LongRefFromWasmAbi for CartesianPoint
impl LongRefFromWasmAbi for CartesianPoint
Source§impl OptionFromWasmAbi for CartesianPoint
impl OptionFromWasmAbi for CartesianPoint
Source§impl OptionIntoWasmAbi for CartesianPoint
impl OptionIntoWasmAbi for CartesianPoint
Source§impl PartialEq for CartesianPoint
impl PartialEq for CartesianPoint
Source§impl RefFromWasmAbi for CartesianPoint
impl RefFromWasmAbi for CartesianPoint
Source§type Anchor = RcRef<CartesianPoint>
type Anchor = RcRef<CartesianPoint>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for CartesianPoint
impl RefMutFromWasmAbi for CartesianPoint
Source§impl TryFromJsValue for CartesianPoint
impl TryFromJsValue for CartesianPoint
Source§impl VectorFromWasmAbi for CartesianPoint
impl VectorFromWasmAbi for CartesianPoint
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CartesianPoint]>
Source§impl VectorIntoJsValue for CartesianPoint
impl VectorIntoJsValue for CartesianPoint
fn vector_into_jsvalue(vector: Box<[CartesianPoint]>) -> JsValue
Source§impl VectorIntoWasmAbi for CartesianPoint
impl VectorIntoWasmAbi for CartesianPoint
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CartesianPoint]>) -> Self::Abi
Source§impl WasmDescribeVector for CartesianPoint
impl WasmDescribeVector for CartesianPoint
impl Copy for CartesianPoint
impl StructuralPartialEq for CartesianPoint
impl SupportsConstructor for CartesianPoint
impl SupportsInstanceProperty for CartesianPoint
impl SupportsStaticProperty for CartesianPoint
Auto Trait Implementations§
impl Freeze for CartesianPoint
impl RefUnwindSafe for CartesianPoint
impl Send for CartesianPoint
impl Sync for CartesianPoint
impl Unpin for CartesianPoint
impl UnwindSafe for CartesianPoint
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§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.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§fn to_subset_unchecked(&self) -> SS
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.