pub struct AnchorPoint {
pub anchor: String,
pub kind: String,
pub at: [f64; 2],
pub model: [f64; 3],
pub dir: Option<[f64; 2]>,
pub radius: Option<f64>,
pub u: Option<[f64; 2]>,
pub v: Option<[f64; 2]>,
}Expand description
One point of a placement’s projection a sheet dimension can anchor to.
anchor is the reference string (super::dimension::SheetAnchor) — the
name that survives a re-projection — and at is where it landed on the
paper THIS time. The sheet viewport publishes one hit rect per candidate
while the reference picker is up for a sheet object, and a dimension resolves its anchors by
looking its references up in this list: an anchor that is not here is a
LOST anchor, which is what marks its dimension unresolved.
Fields§
§anchor: String§kind: Stringvertex, edge or circle.
at: [f64; 2]Paper millimetres.
model: [f64; 3]The 3D point before projection, in model units, with this view’s poses
applied. Aligned dimensions measure here so an oblique camera cannot
foreshorten their values; at remains the point used for layout.
dir: Option<[f64; 2]>The unit PAPER direction of a STRAIGHT display edge — an edge
candidate only, and None on a curved edge or one that projects to a
point (an edge parallel to the viewing direction). It is what an
ANGULAR dimension measures between: the edge’s direction as this view
projects it, so a foreshortened angle reads its projected value.
Straightness is judged in the MODEL, not on the paper: a circular edge seen edge-on projects to a straight segment and is not a straight edge. All three fractions of one edge carry the same direction — it is the EDGE’s, not the point’s.
radius: Option<f64>The circle’s MODEL radius — a circle candidate only.
u: Option<[f64; 2]>The paper images of the circle’s two conjugate radii: the projected
circle is the ellipse at + u cos t + v sin t. A circle candidate
only, and what a radial dimension’s leader measures its reach along.
v: Option<[f64; 2]>Trait Implementations§
Source§impl Clone for AnchorPoint
impl Clone for AnchorPoint
Source§impl Debug for AnchorPoint
impl Debug for AnchorPoint
Source§impl PartialEq for AnchorPoint
impl PartialEq for AnchorPoint
Source§impl Serialize for AnchorPoint
impl Serialize for AnchorPoint
impl StructuralPartialEq for AnchorPoint
Auto Trait Implementations§
impl Freeze for AnchorPoint
impl RefUnwindSafe for AnchorPoint
impl Send for AnchorPoint
impl Sync for AnchorPoint
impl Unpin for AnchorPoint
impl UnsafeUnpin for AnchorPoint
impl UnwindSafe for AnchorPoint
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more