pub struct PartView<S: Scalar> {
pub vertices: Vec<ViewVertex<S>>,
pub edges: Vec<ViewEdge<S>>,
pub faces: Vec<ViewFace<S>>,
pub sketches: Vec<ViewSketch<S>>,
pub datums: Vec<ViewDatum<S>>,
pub solids: Vec<String>,
pub extent: Extent<S>,
}Expand description
A part as the viewport draws it, every entity by name — and, serialized, what a viewer draws.
Fields§
§vertices: Vec<ViewVertex<S>>§edges: Vec<ViewEdge<S>>§faces: Vec<ViewFace<S>>§sketches: Vec<ViewSketch<S>>§datums: Vec<ViewDatum<S>>§solids: Vec<String>The part’s solids, oldest first.
extent: Extent<S>Implementations§
Source§impl<S: Scalar> PartView<S>
impl<S: Scalar> PartView<S>
Sourcepub fn of(part: &Part<S>) -> GeopResult<Self>
pub fn of(part: &Part<S>) -> GeopResult<Self>
part as drawn.
Sourcepub fn pick(
&self,
pointer: &Pointer<S>,
roles: &[Role],
scope: Option<&EntityRef>,
) -> Option<PartHit<S>>
pub fn pick( &self, pointer: &Pointer<S>, roles: &[Role], scope: Option<&EntityRef>, ) -> Option<PartHit<S>>
Whatever the pointer is over that can fill one of roles — and, with
a scope, is part of it: a line of one sketch. Frame datums are drawn
on top of everything, so they are picked first. Otherwise a vertex or
a sketch point, else an edge or a sketch curve, near the pointer — and not hidden behind a
face — wins: the smallest entity under the pointer is the one meant.
Else the nearest along the ray of the faces, solids, sketches and
other datums hit.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for PartView<S>where
S: Freeze,
impl<S> RefUnwindSafe for PartView<S>where
S: RefUnwindSafe,
impl<S> Send for PartView<S>
impl<S> Sync for PartView<S>
impl<S> Unpin for PartView<S>where
S: Unpin,
impl<S> UnsafeUnpin for PartView<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for PartView<S>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more