#[non_exhaustive]pub struct Instance {
pub source: usize,
pub transform: [f64; 16],
}Expand description
One instance an instances node places.
ɴsɪ gives an instances node “a transformation matrix for each
instance” and an optional modelindices selecting which prototype
each uses. This pairs the two, so a backend building a MoonRay
InstanceGeometry or a Mitsuba shapegroup reference does not have
to.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: usizeWhich prototype this instance draws, as a position in
Scene::instance_sources.
ɴsɪ matches modelindices against “the index attribute of the
model connection”, not against connection order, so this is the
resolved position rather than the raw value.
transform: [f64; 16]This instance’s transform, in the instances node’s space.
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 UnsafeUnpin 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