pub struct Instance {
pub path: String,
pub node: String,
pub geometry: GeometryRef,
pub material: usize,
pub world: Transform,
pub matrix: [f32; 16],
pub bounds: Bounds,
}Expand description
One drawn geometry of one node at one path.
Fields§
§path: StringChild names from the root, joined by /, for example
site/Storey/Wall. Resolve it with [Composition::get] to show the
node’s attributes on pick. Unique per node, shared by the instances
of one node with several kinds of geometry.
node: StringThe path of the node that defined this node, [ComposedNode::path].
geometry: GeometryRefThe shared geometry drawn.
material: usizeIndex into RenderScene::materials.
world: TransformThe node’s world transform in the file’s coordinates.
matrix: [f32; 16]Column-major f32 matrix from buffer coordinates to world
coordinates minus the scene origin, the layout of glTF node.matrix.
bounds: BoundsWorld bounds of the drawn vertices, in the file’s coordinates.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnwindSafe for Instance
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