Struct unit_sphere::Arc
source · 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 the arc.pole- the right hand pole of the Great Circle of the arc.length- the length of the arc.half_width- the half width of the arc.
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 the arc.
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 fn set_half_width(&mut self, half_width: Radians) -> &mut Self
pub fn set_half_width(&mut self, half_width: Radians) -> &mut Self
Set the half_width of an Arc
half_width- the half width of the arc.
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.
pub fn position(&self, distance: Radians) -> Vector3d
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 the arc’s great circle.distancethe perpendicular distance from the arc’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 the arc start.
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.
Trait Implementations§
Auto Trait Implementations§
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<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.