pub struct Arc { /* private fields */ }Expand description
An Arc of a Great Circle on a unit sphere.
Implementations§
Source§impl Arc
impl Arc
Sourcepub const fn new(
a: Vector3d,
pole: Vector3d,
length: Radians,
half_width: Radians,
) -> Self
pub const fn new( a: Vector3d, pole: Vector3d, length: Radians, half_width: Radians, ) -> 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,
azimuth: Angle,
length: Radians,
) -> Self
pub fn from_lat_lon_azi_length( a: &LatLong, azimuth: Angle, length: Radians, ) -> Self
Construct an Arc
a- the start positionazimuth- the azimuth at a.length- the length of theArc.
Sourcepub fn between_positions(a: &LatLong, b: &LatLong) -> Self
pub fn between_positions(a: &LatLong, b: &LatLong) -> 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) -> &mut Self
pub const fn set_half_width(&mut self, half_width: Radians) -> &mut Self
Set the half_width of an Arc.
half_width- the half width of theArc.
Sourcepub const fn pole(&self) -> Vector3d
pub const fn pole(&self) -> Vector3d
The right hand pole of the Great Circle at the start point of the Arc.
Sourcepub const fn half_width(&self) -> Radians
pub const fn half_width(&self) -> Radians
The half width of the Arc.
Sourcepub fn position(&self, distance: Radians) -> Vector3d
pub fn position(&self, distance: Radians) -> Vector3d
A position vector at distance along the Arc.
Sourcepub fn perp_position(&self, point: &Vector3d, distance: Radians) -> Vector3d
pub fn perp_position(&self, point: &Vector3d, distance: Radians) -> Vector3d
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) -> Vector3d
pub fn angle_position(&self, angle: Angle) -> Vector3d
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: &Vector3d) -> (Radians, Radians)
pub fn calculate_atd_and_xtd(&self, point: &Vector3d) -> (Radians, Radians)
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: &Vector3d) -> Radians
pub fn shortest_distance(&self, point: &Vector3d) -> Radians
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 Copy for Arc
impl StructuralPartialEq for Arc
Auto Trait Implementations§
impl Freeze for Arc
impl RefUnwindSafe for Arc
impl Send for Arc
impl Sync for Arc
impl Unpin for Arc
impl UnwindSafe for Arc
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,
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.