GenericMesh

Trait GenericMesh 

Source
pub trait GenericMesh:
    Debug
    + Any
    + Send
    + Sync {
Show 32 methods // Required methods fn clone(&self) -> Box<dyn GenericMesh>; fn get_vk_vertex_buffer(&self) -> VkBuffer; fn get_vk_index_buffer(&self) -> Option<VkBuffer>; fn get_vk_instance_buffer(&self) -> Option<VkBuffer>; fn get_vk_command_buffer(&self) -> Option<VkBuffer>; fn create_index_buffer( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn create_instance_buffer( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn create_command_buffer( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn set_vertex_buffer_data( &self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn set_index_buffer_data( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn set_instance_buffer_data( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn set_command_buffer_data( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>; fn get_primitive_type(&self) -> VkPrimitiveTopology; fn get_vertex_count(&self) -> usize; fn get_index_count(&self) -> usize; fn get_instance_count(&self) -> usize; fn get_command_count(&self) -> usize; fn iter_vertex_buffer_struct_members( &self, ) -> IntoIter<(&'static str, MemberInfo)>; fn get_index_type_id(&self) -> Option<TypeId>; fn iter_instance_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, MemberInfo)>>; fn iter_command_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, MemberInfo)>>; fn get_vertex_type_name(&self) -> &'static str; fn get_index_type_name(&self) -> &'static str; fn get_instance_type_name(&self) -> &'static str; fn get_command_type_name(&self) -> &'static str; fn get_vertex_stride(&self) -> usize; fn get_index_stride(&self) -> usize; fn get_instance_stride(&self) -> usize; fn get_command_stride(&self) -> usize; fn flush(&self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>; fn discard_staging_buffers(&self); // Provided method fn get_index_type(&self) -> Option<VkIndexType> { ... }
}
Expand description

The trait for a mesh

Required Methods§

Source

fn clone(&self) -> Box<dyn GenericMesh>

Clone the mesh

Source

fn get_vk_vertex_buffer(&self) -> VkBuffer

Get the vertex buffer

Source

fn get_vk_index_buffer(&self) -> Option<VkBuffer>

Get the index buffer

Source

fn get_vk_instance_buffer(&self) -> Option<VkBuffer>

Get the instance buffer

Source

fn get_vk_command_buffer(&self) -> Option<VkBuffer>

Get the command buffer

Source

fn create_index_buffer( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Create the index buffer

Source

fn create_instance_buffer( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Create the instance buffer

Source

fn create_command_buffer( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Create the command buffer

Source

fn set_vertex_buffer_data( &self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Get the vertex buffer

Source

fn set_index_buffer_data( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Get the index buffer

Source

fn set_instance_buffer_data( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Get the instance buffer

Source

fn set_command_buffer_data( &mut self, data: *const c_void, size: usize, ) -> Result<(), VulkanError>

Get the command buffer

Source

fn get_primitive_type(&self) -> VkPrimitiveTopology

Get the primitive type

Source

fn get_vertex_count(&self) -> usize

Get vertex count

Source

fn get_index_count(&self) -> usize

Get index count

Source

fn get_instance_count(&self) -> usize

Get instance count

Source

fn get_command_count(&self) -> usize

Get command count

Source

fn iter_vertex_buffer_struct_members( &self, ) -> IntoIter<(&'static str, MemberInfo)>

Get the iterator for the vertex buffer item structure

Source

fn get_index_type_id(&self) -> Option<TypeId>

Get the TypeId of the index buffer item

Source

fn iter_instance_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, MemberInfo)>>

Get the iterator for the vertex buffer item structure

Source

fn iter_command_buffer_struct_members( &self, ) -> Option<IntoIter<(&'static str, MemberInfo)>>

Get the iterator for the vertex buffer item structure

Source

fn get_vertex_type_name(&self) -> &'static str

Get the stride of the vertex buffer

Source

fn get_index_type_name(&self) -> &'static str

Get the stride of the index buffer

Source

fn get_instance_type_name(&self) -> &'static str

Get the stride of the instance buffer

Source

fn get_command_type_name(&self) -> &'static str

Get the stride of the command buffer

Source

fn get_vertex_stride(&self) -> usize

Get the stride of the vertex buffer

Source

fn get_index_stride(&self) -> usize

Get the stride of the index buffer

Source

fn get_instance_stride(&self) -> usize

Get the stride of the instance buffer

Source

fn get_command_stride(&self) -> usize

Get the stride of the command buffer

Source

fn flush(&self, cmdbuf: VkCommandBuffer) -> Result<(), VulkanError>

Flush all buffers that needs to be flushed to use

Source

fn discard_staging_buffers(&self)

Discard staging buffers if the data will never be modified.

Provided Methods§

Source

fn get_index_type(&self) -> Option<VkIndexType>

Get the index type

Implementors§

Source§

impl<BV, V, BE, E, BI, I, BC, C> GenericMesh for Mesh<BV, V, BE, E, BI, I, BC, C>