pub struct Model {
pub meshes: Vec<Mesh>,
pub instances: Vec<Mat4>,
pub model_buffers_index: usize,
pub max_xyz: Vec3,
pub min_xyz: Vec3,
pub bounding_radius: f32,
}Expand description
See Model.
Fields§
§meshes: Vec<Mesh>§instances: Vec<Mat4>Each mesh has an instance for every transform in instances.
model_buffers_index: usizeThe index of the ModelBuffers in buffers. This will only be non zero for some map models.
max_xyz: Vec3§min_xyz: Vec3§bounding_radius: f32Implementations§
Source§impl Model
impl Model
pub fn from_model( model: &Model, instances: Vec<Mat4>, model_buffers_index: usize, alpha_table: Option<&AlphaTable>, ) -> Self
pub fn from_model_legacy(model: &Model) -> Self
Trait Implementations§
impl StructuralPartialEq for Model
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more