docs(drawing,router): rephrase docstrings some more

This commit is contained in:
Mikolaj Wielgus 2024-12-02 01:17:43 +01:00
parent 638979364c
commit 0760fb2da3
2 changed files with 20 additions and 10 deletions

View File

@ -16,8 +16,8 @@ pub trait GetFace {
} }
/// The head is the working part of the running end of the currently routed /// The head is the working part of the running end of the currently routed
/// band. Both bare and cane heads have a face, which is the fixed dot that /// band. Both bare and cane heads have a face, which is the dot that terminates
/// terminates the running end. /// the running end.
#[enum_dispatch(GetFace)] #[enum_dispatch(GetFace)]
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub enum Head { pub enum Head {
@ -33,8 +33,9 @@ impl<'a, CW: Copy, R: AccessRules> MakeRef<'a, HeadRef<'a, CW, R>, Drawing<CW, R
/// The head is bare when the routed band is not pulled out (i.e. is of zero /// The head is bare when the routed band is not pulled out (i.e. is of zero
/// length). This happens on the first routing step and when the routed band was /// length). This happens on the first routing step and when the routed band was
/// contracted due to the routing algorithm backtracking. In these situations a /// completely contracted due to the routing algorithm backtracking. In these
/// cane head cannot be used because there is obviously no cane behind the face. /// situations a cane head cannot be used because there is obviously no cane
/// behind the face, and the face itself is fixed instead of loose.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub struct BareHead { pub struct BareHead {
pub face: FixedDotIndex, pub face: FixedDotIndex,
@ -46,9 +47,14 @@ impl GetFace for BareHead {
} }
} }
/// The head is a cane head when the routed band is of nonzero length (i.e. is /// The head is a cane head when the routed band is pulled out (i.e. is of
/// pulled out). It differs from the bare head by having a `cane` member, which /// non-zero length). It differs from a bare head by having a `cane` member,
/// is the terminal cane on the running end of the currently routed band. /// which is the terminal cane on the running end of the currently routed band.
///
/// You can think of the cane head's cane as of a very long neck, though in
/// anatomy the neck is not considered to be a part of the head, and the face,
/// which here would be the head proper, itself has the same width as the cane,
/// also unlike a real head.
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub struct CaneHead { pub struct CaneHead {
pub face: LooseDotIndex, pub face: LooseDotIndex,

View File

@ -15,10 +15,14 @@ use super::{
navmesh::{BinavvertexNodeIndex, Navmesh, NavvertexIndex}, navmesh::{BinavvertexNodeIndex, Navmesh, NavvertexIndex},
}; };
/// The navcord is a structure that holds the movable non-borrowing data of the
/// currently running routing process.
///
/// The name "navcord" is a shortening of "navigation cord", by analogy to
/// "navmesh" being a shortening of "navigation mesh".
#[derive(Debug)] #[derive(Debug)]
/// Stepper for the Navcord.
pub struct NavcordStepper { pub struct NavcordStepper {
/// The currently chosen path. /// The currently attempted path.
pub path: Vec<NavvertexIndex>, pub path: Vec<NavvertexIndex>,
/// Head of the routed band. /// Head of the routed band.
pub head: Head, pub head: Head,
@ -27,7 +31,7 @@ pub struct NavcordStepper {
} }
impl NavcordStepper { impl NavcordStepper {
/// Create new Navigation Cord instance /// Creates a new navcord.
pub fn new( pub fn new(
source: FixedDotIndex, source: FixedDotIndex,
source_navvertex: NavvertexIndex, source_navvertex: NavvertexIndex,