pub struct SceneState {
pub part: Rc<PartView>,
pub hidden: Option<Vec<String>>,
pub instances: Vec<ViewInstance>,
pub all: bool,
pub removed: Vec<String>,
pub components: BTreeMap<String, Rc<PartView>>,
pub forgotten: Vec<String>,
pub meshes: BTreeMap<String, Rc<FaceMesh>>,
pub forgotten_meshes: Vec<String>,
pub structure: Option<Vec<StructureItem>>,
}Expand description
What is drawn: a part, and which of its sketches and datums not to.
Its faces’ triangles are sent by key, each mesh once (see
SceneState::meshes).
The parts placed in it — however many, however deep — are sent as what changed since the last scene: a viewer keeps them by name, and the views of their components by key, each sent once. So moving one placed part sends where that one is, and placing a screw a hundred times sends what a screw looks like once.
Fields§
§part: Rc<PartView>The part, without the parts placed in it: those are instances.
The sketches and datums the steps shown have used: what was made
from them shows them now. None of a kind while it is being picked.
Not sent — None — where it is as the last scene sent it: a drag
moving one placed part does not send every name again.
instances: Vec<ViewInstance>The parts placed in the part drawn, however deep, that are new or
moved or drawn from another component since the last scene — every
one, if all.
all: boolWhether the scene is all there is: a viewer forgets any other placed parts, and every component and mesh it kept.
removed: Vec<String>The names of the placed parts drawn last time and gone now.
components: BTreeMap<String, Rc<PartView>>The views of the components the placed parts are drawn from, by key
(see ViewInstance::component), that the viewer does not have:
each is sent once, and kept until it is forgotten.
forgotten: Vec<String>The components the viewer forgets now: none of its placed parts has used them for longest. One is sent again once a placed part uses it. Those of a part that leaves the scene for a while are kept, so that editing a step before a large part placed after it does not send that part again when it shows again.
meshes: BTreeMap<String, Rc<FaceMesh>>The meshes of the faces drawn — of the part, and of the components
sent — that the viewer does not have, by key (see
crate::view::FaceMesh): a face is sent by the key of its mesh,
and each mesh once, kept until it is forgotten_meshes. So showing
a part again with other sketches, or with one face changed, sends
the faces of none, or of that one.
forgotten_meshes: Vec<String>The meshes the viewer forgets now: no face drawn has used them for longest.
structure: Option<Vec<StructureItem>>What the part has beyond its faces, to list and show or hide (see
crate::registry::Drawer::structure). Not sent — None — where
it is as the last scene sent it.
Trait Implementations§
Source§impl Clone for SceneState
impl Clone for SceneState
Source§fn clone(&self) -> SceneState
fn clone(&self) -> SceneState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more