pub struct VertexArray { /* private fields */ }
Expand description
VertexArray is a vertex data structure that is drawable and it’s the basic system
Implementations§
Source§impl VertexArray
impl VertexArray
Sourcepub fn new() -> VertexArray
pub fn new() -> VertexArray
Create a empty vertex array
pub fn array(&self) -> &Vec<Vertex>
pub fn clear(&mut self)
pub fn array_mut(&mut self) -> &mut Vec<Vertex>
pub fn active(&self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn bind(&self)
pub fn unbind(&self)
pub unsafe fn get_ptr(&self) -> *const GLvoid
Trait Implementations§
Source§impl Clone for VertexArray
impl Clone for VertexArray
Source§fn clone(&self) -> VertexArray
fn clone(&self) -> VertexArray
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VertexArray
impl Debug for VertexArray
Source§impl Default for VertexArray
impl Default for VertexArray
Source§fn default() -> VertexArray
fn default() -> VertexArray
Returns the “default value” for a type. Read more
Source§impl Drop for VertexArray
impl Drop for VertexArray
Source§impl<'a> From<&'a [Vertex]> for VertexArray
impl<'a> From<&'a [Vertex]> for VertexArray
Source§fn from(array: &[Vertex]) -> VertexArray
fn from(array: &[Vertex]) -> VertexArray
Converts to this type from the input type.
Source§impl<'a> From<&'a [f32]> for VertexArray
impl<'a> From<&'a [f32]> for VertexArray
Source§fn from(array: &[f32]) -> VertexArray
fn from(array: &[f32]) -> VertexArray
Converts to this type from the input type.
Source§impl Index<usize> for VertexArray
impl Index<usize> for VertexArray
Source§impl IndexMut<usize> for VertexArray
impl IndexMut<usize> for VertexArray
Source§impl PartialEq for VertexArray
impl PartialEq for VertexArray
impl StructuralPartialEq for VertexArray
Auto Trait Implementations§
impl Freeze for VertexArray
impl RefUnwindSafe for VertexArray
impl Send for VertexArray
impl Sync for VertexArray
impl Unpin for VertexArray
impl UnwindSafe for VertexArray
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.