pub struct FeatureDimAnnotation {
pub field_key: String,
pub point_a: [f64; 3],
pub point_b: [f64; 3],
pub value: f64,
pub label: String,
pub kind: FeatureDimKind,
pub center: [f64; 3],
pub axis: [f64; 3],
pub ref_dir: [f64; 3],
}Expand description
One editable dimension annotation.
LINEAR: a leader from world point_a → point_b whose length is the
(resolved) value of param field_key; dragging projects the pointer onto the
a → b axis.
ANGULAR: a screen-constant-radius ARC swept value degrees about axis
(unit), starting from ref_dir (unit, in the plane ⟂ axis), centered at
center; dragging maps the pointer to a swept angle. The point_a/point_b
/ midpoint() linear surface is unused for an angular annotation (both are
set to center); the app anchors an angular chip at the arc’s mid-sweep,
which is camera-dependent and computed engine-side.
Fields§
§field_key: StringThe inputParams key this annotation edits (e.g. sizeX, radius, arc).
point_a: [f64; 3]LINEAR: the dimension’s start point in WORLD space (the leader anchor /
drag base). ANGULAR: center.
point_b: [f64; 3]LINEAR: the dimension’s end point in WORLD space (the value-1 handle).
ANGULAR: center.
value: f64The current (resolved) numeric value of field_key (a length for LINEAR,
DEGREES for ANGULAR).
label: StringThe short display prefix (X, R, H, A, Arc, …).
kind: FeatureDimKindThe annotation kind.
center: [f64; 3]ANGULAR only: the arc center (the axis-plane vertex) in WORLD space.
[0;3] for a linear annotation.
axis: [f64; 3]ANGULAR only: the rotation AXIS (unit) the arc sweeps about. [0;3] for
a linear annotation.
ref_dir: [f64; 3]ANGULAR only: the sweep’s ZERO reference (unit, in the plane ⟂ axis).
[0;3] for a linear annotation.
Implementations§
Trait Implementations§
Source§impl Clone for FeatureDimAnnotation
impl Clone for FeatureDimAnnotation
Source§fn clone(&self) -> FeatureDimAnnotation
fn clone(&self) -> FeatureDimAnnotation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FeatureDimAnnotation
impl RefUnwindSafe for FeatureDimAnnotation
impl Send for FeatureDimAnnotation
impl Sync for FeatureDimAnnotation
impl Unpin for FeatureDimAnnotation
impl UnsafeUnpin for FeatureDimAnnotation
impl UnwindSafe for FeatureDimAnnotation
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