Struct solstice::mesh::IndexedMesh [−][src]
pub struct IndexedMesh<V, I> { /* fields omitted */ }
Expand description
A mesh with vertex data that is indexed with separate data.
This is useful if you have a number of vertices that you would otherwise have to duplicate because indices are generally smaller than a vertex so duplicating them is more performant.
Implementations
impl<V, I> IndexedMesh<V, I> where
V: Vertex,
I: Index,
[src]
impl<V, I> IndexedMesh<V, I> where
V: Vertex,
I: Index,
[src]pub fn new(
ctx: &mut Context,
vertex_count: usize,
index_count: usize
) -> Result<Self, GraphicsError>
[src]
pub fn new(
ctx: &mut Context,
vertex_count: usize,
index_count: usize
) -> Result<Self, GraphicsError>
[src]Construct a mesh with a given number of vertices and indices.
pub fn with_data(
ctx: &mut Context,
vertices: &[V],
indices: &[I]
) -> Result<Self, GraphicsError>
[src]
ctx: &mut Context,
vertices: &[V],
indices: &[I]
) -> Result<Self, GraphicsError>
pub fn with_mesh(
ctx: &mut Context,
mesh: VertexMesh<V>,
index_count: usize
) -> Result<Self, GraphicsError>
[src]
pub fn with_mesh(
ctx: &mut Context,
mesh: VertexMesh<V>,
index_count: usize
) -> Result<Self, GraphicsError>
[src]Construct an indexed mesh from a non-indexed mesh.
pub fn set_vertices(&self, ctx: &mut Context, vertices: &[V], offset: usize)
[src]
pub fn set_vertices(&self, ctx: &mut Context, vertices: &[V], offset: usize)
[src]Write new data into a range of the Mesh’s vertex data.
pub fn set_indices(&self, ctx: &mut Context, indices: &[I], offset: usize)
[src]
pub fn set_indices(&self, ctx: &mut Context, indices: &[I], offset: usize)
[src]Write new data into a range of the Mesh’s vertex data.
pub fn set_draw_range(&mut self, draw_range: Option<Range<usize>>)
[src]
pub fn draw_range(&self) -> Range<usize>
[src]
pub fn set_draw_mode(&mut self, draw_mode: DrawMode)
[src]
pub fn len(&self) -> usize
[src]
Trait Implementations
impl<V: Clone, I: Clone> Clone for IndexedMesh<V, I>
[src]
impl<V: Clone, I: Clone> Clone for IndexedMesh<V, I>
[src]fn clone(&self) -> IndexedMesh<V, I>
[src]
fn clone(&self) -> IndexedMesh<V, I>
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl<V: Debug, I: Debug> Debug for IndexedMesh<V, I>
[src]
impl<V: Debug, I: Debug> Debug for IndexedMesh<V, I>
[src]impl<V: Vertex, I: Index> Mesh for IndexedMesh<V, I>
[src]
impl<V: Vertex, I: Index> Mesh for IndexedMesh<V, I>
[src]impl<V: Vertex, I: Index> Mesh for &IndexedMesh<V, I>
[src]
impl<V: Vertex, I: Index> Mesh for &IndexedMesh<V, I>
[src]impl<V: Vertex, I: Index> MeshAttacher for IndexedMesh<V, I>
[src]
impl<V: Vertex, I: Index> MeshAttacher for IndexedMesh<V, I>
[src]impl<V: PartialEq, I: PartialEq> PartialEq<IndexedMesh<V, I>> for IndexedMesh<V, I>
[src]
impl<V: PartialEq, I: PartialEq> PartialEq<IndexedMesh<V, I>> for IndexedMesh<V, I>
[src]fn eq(&self, other: &IndexedMesh<V, I>) -> bool
[src]
fn eq(&self, other: &IndexedMesh<V, I>) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &IndexedMesh<V, I>) -> bool
[src]
fn ne(&self, other: &IndexedMesh<V, I>) -> bool
[src]This method tests for !=
.
impl<V, I> StructuralPartialEq for IndexedMesh<V, I>
[src]
Auto Trait Implementations
impl<V, I> RefUnwindSafe for IndexedMesh<V, I> where
I: RefUnwindSafe,
V: RefUnwindSafe,
I: RefUnwindSafe,
V: RefUnwindSafe,
impl<V, I> Send for IndexedMesh<V, I> where
I: Send,
V: Send,
I: Send,
V: Send,
impl<V, I> Sync for IndexedMesh<V, I> where
I: Sync,
V: Sync,
I: Sync,
V: Sync,
impl<V, I> Unpin for IndexedMesh<V, I> where
I: Unpin,
V: Unpin,
I: Unpin,
V: Unpin,
impl<V, I> UnwindSafe for IndexedMesh<V, I> where
I: UnwindSafe,
V: UnwindSafe,
I: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more