pub struct MappedIndexedMesh<V, I> { /* private fields */ }

Implementations§

source§

impl<V, I> MappedIndexedMesh<V, I>where V: Vertex, I: Index,

source

pub fn new( gl: &mut Context, vertex_count: usize, index_count: usize ) -> Result<Self, GraphicsError>

source

pub fn with_data( ctx: &mut Context, vertices: Vec<V>, indices: Vec<I> ) -> Result<Self, GraphicsError>

source

pub fn vertex_capacity(&self) -> usize

source

pub fn index_capacity(&self) -> usize

source

pub fn set_draw_range(&mut self, draw_range: Option<Range<usize>>)

source

pub fn draw_range(&self) -> Range<usize>

source

pub fn set_vertices(&mut self, vertices: &[V], offset: usize)

source

pub fn get_vertices(&self) -> &[V]

source

pub fn set_indices(&mut self, indices: &[I], offset: usize)

source

pub fn get_indices(&self) -> &[I]

source

pub fn unmap(&mut self, ctx: &mut Context) -> &IndexedMesh<V, I>

source

pub fn inner(&self) -> &IndexedMesh<V, I>

Trait Implementations§

source§

impl<V: Debug, I: Debug> Debug for MappedIndexedMesh<V, I>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<V: PartialEq, I: PartialEq> PartialEq<MappedIndexedMesh<V, I>> for MappedIndexedMesh<V, I>

source§

fn eq(&self, other: &MappedIndexedMesh<V, I>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<V, I> StructuralPartialEq for MappedIndexedMesh<V, I>

Auto Trait Implementations§

§

impl<V, I> RefUnwindSafe for MappedIndexedMesh<V, I>where I: RefUnwindSafe, V: RefUnwindSafe,

§

impl<V, I> Send for MappedIndexedMesh<V, I>where I: Send, V: Send,

§

impl<V, I> Sync for MappedIndexedMesh<V, I>where I: Sync, V: Sync,

§

impl<V, I> Unpin for MappedIndexedMesh<V, I>where I: Unpin, V: Unpin,

§

impl<V, I> UnwindSafe for MappedIndexedMesh<V, I>where I: UnwindSafe, V: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.