pub struct Instances {
pub translations: Vec<Vec3>,
pub rotations: Option<Vec<Quat>>,
pub scales: Option<Vec<Vec3>>,
pub texture_transforms: Option<Vec<Mat3>>,
pub colors: Option<Vec<Color>>,
}Expand description
Defines the attributes for the instances of the model defined in InstancedMesh or InstancedModel. Each list of attributes must contain the same number of elements as the number of instances. The attributes are applied to each instance before they are rendered. The translation, rotation and scale is applied after the transformation applied to all instances (see InstancedMesh::set_transformation). The texture transform is also applied after the texture transform applied to all isntances (see InstancedMesh::set_texture_transform).
Fields
translations: Vec<Vec3>The translation applied to the positions of each instance.
rotations: Option<Vec<Quat>>The rotations applied to the positions of each instance.
scales: Option<Vec<Vec3>>The non-uniform scales applied to the positions of each instance.
texture_transforms: Option<Vec<Mat3>>The texture transform applied to the uv coordinates of each instance.
colors: Option<Vec<Color>>Colors multiplied onto the base color of each instance.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Instances
impl Send for Instances
impl Sync for Instances
impl Unpin for Instances
impl UnwindSafe for Instances
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more