pub struct Scene {
pub meshes: Vec<PlayerMesh>,
pub nodes: Vec<PlayerNode>,
pub cameras: HashMap<String, Camera>,
pub step_images: HashMap<String, String>,
pub thumbnails: HashMap<String, String>,
pub poses: HashMap<String, Vec<Pose>>,
pub pmi: HashMap<String, PlayerPmi>,
pub arrows: HashMap<String, Vec<Arrow>>,
pub assembly: Vec<PlayerComponent>,
pub wrapper: String,
}Expand description
What the caller supplies beside the block: the meshes and nodes of the assembly as placed, each step’s camera and picture, and part thumbnails.
Fields§
§meshes: Vec<PlayerMesh>§nodes: Vec<PlayerNode>§cameras: HashMap<String, Camera>§step_images: HashMap<String, String>§thumbnails: HashMap<String, String>§poses: HashMap<String, Vec<Pose>>Each step’s explode poses, by step id.
pmi: HashMap<String, PlayerPmi>Each step’s view PMI, by step id.
arrows: HashMap<String, Vec<Arrow>>The arrows a step’s parts come home along when they are not the
step’s own (a Line art step without arrows gets one per part from the
engine), by step id; a step not listed uses its own arrows.
assembly: Vec<PlayerComponent>The assembly’s occurrence tree (PlayerComponent::rows); each
row’s thumbnail is taken from thumbnails by its part.
wrapper: StringThe wrapper occurrence the instructions place the assembly under
(ACOMP1): a step’s motion, keyed by the assembly’s own occurrences,
is re-keyed under it. Empty when the nodes are the assembly’s own.
Implementations§
Source§impl Scene
impl Scene
One mesh per part. keys is one key per node (its part and member)
and placements one optional placement per node (column-major, the
engine’s pose of the occurrence in the world). Among the nodes of one
key, the first is the reference:
- with placements, its mesh is made part-local (its vertices taken back through its placement, normals through the rotation) and every placed node of the key shares it, each carrying its own placement as its matrix, whatever that copy’s own tessellation was;
- without, a node whose mesh is the same tessellation as the reference’s
moved rigidly shares it and carries the rigid move, decided by the
vertices themselves (the same index order and count, every vertex
within
RIGID_FIT_TOLERANCEof the fit), so a mirrored or re-tessellated copy keeps its own.
Meshes left unreferenced are dropped and the rest renumbered.