pub struct CubeModel {
pub transform: Transform,
pub texture: Handle<Texture>,
pub bone: CubeModelBone,
/* private fields */
}Fields§
§transform: Transform§texture: Handle<Texture>§bone: CubeModelBoneImplementations§
Source§impl CubeModel
impl CubeModel
Sourcepub fn new(
engine: &RenderEngine,
transform: Transform,
texture: Handle<Texture>,
bone: CubeModelBone,
possible_size: usize,
) -> Self
pub fn new( engine: &RenderEngine, transform: Transform, texture: Handle<Texture>, bone: CubeModelBone, possible_size: usize, ) -> Self
Creates a new cube model
§Arguments
engine- A instance of the render engine so that buffers can be createdtransform- The transform of this object (position, rotation, scale)texture- The texture to be used for this objectbone- The root bone of the modelpossible_size- The possible count of all parts and its children. This can be left as 0 or be inaccurate, as the actual size is taken when the model is autmatically, this value only serves to make the creation for effecient if it is accurate.
Sourcepub fn update(&mut self, engine: &RenderEngine)
pub fn update(&mut self, engine: &RenderEngine)
Updates this cube model so that any changes to this models transform or any of its parts transforms is reflected by the model.
§Arguments
engine- A instance of the render engine as this is required to update the internal buffer
Sourcepub fn clone(&self, engine: &RenderEngine) -> Self
pub fn clone(&self, engine: &RenderEngine) -> Self
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CubeModel
impl !RefUnwindSafe for CubeModel
impl Send for CubeModel
impl Sync for CubeModel
impl Unpin for CubeModel
impl !UnwindSafe for CubeModel
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