pub struct Arc<T: Float + FloatConst> { /* private fields */ }Expand description
An Arc of a Great Circle on a unit sphere.
Implementations§
Source§impl<T> Arc<T>
impl<T> Arc<T>
Sourcepub const fn new(
a: Vector3<T>,
pole: Vector3<T>,
length: Radians<T>,
half_width: Radians<T>,
) -> Self
pub const fn new( a: Vector3<T>, pole: Vector3<T>, length: Radians<T>, half_width: Radians<T>, ) -> Self
Construct an Arc
a- the start point of theArc.pole- the right hand pole of the Great Circle of theArc.length- the length of theArc.half_width- the half width of theArc.
Sourcepub fn from_lat_lon_azi_length(
a: &LatLong<T>,
azimuth: Angle<T>,
length: Radians<T>,
) -> Self
pub fn from_lat_lon_azi_length( a: &LatLong<T>, azimuth: Angle<T>, length: Radians<T>, ) -> Self
Construct an Arc
a- the start positionazimuth- the azimuth at a.length- the length of theArc.
Sourcepub fn between_positions(a: &LatLong<T>, b: &LatLong<T>) -> Self
pub fn between_positions(a: &LatLong<T>, b: &LatLong<T>) -> Self
Construct an Arc from the start and end positions.
Note: if the points are the same or antipodal, the pole will be invalid.
a,b- the start and end positions
Sourcepub const fn set_half_width(&mut self, half_width: Radians<T>) -> &mut Self
pub const fn set_half_width(&mut self, half_width: Radians<T>) -> &mut Self
Set the half_width of an Arc.
half_width- the half width of theArc.
Sourcepub const fn pole(&self) -> Vector3<T>
pub const fn pole(&self) -> Vector3<T>
The right hand pole of the Great Circle at the start point of the Arc.
Sourcepub const fn half_width(&self) -> Radians<T>
pub const fn half_width(&self) -> Radians<T>
The half width of the Arc.
Sourcepub fn position(&self, distance: Radians<T>) -> Vector3<T>
pub fn position(&self, distance: Radians<T>) -> Vector3<T>
A position vector at distance along the Arc.
Sourcepub fn perp_position(
&self,
point: &Vector3<T>,
distance: Radians<T>,
) -> Vector3<T>
pub fn perp_position( &self, point: &Vector3<T>, distance: Radians<T>, ) -> Vector3<T>
The position of a perpendicular point at distance from the Arc.
pointa point on theArc’s great circle.distancethe perpendicular distance from theArc’s great circle.
returns the point at perpendicular distance from point.
Sourcepub fn angle_position(&self, angle: Angle<T>) -> Vector3<T>
pub fn angle_position(&self, angle: Angle<T>) -> Vector3<T>
The position of a point at angle from the Arc start, at Arc length.
anglethe angle from theArcstart.
returns the point at angle from the Arc start, at Arc length.
Sourcepub fn end_arc(&self, at_b: bool) -> Self
pub fn end_arc(&self, at_b: bool) -> Self
The Arc at the end of an Arc, just the point if half_width is zero.
@param at_b if true the Arc at b, else the Arc at a.
@return the end Arc at a or b.
Sourcepub fn calculate_atd_and_xtd(
&self,
point: &Vector3<T>,
) -> (Radians<T>, Radians<T>)
pub fn calculate_atd_and_xtd( &self, point: &Vector3<T>, ) -> (Radians<T>, Radians<T>)
Calculate great-circle along and across track distances of point from
the Arc.
point- the point.
returns the along and across track distances of the point in Radians.
Sourcepub fn shortest_distance(&self, point: &Vector3<T>) -> Radians<T>
pub fn shortest_distance(&self, point: &Vector3<T>) -> Radians<T>
Calculate the shortest great-circle distance of a point from the Arc.
point- the point.
returns the shortest distance of a point from the Arc in Radians.
Trait Implementations§
impl<T: Copy + Float + FloatConst> Copy for Arc<T>
impl<T: Eq + Float + FloatConst> Eq for Arc<T>
impl<T: PartialEq + Float + FloatConst> StructuralPartialEq for Arc<T>
Auto Trait Implementations§
impl<T> Freeze for Arc<T>where
T: Freeze,
impl<T> RefUnwindSafe for Arc<T>where
T: RefUnwindSafe,
impl<T> Send for Arc<T>where
T: Send,
impl<T> Sync for Arc<T>where
T: Sync,
impl<T> Unpin for Arc<T>where
T: Unpin,
impl<T> UnsafeUnpin for Arc<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Arc<T>where
T: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.