pub struct Instances {
pub transformations: Vec<Mat4>,
pub texture_transformations: Option<Vec<Mat3>>,
pub colors: Option<Vec<Srgba>>,
}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 Instances::transformations are applied after the transformation applied to all instances (see InstancedMesh::set_transformation).
Fields§
§transformations: Vec<Mat4>The transformations applied to each instance.
texture_transformations: Option<Vec<Mat3>>The texture transform applied to the uv coordinates of each instance.
colors: Option<Vec<Srgba>>Colors multiplied onto the base color of each instance.
Implementations§
Trait Implementations§
Source§impl From<PointCloud> for Instances
impl From<PointCloud> for Instances
Source§fn from(points: PointCloud) -> Self
fn from(points: PointCloud) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Instances
impl RefUnwindSafe for Instances
impl Send for Instances
impl Sync for Instances
impl Unpin for Instances
impl UnwindSafe for Instances
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