Struct ark_api::render::RenderMeshInstanceBuilder
source · [−]pub struct RenderMeshInstanceBuilder { /* private fields */ }Expand description
Creates RenderMeshInstance through the builder pattern
Implementations
sourceimpl RenderMeshInstanceBuilder
impl RenderMeshInstanceBuilder
sourcepub fn new(mesh: &RenderMesh) -> Self
pub fn new(mesh: &RenderMesh) -> Self
Creates a new builder from a RenderMesh.
sourcepub fn with_world_transform(&mut self, world_transform: &Mat4) -> &mut Self
pub fn with_world_transform(&mut self, world_transform: &Mat4) -> &mut Self
Set world transform. Default is Mat4::IDENTITY
sourcepub fn with_style(&mut self, style: &RenderMeshStyle) -> &mut Self
pub fn with_style(&mut self, style: &RenderMeshStyle) -> &mut Self
Set the style. Default is RenderMeshStyle::default()
sourcepub fn with_instance_id(&mut self, instance_id: InstanceId) -> &mut Self
pub fn with_instance_id(&mut self, instance_id: InstanceId) -> &mut Self
Set the instance id. Default is 0 which means no instance id.
sourcepub fn with_materials_offset(&mut self, offset: u32) -> &mut Self
pub fn with_materials_offset(&mut self, offset: u32) -> &mut Self
Set the materials offset. Default is 0.
This is the offset the instance will use to read into the material overrides provided with Render::draw_meshes_with_materials.
sourcepub fn with_materials_len(&mut self, len: u32) -> &mut Self
pub fn with_materials_len(&mut self, len: u32) -> &mut Self
Set the materials length. Default is 0.
This is the number of material overrides the instance will use Render::draw_meshes_with_materials.
By default it will take all materials after the offset
sourcepub fn build(&self) -> RenderMeshInstance
pub fn build(&self) -> RenderMeshInstance
Builds the mesh instance
Trait Implementations
sourceimpl Clone for RenderMeshInstanceBuilder
impl Clone for RenderMeshInstanceBuilder
sourcefn clone(&self) -> RenderMeshInstanceBuilder
fn clone(&self) -> RenderMeshInstanceBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for RenderMeshInstanceBuilder
impl Send for RenderMeshInstanceBuilder
impl Sync for RenderMeshInstanceBuilder
impl Unpin for RenderMeshInstanceBuilder
impl UnwindSafe for RenderMeshInstanceBuilder
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
