pub struct Vertex2D {
pub position: [f32; 2],
}Expand description
Вершина для простых объектов. A vertex for simple objects.
Fields§
§position: [f32; 2]Implementations§
Trait Implementations§
Source§impl<'o> DependentObject<Vertex2D, u8> for Circle
impl<'o> DependentObject<Vertex2D, u8> for Circle
type Vertices = Vec<Vertex2D>
type Indices = [u8; 0]
fn primitive_type(&self) -> PrimitiveType
Source§fn write_indices<'a>(
&self,
index_buffer: &'a Buffer<[I]>,
) -> Option<IndicesSource<'a>>
fn write_indices<'a>( &self, index_buffer: &'a Buffer<[I]>, ) -> Option<IndicesSource<'a>>
Вписывает индексы в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§fn write_vertices<'a>(
&self,
vertex_buffer: &'a Buffer<[V]>,
vertex_format: &'a VertexFormat,
) -> Option<VerticesSource<'a>>
fn write_vertices<'a>( &self, vertex_buffer: &'a Buffer<[V]>, vertex_format: &'a VertexFormat, ) -> Option<VerticesSource<'a>>
Вписывает вершины в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§impl<'o> DependentObject<Vertex2D, u8> for Line
impl<'o> DependentObject<Vertex2D, u8> for Line
type Vertices = [Vertex2D; 2]
type Indices = [u8; 0]
fn primitive_type(&self) -> PrimitiveType
Source§fn write_indices<'a>(
&self,
index_buffer: &'a Buffer<[I]>,
) -> Option<IndicesSource<'a>>
fn write_indices<'a>( &self, index_buffer: &'a Buffer<[I]>, ) -> Option<IndicesSource<'a>>
Вписывает индексы в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§fn write_vertices<'a>(
&self,
vertex_buffer: &'a Buffer<[V]>,
vertex_format: &'a VertexFormat,
) -> Option<VerticesSource<'a>>
fn write_vertices<'a>( &self, vertex_buffer: &'a Buffer<[V]>, vertex_format: &'a VertexFormat, ) -> Option<VerticesSource<'a>>
Вписывает вершины в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§impl DependentObject<Vertex2D, u8> for Quadrilateral
impl DependentObject<Vertex2D, u8> for Quadrilateral
type Vertices = [Vertex2D; 4]
type Indices = [u8; 0]
fn primitive_type(&self) -> PrimitiveType
Source§fn write_indices<'a>(
&self,
index_buffer: &'a Buffer<[I]>,
) -> Option<IndicesSource<'a>>
fn write_indices<'a>( &self, index_buffer: &'a Buffer<[I]>, ) -> Option<IndicesSource<'a>>
Вписывает индексы в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§fn write_vertices<'a>(
&self,
vertex_buffer: &'a Buffer<[V]>,
vertex_format: &'a VertexFormat,
) -> Option<VerticesSource<'a>>
fn write_vertices<'a>( &self, vertex_buffer: &'a Buffer<[V]>, vertex_format: &'a VertexFormat, ) -> Option<VerticesSource<'a>>
Вписывает вершины в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§impl DependentObject<Vertex2D, u8> for Rectangle
impl DependentObject<Vertex2D, u8> for Rectangle
type Vertices = [Vertex2D; 4]
type Indices = [u8; 0]
fn primitive_type(&self) -> PrimitiveType
Source§fn write_indices<'a>(
&self,
index_buffer: &'a Buffer<[I]>,
) -> Option<IndicesSource<'a>>
fn write_indices<'a>( &self, index_buffer: &'a Buffer<[I]>, ) -> Option<IndicesSource<'a>>
Вписывает индексы в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§fn write_vertices<'a>(
&self,
vertex_buffer: &'a Buffer<[V]>,
vertex_format: &'a VertexFormat,
) -> Option<VerticesSource<'a>>
fn write_vertices<'a>( &self, vertex_buffer: &'a Buffer<[V]>, vertex_format: &'a VertexFormat, ) -> Option<VerticesSource<'a>>
Вписывает вершины в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§impl DependentObject<Vertex2D, u8> for RectangleBorder
impl DependentObject<Vertex2D, u8> for RectangleBorder
type Vertices = [Vertex2D; 4]
type Indices = [u8; 0]
fn primitive_type(&self) -> PrimitiveType
Source§fn write_indices<'a>(
&self,
index_buffer: &'a Buffer<[I]>,
) -> Option<IndicesSource<'a>>
fn write_indices<'a>( &self, index_buffer: &'a Buffer<[I]>, ) -> Option<IndicesSource<'a>>
Вписывает индексы в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§fn write_vertices<'a>(
&self,
vertex_buffer: &'a Buffer<[V]>,
vertex_format: &'a VertexFormat,
) -> Option<VerticesSource<'a>>
fn write_vertices<'a>( &self, vertex_buffer: &'a Buffer<[V]>, vertex_format: &'a VertexFormat, ) -> Option<VerticesSource<'a>>
Вписывает вершины в буфер индексов и возвращает
Some(IndicesSource) для рисования
или None, если недостаточно места. Read moreSource§impl Vertex for Vertex2D
impl Vertex for Vertex2D
Source§fn build_bindings() -> VertexFormat
fn build_bindings() -> VertexFormat
Builds the
VertexFormat representing the layout of this element.Source§fn is_supported<C>(caps: &C) -> boolwhere
C: CapabilitiesSource + ?Sized,
fn is_supported<C>(caps: &C) -> boolwhere
C: CapabilitiesSource + ?Sized,
Returns true if the backend supports this vertex format.
impl Copy for Vertex2D
Auto Trait Implementations§
impl Freeze for Vertex2D
impl RefUnwindSafe for Vertex2D
impl Send for Vertex2D
impl Sync for Vertex2D
impl Unpin for Vertex2D
impl UnsafeUnpin for Vertex2D
impl UnwindSafe for Vertex2D
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> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§fn read<F, E>(size: usize, f: F) -> Result<T, E>
fn read<F, E>(size: usize, f: F) -> Result<T, E>
Prepares an output buffer, then turns this buffer into an
Owned.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.